Apache Drill
  1. Apache Drill
  2. DRILL-636

Push Limit operator past project, left outer join, union all operator and down into scan operator

    Details

      Description

      When we have a limit operator on top of project, left outer join, union all operator, we should push the limit operator, until the limit is put into scan operator. Doing so, it will reduce the amount of data scanned by the scan operator.

      For instance,

      Select COL1, COL2 FROM T1 LIMIT 5;

      LIMIT (5)
      \
      PROJECT (COL1, COL2)
      \
      SCAN (T1).

      We need push limit past project, down into scan.

      Similar applies to left outer join, or union all.

        Issue Links

          Activity

          Jinfeng Ni created issue -
          Jake Farrell made changes -
          Field Original Value New Value
          Workflow no-reopen-closed, patch-avail [ 12859806 ] no-reopen-closed, patch-avail, testing [ 12860195 ]
          Jacques Nadeau made changes -
          Assignee Aman Sinha [ amansinha100 ]
          Component/s Query Planning & Optimization [ 12322681 ]
          Jacques Nadeau made changes -
          Fix Version/s 1.0.0-BETA1 [ 12324963 ]
          Jacques Nadeau made changes -
          Fix Version/s 1.0.0-BETA2 [ 12324880 ]
          Fix Version/s 1.0.0-BETA1 [ 12324963 ]
          Jacques Nadeau made changes -
          Fix Version/s Future [ 12326743 ]
          Fix Version/s 0.5.0 [ 12324880 ]
          Aman Sinha made changes -
          Fix Version/s 1.0.0 [ 12325568 ]
          Fix Version/s Future [ 12326743 ]
          Tony Stevenson made changes -
          Workflow no-reopen-closed, patch-avail, testing [ 12860195 ] Drill workflow [ 12934521 ]
          Jacques Nadeau made changes -
          Fix Version/s 1.2.0 [ 12332042 ]
          Fix Version/s 1.0.0 [ 12325568 ]
          Aman Sinha made changes -
          Fix Version/s 1.3.0 [ 12332946 ]
          Fix Version/s 1.2.0 [ 12332042 ]
          Jinfeng Ni made changes -
          Link This issue is related to DRILL-1457 [ DRILL-1457 ]
          Jacques Nadeau made changes -
          Fix Version/s Future [ 12326743 ]
          Fix Version/s 1.3.0 [ 12332946 ]
          Assignee Aman Sinha [ amansinha100 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Jinfeng Ni
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Development