Bikramjeet Vig has uploaded a new change for review. http://gerrit.cloudera.org:8080/7502
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 Analyser 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 --- 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, 143 insertions(+), 7 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/02/7502/1 -- To view, visit http://gerrit.cloudera.org:8080/7502 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5a3a56833ac062839629353ea240b361bc727d96 Gerrit-PatchSet: 1 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Bikramjeet Vig <bikramjeet....@cloudera.com>