impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Volker (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-4166: Add SORT BY sql clause
Date Sun, 09 Apr 2017 13:13:24 GMT
Lars Volker has posted comments on this change.

Change subject: IMPALA-4166: Add SORT BY sql clause

Patch Set 12:


Thank you Alex for the review. Please see my inline comments and PS13.
File fe/src/main/java/org/apache/impala/analysis/

Line 85:    */
Each of the public methods is called at least twice from elsewhere so inlining them seems
wasteful. For cases where we don't have a table yet (e.g. create table statements), I can't
think of an interface that's much better than this. Should we build lookup tables for the
column lists first to address your performance considerations? We could also try build an
interface and dummy table for cases where we don't have a table yet.

Should we discuss this in a short meeting?

Line 114:       }
> Does this mean we need 2 ALTER statements to drop/rename a column?
Yes, currently that's the case. I think we discussed this in person once, too, but I don't
remember what we decided to do. Do you have a preference? Should the drop/rename statement
fail if the columns is still referenced in the sort by list? Or at least issue a warning?

Line 115:       if (!foundColumn) {
Yes, in
File fe/src/main/java/org/apache/impala/catalog/

Line 458:    */
> Preconditions.checkStats(RuntimeEnv.isTestEnv());
Cool, done.
File testdata/workloads/functional-planner/queries/PlannerTest/insert-sort-by.test:

Line 170: # IMPALA-4166: sort by columns are correct when using a partial column permutation.
> What if neither bool_col or int_col are mentioned in the column permutation
No, constant exprs are removed from the sortby list in the Planner, and for an empty list
we don't create a sort node at all. I added a test to make sure this works as intended.

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I08834f38a941786ab45a4381c2732d929a934f75
Gerrit-PatchSet: 12
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Lars Volker <>
Gerrit-Reviewer: Alex Behm <>
Gerrit-Reviewer: Dimitris Tsirogiannis <>
Gerrit-Reviewer: Lars Volker <>
Gerrit-Reviewer: Marcel Kornacker <>
Gerrit-Reviewer: Thomas Tauber-Marshall <>
Gerrit-HasComments: Yes

View raw message