Maryann Xue created PHOENIX-2167:
------------------------------------

             Summary: Add new interface in QueryPlan for pushing down a limit 
value.
                 Key: PHOENIX-2167
                 URL: https://issues.apache.org/jira/browse/PHOENIX-2167
             Project: Phoenix
          Issue Type: Sub-task
            Reporter: Maryann Xue
            Assignee: Maryann Xue


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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to