flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-4068) Move constant computations out of code-generated `flatMap` functions.
Date Wed, 15 Jun 2016 20:04:09 GMT

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

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

Github user fhueske commented on the issue:

    https://github.com/apache/flink/pull/2102
  
    This @wuchong, your approach looks good. I also found that the `ReduceExpressionRules`
had no effect due to the missing `RexExecutor`. 
    
    However, it seems that several tests of `ExpressionITCase` are failing with this change.
You can verify that the PR does not break the build by locally running `mvn clean install`.
    
    In addition, the added test should be changed as sketched in the comment. Please let me
know if you have questions.
    
    Thanks, Fabian


> Move constant computations out of code-generated `flatMap` functions.
> ---------------------------------------------------------------------
>
>                 Key: FLINK-4068
>                 URL: https://issues.apache.org/jira/browse/FLINK-4068
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table API
>    Affects Versions: 1.1.0
>            Reporter: Fabian Hueske
>
> The generated functions for expressions of the Table API or SQL include constant computations.
> For instance the code generated for a predicate like:
> {code}
> myInt < (10 + 20)
> {code}
> looks roughly like:
> {code}
> public void flatMap(Row in, Collector<Row> out) {
>   Integer in1 = in.productElement(1);
>   int temp = 10 + 20;  
>   if (in1 < temp) {
>     out.collect(in)
>   }
> }
> {code}
> In this example the computation of {{temp}} is constant and could be moved out of the
{{flatMap()}} method.
> The same might apply for generated function other than {{FlatMap}} as well.



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

Mime
View raw message