[ https://issues.apache.org/jira/browse/FLINK-20840?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leonard Xu updated FLINK-20840: ------------------------------- Description: {code:java} sql 1: |SELECT T.*, D.id |FROM MyTable AS T |JOIN LookupTable FOR SYSTEM_TIME AS OF T.proctime AS D |ON T.a = D.id optmized plan: Calc(select=[a, b, c, PROCTIME_MATERIALIZE(proctime) AS proctime, rowtime, id]) +- LookupJoin(table=[default_catalog.default_database.LookupTable], joinType=[InnerJoin], async=[false], lookup=[id=a], select=[a, b, c, proctime, rowtime, id, name, age]) +- DataStreamScan(table=[[default_catalog, default_database, MyTable]], fields=[a, b, c, proctime, rowtime]) sql 2: |SELECT T.a, D.id |FROM MyTable AS T |JOIN LookupTable FOR SYSTEM_TIME AS OF T.proctime AS D |ON T.a = D.id optmized plan: LookupJoin(table=[default_catalog.default_database.LookupTable], joinType=[InnerJoin], async=[false], lookup=[id=a], select=[a, id]) +- Calc(select=[a]) +- DataStreamScan(table=[[default_catalog, default_database, MyTable]], fields=[a, b, c, proctime, rowtime]) {code} was: {code:java} sql: |SELECT T.*, D.id |FROM MyTable AS T |JOIN LookupTable FOR SYSTEM_TIME AS OF T.proctime AS D |ON T.a = D.id optmized plan: Calc(select=[a, b, c, PROCTIME_MATERIALIZE(proctime) AS proctime, rowtime, id]) +- LookupJoin(table=[default_catalog.default_database.LookupTable], joinType=[InnerJoin], async=[false], lookup=[id=a], select=[a, b, c, proctime, rowtime, id, name, age]) +- DataStreamScan(table=[[default_catalog, default_database, MyTable]], fields=[a, b, c, proctime, rowtime]) {code} > Projection pushdown doesn't work in temporal(lookup) join > ---------------------------------------------------------- > > Key: FLINK-20840 > URL: https://issues.apache.org/jira/browse/FLINK-20840 > Project: Flink > Issue Type: Bug > Components: Table SQL / Planner > Affects Versions: 1.12.0 > Reporter: Leonard Xu > Priority: Major > > {code:java} > sql 1: > |SELECT T.*, D.id > |FROM MyTable AS T > |JOIN LookupTable FOR SYSTEM_TIME AS OF T.proctime AS D > |ON T.a = D.id > optmized plan: > Calc(select=[a, b, c, PROCTIME_MATERIALIZE(proctime) AS proctime, rowtime, > id]) > +- LookupJoin(table=[default_catalog.default_database.LookupTable], > joinType=[InnerJoin], async=[false], lookup=[id=a], select=[a, b, c, > proctime, rowtime, id, name, age]) > +- DataStreamScan(table=[[default_catalog, default_database, MyTable]], > fields=[a, b, c, proctime, rowtime]) > sql 2: > |SELECT T.a, D.id > |FROM MyTable AS T > |JOIN LookupTable FOR SYSTEM_TIME AS OF T.proctime AS D > |ON T.a = D.id > optmized plan: > LookupJoin(table=[default_catalog.default_database.LookupTable], > joinType=[InnerJoin], async=[false], lookup=[id=a], select=[a, id]) > +- Calc(select=[a]) > +- DataStreamScan(table=[[default_catalog, default_database, MyTable]], > fields=[a, b, c, proctime, rowtime]) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)