Impala Public Jenkins has submitted this change and it was merged. Change subject: IMPALA-1882: Remove ORDER BY restriction from first_value()/last_value() ......................................................................
IMPALA-1882: Remove ORDER BY restriction from first_value()/last_value() In order to conform to the ISO SQL specifications, this patch allows the 'order by' clause to be optional for first_value() and last_value() analytical functions. Testing: 1. Added Analyzer tests 2. Added Planner tests which checks that a sort node is not used if both 'order by' and 'partition by' clauses are not used. Also, checks that if only 'partition by' clause is used then the sorting is done only on the partition column. 3. Added a query test that checks that the input is not reordered by these analytic functions if 'order by' clause is not used Change-Id: I5a3a56833ac062839629353ea240b361bc727d96 Reviewed-on: http://gerrit.cloudera.org:8080/7502 Reviewed-by: Matthew Jacobs <[email protected]> Tested-by: Impala Public Jenkins --- M fe/src/main/java/org/apache/impala/analysis/AnalyticExpr.java M fe/src/test/java/org/apache/impala/analysis/AnalyzeExprsTest.java M testdata/workloads/functional-planner/queries/PlannerTest/analytic-fns.test M testdata/workloads/functional-query/queries/QueryTest/analytic-fns.test 4 files changed, 226 insertions(+), 8 deletions(-) Approvals: Impala Public Jenkins: Verified Matthew Jacobs: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/7502 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5a3a56833ac062839629353ea240b361bc727d96 Gerrit-PatchSet: 5 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Bikramjeet Vig <[email protected]> Gerrit-Reviewer: Bikramjeet Vig <[email protected]> Gerrit-Reviewer: Impala Public Jenkins Gerrit-Reviewer: Matthew Jacobs <[email protected]>
