[ https://issues.apache.org/jira/browse/FLINK-6067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15929572#comment-15929572 ]
Fabian Hueske commented on FLINK-6067: -------------------------------------- Thanks for looking into this [~jinyu.zj]! Eventually, this should be solved by using a rule-based optimizer for logical optimization but for now it should be sufficient to tweak the cost functions. When you provide a fix, can you add the example above as a test case to ensure that the fix is not reverted at a later point in time when the cost functions are adapted? Thanks, Fabian > DataSetCalc which contains filterCondition and projects would not be choose > as best path in Batch TableAPI/SQL > -------------------------------------------------------------------------------------------------------------- > > Key: FLINK-6067 > URL: https://issues.apache.org/jira/browse/FLINK-6067 > Project: Flink > Issue Type: Bug > Components: Table API & SQL > Reporter: jingzhang > Assignee: jingzhang > > {code} > val result = table.where('a < 60).select('a * 1.2, 'b / 2, 'c) > {code} > we run the above code in the Batch TableAPI/SQL, we would get the following > optimizedPlan > {code} > DataSetCalc(select=[*(a, 1.2E0) AS _c0, /(b, 2) AS _c1, c]) > DataSetCalc(select=[a, b, c], where=[<(a, 60)]) > DataSetScan(table=[[_DataSetTable_0]]) > {code} > However, we run the above code in the Stream TableAPI/SQL, we would get the > following optimizedPlan > {code} > DataStreamCalc(select=[*(a, 1.2E0) AS _c0, /(b, 2) AS _c1, c], where=[<(a, > 60)]) > DataStreamScan(table=[[_DataStreamTable_0]]) > {code} > we can find that in the batch tableAPI/SQL, DataSetCalc which contains > filterCondition and projectCondition would not be choose as best path. -- This message was sent by Atlassian JIRA (v6.3.15#6346)