Fredy Wijaya has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/11952 )

Change subject: IMPALA-7865: Repeated type widening of arithmetic expressions
......................................................................


Patch Set 2:

(10 comments)

http://gerrit.cloudera.org:8080/#/c/11952/2//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/11952/2//COMMIT_MSG@10
PS2, Line 10: substututing
typo: substituting


http://gerrit.cloudera.org:8080/#/c/11952/2/fe/src/main/java/org/apache/impala/analysis/ArithmeticExpr.java
File fe/src/main/java/org/apache/impala/analysis/ArithmeticExpr.java:

http://gerrit.cloudera.org:8080/#/c/11952/2/fe/src/main/java/org/apache/impala/analysis/ArithmeticExpr.java@185
PS2, Line 185: though
typo: through


http://gerrit.cloudera.org:8080/#/c/11952/2/fe/src/test/java/org/apache/impala/analysis/ExprRewriteRulesTest.java
File fe/src/test/java/org/apache/impala/analysis/ExprRewriteRulesTest.java:

http://gerrit.cloudera.org:8080/#/c/11952/2/fe/src/test/java/org/apache/impala/analysis/ExprRewriteRulesTest.java@704
PS2, Line 704: t
nit: use upper T to make it consistent the rest of the tests


http://gerrit.cloudera.org:8080/#/c/11952/2/fe/src/test/java/org/apache/impala/analysis/ExprRewriteRulesTest.java@710
PS2, Line 710:     // The following silliness is expected, if not wanted.
             :     // The rewriter cannot (yet) optimize trailing constants.
             :     // Types widen with each math operation.
             :     expr = RewritesOk("tinyint_col + 1 + 1",
             :         FoldConstantsRule.INSTANCE, null);
             :     assertEquals(ScalarType.INT, expr.getType());
             :     expr = RewritesOk("tinyint_col + 1 + 1 + 1",
             :         FoldConstantsRule.INSTANCE, null);
             :     assertEquals(ScalarType.BIGINT, expr.getType());
Is it not possible to get all expressions and figure out the highest type width 
it can fit? For example: tinyint_col + 1 + bigint_col will be BIGINT. 
tinyint_col + 1 + smallint_col will be SMALLINT, etc.


http://gerrit.cloudera.org:8080/#/c/11952/2/fe/src/test/java/org/apache/impala/analysis/ExprRewriterTest.java
File fe/src/test/java/org/apache/impala/analysis/ExprRewriterTest.java:

http://gerrit.cloudera.org:8080/#/c/11952/2/fe/src/test/java/org/apache/impala/analysis/ExprRewriterTest.java@242
PS2, Line 242:
nit: remove extra new line


http://gerrit.cloudera.org:8080/#/c/11952/2/fe/src/test/java/org/apache/impala/analysis/ExprRewriterTest.java@265
PS2, Line 265:
nit: remove extra new line


http://gerrit.cloudera.org:8080/#/c/11952/2/fe/src/test/java/org/apache/impala/analysis/ExprRewriterTest.java@299
PS2, Line 299:
nit: remove extra new line


http://gerrit.cloudera.org:8080/#/c/11952/2/fe/src/test/java/org/apache/impala/analysis/ExprRewriterTest.java@315
PS2, Line 315:
nit: remove extra new line


http://gerrit.cloudera.org:8080/#/c/11952/2/fe/src/test/java/org/apache/impala/analysis/ExprRewriterTest.java@331
PS2, Line 331:
nit: remove extra new line


http://gerrit.cloudera.org:8080/#/c/11952/2/testdata/workloads/functional-planner/queries/PlannerTest/predicate-propagation.test
File 
testdata/workloads/functional-planner/queries/PlannerTest/predicate-propagation.test:

http://gerrit.cloudera.org:8080/#/c/11952/2/testdata/workloads/functional-planner/queries/PlannerTest/predicate-propagation.test@59
PS2, Line 59: functional.alltypes.tinyint_col < 2
it's not quite clear to me why the order changed here.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3a8f6d1c508a289083b5e026f33581bc44117ca2
Gerrit-Change-Number: 11952
Gerrit-PatchSet: 2
Gerrit-Owner: Paul Rogers <[email protected]>
Gerrit-Reviewer: Fredy Wijaya <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Paul Rogers <[email protected]>
Gerrit-Comment-Date: Wed, 28 Nov 2018 17:29:04 +0000
Gerrit-HasComments: Yes

Reply via email to