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

Aitozi commented on FLINK-29088:
--------------------------------

Hi [~twalthr] , [~godfreyhe]  I have opened a PR to solve this. I'm not sure 
whether it is the most suitable solution to it now, but it works in our 
production now. Looking forward to your valuable comments on it. 


Besides, during work on this PR I also notice that other push down behavior to 
the source may also affect the source reuse, I'm interested to explore how to 
solve most of them after this issue addressed.

> Project push down cause the source reuse can not work
> -----------------------------------------------------
>
>                 Key: FLINK-29088
>                 URL: https://issues.apache.org/jira/browse/FLINK-29088
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table SQL / Planner
>            Reporter: Aitozi
>            Assignee: Aitozi
>            Priority: Major
>              Labels: pull-request-available
>
> It can be reproduce by 
> {code:java}
>     util.addTable(
>       s"""
>          |create table newX(
>          |  a int,
>          |  b bigint,
>          |  c varchar
>          |) with (
>          |  'connector' = 'values'
>          |  ,'enable-projection-push-down' = 'true'
>          |)
>        """.stripMargin)
>     val sqlQuery =
>       """
>         | SELECT b from newX WHERE a > 10
>         | UNION ALL
>         | SELECT b from newX WHERE b > 10
>       """.stripMargin
>     util.verifyExecPlan(sqlQuery)
> {code}
> if 'enable-projection-push-down' set to true, the source will not be reused. 
> If set to false, the source will be reused. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to