Alex Behm has posted comments on this change.

Change subject: IMPALA-4470: Avoid creating a NumericLiteral from 
NaN/infinity/-0.
......................................................................


Patch Set 2:

(4 comments)

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

PS2, Line 39: BigDecmial
> typo: BigDecimal
Done


PS2, Line 39: A NumericLiteral is backed by a BigDecmial which cannot represent 
special float values
            :  * like NaN, infinity, or negative zero.
> I think you can move this to the comment section for value_.
Done


PS2, Line 123: 1.0 / v < 0
> Isn't that NEGATIVE_INFINITY? Seems like a stronger check.
Yes, but the first part of the condition is v == 0, so I think this will only 
match negative zero.


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

PS2, Line 1012: 1 / 0 --> Infinity
> Add something with -0?
Exercising that code path today is actually surprisingly difficult. We need to 
get into a path where we evaluate a constant float/double expr from the FE. I 
could add a separate test, but that one would likely become obsolete very soon 
when adding constant folding.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8243b2ee9fa9c470d078b385583f2f48b606a230
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <[email protected]>
Gerrit-Reviewer: Alex Behm <[email protected]>
Gerrit-Reviewer: Dimitris Tsirogiannis <[email protected]>
Gerrit-Reviewer: Marcel Kornacker <[email protected]>
Gerrit-HasComments: Yes

Reply via email to