Zoltan Borok-Nagy has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8801 )

Change subject: IMPALA-5191: Standardize column alias behavior
......................................................................


Patch Set 11:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/8801/11/fe/src/main/java/org/apache/impala/analysis/SelectStmt.java
File fe/src/main/java/org/apache/impala/analysis/SelectStmt.java:

http://gerrit.cloudera.org:8080/#/c/8801/11/fe/src/main/java/org/apache/impala/analysis/SelectStmt.java@891
PS11, Line 891:    * If the rewritten expr is a NumericLiteral, then return the 
original expr, otherwise
> If given expr is rewritten into an integer literal ...
Done


http://gerrit.cloudera.org:8080/#/c/8801/11/fe/src/main/java/org/apache/impala/analysis/SelectStmt.java@896
PS11, Line 896:   private Expr rewriteIfResultIsNotNumericLiteral(ExprRewriter 
rewriter, Expr expr)
> rewriteCheckOrdinalResult()
Done


http://gerrit.cloudera.org:8080/#/c/8801/11/fe/src/main/java/org/apache/impala/analysis/SelectStmt.java@899
PS11, Line 899:     if (rewrittenExpr instanceof NumericLiteral) return expr;
> we use {} for multi-line if else
Done


http://gerrit.cloudera.org:8080/#/c/8801/11/fe/src/test/java/org/apache/impala/analysis/AnalyzeStmtsTest.java
File fe/src/test/java/org/apache/impala/analysis/AnalyzeStmtsTest.java:

http://gerrit.cloudera.org:8080/#/c/8801/11/fe/src/test/java/org/apache/impala/analysis/AnalyzeStmtsTest.java@1055
PS11, Line 1055:         "group by one, substring(cast(two as string), 1, 1), 
three");
> Add tests for the constant-folding changes, e.g.:
Added tests.

I re-read our discussion about ordinals in HAVING:
https://gerrit.cloudera.org/#/c/8801/7/fe/src/main/java/org/apache/impala/analysis/SelectStmt.java@548

I checked PostgreSQL and it does not allow ordinals in HAVING. Anyway, I 
implemented it as we discussed, just wanted to clarify that.



--
To view, visit http://gerrit.cloudera.org:8080/8801
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0f82483b486acf6953876cfa672b0d034f3709a8
Gerrit-Change-Number: 8801
Gerrit-PatchSet: 11
Gerrit-Owner: Zoltan Borok-Nagy <[email protected]>
Gerrit-Reviewer: Alex Behm <[email protected]>
Gerrit-Reviewer: Taras Bobrovytsky <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>
Gerrit-Comment-Date: Wed, 17 Jan 2018 15:56:16 +0000
Gerrit-HasComments: Yes

Reply via email to