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

Fabian Hueske commented on FLINK-2309:
--------------------------------------

This is a very nice idea! 
Key selector functions are so easy to define in Scala that users sometimes are 
not aware that they are using this feature (and of its implications). Besides 
the performance gain, some API limitation wrt to key selector functions could 
be overcome by this approach.

> Use static code analysis to replace selector functions with field accesses.
> ---------------------------------------------------------------------------
>
>                 Key: FLINK-2309
>                 URL: https://issues.apache.org/jira/browse/FLINK-2309
>             Project: Flink
>          Issue Type: Improvement
>          Components: Scala API
>    Affects Versions: 0.9
>            Reporter: Stephan Ewen
>            Priority: Minor
>
> In the Scala API, it is nice and safe to specify the fields that are used for 
> joining or grouping as selector functions, like this:
> {code}
> val a: DataSet[MyType] = ...
> val b: DataSet[(String, Int)] = ...
> a join b where { _.name } equalTo { _._1 }
> {code}
> We could save the MapFunctions that run the key selectors if we run the 
> static code analysis on the key selectors and determine that they have only 
> some read fields that they forward, and no modifications. In this case the 
> SCA could adjust the program to
> {code}
> val a: DataSet[MyType] = ...
> val b: DataSet[(String, Int)] = ...
> a.join(b).where("name").equalTo(1)
> {code}



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

Reply via email to