impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Behm (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-4470: Avoid creating a NumericLiteral from NaN/infinity/-0.
Date Tue, 15 Nov 2016 22:22:50 GMT
Alex Behm has posted comments on this change.

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

Patch Set 2:

File fe/src/main/java/org/apache/impala/analysis/

PS2, Line 39: BigDecmial
> typo: BigDecimal

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

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
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
To unsubscribe, visit

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

View raw message