Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-3412

Projections are not getting push down below Window operator

    Details

      Description

      The plan below shows that the 'star' column is being produced by the Scan and subsequent Project. This indicates projection pushdown is not working as desired when window function is present. The query produces correct results.

      explain plan for select min(n_nationkey) over (partition by n_regionkey) from cp.`tpch/nation.parquet` ;
      00-00    Screen
      00-01      Project(EXPR$0=[$0])
      00-02        Project(w0$o0=[$3])
      00-03          Window(window#0=[window(partition {2} order by [] range between UNBOUNDED PRECEDING and UNBOUNDED FOLLOWING aggs [MIN($1)])])
      00-04            SelectionVectorRemover
      00-05              Sort(sort0=[$2], dir0=[ASC])
      00-06                Project(T1¦¦*=[$0], n_nationkey=[$1], n_regionkey=[$2])
      00-07                  Scan(groupscan=[ParquetGroupScan [entries=[ReadEntryWithPath [path=classpath:/tpch/nation.parquet]], selectionRoot=/tpch/nation.parquet, numFiles=1, columns=[`*`]]])
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                seanhychu Sean Hsuan-Yi Chu
                Reporter:
                amansinha100 Aman Sinha
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: