Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-2104

Fallback implicit values for PredictOperation and TransformOperation don't work if Nothing is inferred as the output type

    XMLWordPrintableJSON

    Details

      Description

      If one calls a Predictor or Transformer with a wrong input type, then the Scala compiler tries to apply the fallback implicit value for this operation type. However, since the return type of the operations is parameterized, it will infer it to be Nothing. The problem is then that the implicit value Operation[Self, Input, Nothing] cannot be unified with the implicit parameter Operation[Self, Input, Output]. This seems to be a known Scala issue https://issues.scala-lang.org/browse/SI-1570.

      I propose to fix the output type of the implicit values to Any which will avoid that Nothing is inferred. This should solve the problem.

        Attachments

          Activity

            People

            • Assignee:
              trohrmann Till Rohrmann
              Reporter:
              trohrmann Till Rohrmann
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: