impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Jacobs (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-1882: Remove ORDER BY restriction from first value()/last value()
Date Wed, 26 Jul 2017 01:42:07 GMT
Matthew Jacobs has posted comments on this change.

Change subject: IMPALA-1882: Remove ORDER BY restriction from first_value()/last_value()

Patch Set 1:

Commit Message:

PS1, Line 14: Analyser
nit: Analyzer to be consistent with the actual code naming conventions
File fe/src/main/java/org/apache/impala/analysis/

PS1, Line 422:     boolean isFirstOrLastValueFn = fnName.equals(LAST_VALUE)
             :         || fnName.equals(FIRST_VALUE) || fnName.equals(LAST_VALUE_IGNORE_NULLS)
             :         || fnName.equals(FIRST_VALUE_IGNORE_NULLS);
make this a function like we do above for isXFn(), e.g. isOffsetFn(). No need for a local

1) consistency with the other function types
2) fewer local variables is better, assuming we don't need to worry about perf (and we don't

PS1, Line 454: isFirstOrLastValueFn
then call that fn inline here

PS1, Line 475: isFirstOrLastValueFn 
also call the fn here
File testdata/workloads/functional-query/queries/QueryTest/analytic-fns.test:

Line 2012
Nice deterministic tests :)

Can you add test cases that exercise IGNORE NULLS as well? You should be able to use alltypesagg
in a similar way.

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I5a3a56833ac062839629353ea240b361bc727d96
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Bikramjeet Vig <>
Gerrit-Reviewer: Matthew Jacobs <>
Gerrit-HasComments: Yes

View raw message