Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-1488 Calcite Integration
  3. PHOENIX-2167

Add new interface in QueryPlan for pushing down a limit value.

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      Calcite rel trees are compiled bottom-up into Phoenix QueryPlans, the easiest way to implement a Limit RelNode in the tree is to create a ClientScanPlan with the limit value and wrap it around the inner plan. However, oftentimes this may not be efficient.
      For example, select * from T limit 10, the original Phoenix compiler would generate a ScanPlan with limit 10, apply a PageFilter and avoid using sophisticated or expensive ResultIterators.
      So it would make sense to push down the limit to a QueryPlan as low as possible and create a new copy of the plan based on this rule.

      Attachments

        1. PHOENIX-2167.patch
          17 kB
          Wei Xue

        Activity

          People

            maryannxue Wei Xue
            maryannxue Wei Xue
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 48h
                48h
                Remaining:
                Remaining Estimate - 48h
                48h
                Logged:
                Time Spent - Not Specified
                Not Specified