impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "anujphadke (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-5145: Do not constant fold null in CastExprs
Date Tue, 18 Apr 2017 21:57:01 GMT
anujphadke has posted comments on this change.

Change subject: IMPALA-5145: Do not constant fold null in CastExprs
......................................................................


Patch Set 3:

(7 comments)

http://gerrit.cloudera.org:8080/#/c/6663/1//COMMIT_MSG
Commit Message:

Line 7: IMPALA-5145: Do not constant fold null in CastExprs
> extra space after IMPALA-5145, should be
Done


PS1, Line 9: auses 
> typo.
Done


Line 10: to fail. This regresses the observed behavior before constant folding
> This regresses the observed behavior before constant folding was introduced
Done


http://gerrit.cloudera.org:8080/#/c/6663/1/fe/src/main/java/org/apache/impala/rewrite/FoldConstantsRule.java
File fe/src/main/java/org/apache/impala/rewrite/FoldConstantsRule.java:

Line 20: import org.apache.impala.analysis.Analyzer;
> nit: remove extra line.
Done


Line 52:     if (expr.isLiteral() || !expr.isConstant()) return expr;
> ... because we cannot preserve the cast-to type and that can lead to query 
Done


Line 53: 
> space after if
Done


http://gerrit.cloudera.org:8080/#/c/6663/1/testdata/workloads/functional-query/queries/QueryTest/create-table-as-select.test
File testdata/workloads/functional-query/queries/QueryTest/create-table-as-select.test:

Line 187: # IMPALA-5145: Do not constant fold null in CastExprs
> Looks like that is not possible with the ImpalaTestCatalog()  codepath that
Yes, Moving the test here and it does not catch the issue(tried it with and without the new
change).


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia7aa1ab7f53a9dcc7560ded321a9d1e1ee2d18e3
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: anujphadke <aphadke@cloudera.com>
Gerrit-Reviewer: Alex Behm <alex.behm@cloudera.com>
Gerrit-Reviewer: Bharath Vissapragada <bharathv@cloudera.com>
Gerrit-Reviewer: anujphadke <aphadke@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message