Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-20840

Projection pushdown doesn't work in temporal(lookup) join

    XMLWordPrintableJSON

Details

    Description

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

      Attachments

        Issue Links

          Activity

            People

              leonard Leonard Xu
              leonard Leonard Xu
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: