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

A filtering column remains in scan when filter pruning happens

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.14.0
    • Fix Version/s: 1.16.0
    • Component/s: None
    • Labels:

      Description

      Data:

      create table dfs.tmp.`nation` as select * from cp.`tpch/nation.parquet` where n_regionkey < 10;
      

      Query:

      explain plan for select n_nationkey from dfs.tmp.`nation` where n_regionkey < 10;
      

      Expected result:
      The filtering column (n_regionkey) should not be present in scan operator.

      Actual result:
      It remains in scan in spite of filter pruning.

      00-00    Screen : rowType = RecordType(ANY n_nationkey): rowcount = 25.0, cumulative cost = {52.5 rows, 77.5 cpu, 50.0 io, 0.0 network, 0.0 memory}, id = 112988
      00-01      Project(n_nationkey=[$1]) : rowType = RecordType(ANY n_nationkey): rowcount = 25.0, cumulative cost = {50.0 rows, 75.0 cpu, 50.0 io, 0.0 network, 0.0 memory}, id = 112987
      00-02        Scan(table=[[dfs, tmp, nation]], groupscan=[ParquetGroupScan [entries=[ReadEntryWithPath [path=maprfs:///tmp/nation]], selectionRoot=maprfs:/tmp/nation, numFiles=1, numRowGroups=1, usedMetadataFile=false, columns=[`n_regionkey`, `n_nationkey`]]]) : rowType = RecordType(ANY n_regionkey, ANY n_nationkey): rowcount = 25.0, cumulative cost = {25.0 rows, 50.0 cpu, 50.0 io, 0.0 network, 0.0 memory}, id = 112986
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                volodymyr Vova Vysotskyi
                Reporter:
                angozhiy Anton Gozhiy
                Reviewer:
                Arina Ielchiieva
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: