[ 
https://issues.apache.org/jira/browse/FLINK-2104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14562676#comment-14562676
 ] 

ASF GitHub Bot commented on FLINK-2104:
---------------------------------------

GitHub user tillrohrmann opened a pull request:

    https://github.com/apache/flink/pull/741

    [FLINK-2104] [ml] Fixes problem with type inference for fallback implicits

    The solution seems to be to fix the output type to `Any`. This has the 
consequence that all following operations will also be fallback operations if 
they don't support `Any` inputs. But this should be fine since only the first 
fallback operation will throw an exception stating why the operator could not 
find a suitable operation.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tillrohrmann/flink fixFallbackImplicits

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/741.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #741
    
----
commit 48d3003036a0d049b73fd40278a1470b99f87c2b
Author: Till Rohrmann <[email protected]>
Date:   2015-05-27T18:08:19Z

    [FLINK-2104] [ml] Fixes problem with type inference for fallback implicits 
where Nothing is not correctly treated (see SI-1570)

----


> Fallback implicit values for PredictOperation and TransformOperation don't 
> work if Nothing is inferred as the output type
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-2104
>                 URL: https://issues.apache.org/jira/browse/FLINK-2104
>             Project: Flink
>          Issue Type: Bug
>          Components: Machine Learning Library
>            Reporter: Till Rohrmann
>            Assignee: Till Rohrmann
>              Labels: ML
>             Fix For: 0.9
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to