You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Leonard Xu (Jira)" <ji...@apache.org> on 2021/01/04 13:53:00 UTC

[jira] [Comment Edited] (FLINK-20840) Projection pushdown doesn't work in temporal(lookup) join

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

Leonard Xu edited comment on FLINK-20840 at 1/4/21, 1:52 PM:
-------------------------------------------------------------

[~fsk119] 
The rule `FlinkProjectJoinTransposeRule` was added in logical rewrite phase which uses volcano optimizer, the optimized plan is uncertain for example above case.


was (Author: leonard xu):
The rule `FlinkProjectJoinTransposeRule` was added in logical rewrite phase which uses volcano optimizer, the optimized plan is uncertain for example above case.

> 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)