Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/16663 )
Change subject: IMPALA-10295: fix analytic limit pushdown with no predicates ...................................................................... IMPALA-10295: fix analytic limit pushdown with no predicates This handles the first case where analytic limit pushdown could be applied incorrectly: when there are no predicates applied to the output of the analytic. If no rows are filtered out between the pre-analytic sort and the place where the top-N will be inserted, and the order matches exactly, we can push down the limit safely because the limit below the analytic will filter exactly the same rows as the limit above the analytic would. We add a helper to check if the sort order matches exactly and then handle the case with no select node correctly. We leave the other cases where there is a special predicate to be handled in the next patch of the series, as the logic there is a bit more subtle. Tests: Added regression planner and query tests that demonstrate the problem. Ran core tests. Change-Id: I254e85edd5ea6b6e76d20cbdf27fd88059a98a21 Reviewed-on: http://gerrit.cloudera.org:8080/16663 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- M fe/src/main/java/org/apache/impala/planner/AnalyticEvalNode.java M testdata/workloads/functional-planner/queries/PlannerTest/limit-pushdown-analytic.test M testdata/workloads/tpch/queries/limit-pushdown-analytic.test 3 files changed, 238 insertions(+), 39 deletions(-) Approvals: Impala Public Jenkins: Looks good to me, approved; Verified -- To view, visit http://gerrit.cloudera.org:8080/16663 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I254e85edd5ea6b6e76d20cbdf27fd88059a98a21 Gerrit-Change-Number: 16663 Gerrit-PatchSet: 6 Gerrit-Owner: Tim Armstrong <[email protected]> Gerrit-Reviewer: Aman Sinha <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]>
