[
https://issues.apache.org/jira/browse/FLINK-6067?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
jingzhang updated FLINK-6067:
-----------------------------
Description:
{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.
was:
{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, the project and filterNode don't merge
into a single node. However, in the Stream tableAPI, these two nodes could
merge into one.
> ProjectNode and FilterNode cannot merge 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)