Csaba Ringhofer has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/19124 )

Change subject: IMPALA-11462: Constant folding causes cast on literal to be lost
......................................................................


Patch Set 3:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/19124/3//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/19124/3//COMMIT_MSG@7
PS3, Line 7: IMPALA-11462: Constant folding causes cast on literal to be lost
"int literals" could be more exact


http://gerrit.cloudera.org:8080/#/c/19124/3/fe/src/main/java/org/apache/impala/analysis/LiteralExpr.java
File fe/src/main/java/org/apache/impala/analysis/LiteralExpr.java:

http://gerrit.cloudera.org:8080/#/c/19124/3/fe/src/main/java/org/apache/impala/analysis/LiteralExpr.java@201
PS3, Line 201: keepType
maybe keepOriginalIntType would be clearer?


http://gerrit.cloudera.org:8080/#/c/19124/3/tests/query_test/test_queries.py
File tests/query_test/test_queries.py:

http://gerrit.cloudera.org:8080/#/c/19124/3/tests/query_test/test_queries.py@385
PS3, Line 385: TestConstantFoldingNoTypeLoss
I think that test_exprs.py or expr-test.cc would be better for this test, as it 
is about expression handling, not more complex query behavior.


http://gerrit.cloudera.org:8080/#/c/19124/3/tests/query_test/test_queries.py@408
PS3, Line 408:     query_template = ("select shiftleft(cast(1 as {typename}), 
z) c "
idea for an extra test without inline view:
select typeof(cast(1 as bigint) + cast(rand() as tinyint));
Currently returns SMALLINT/BIGINT depending on whether expression rewrites are 
enabled.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie7f27b204792ef7c59dec5ead363d44ed0c3bc79
Gerrit-Change-Number: 19124
Gerrit-PatchSet: 3
Gerrit-Owner: Daniel Becker <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Daniel Becker <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Noemi Pap-Takacs <[email protected]>
Gerrit-Reviewer: Peter Rozsa <[email protected]>
Gerrit-Comment-Date: Wed, 19 Oct 2022 14:27:48 +0000
Gerrit-HasComments: Yes

Reply via email to