tanclary commented on code in PR #3511:
URL: https://github.com/apache/calcite/pull/3511#discussion_r1397516851
##########
linq4j/src/main/java/org/apache/calcite/linq4j/tree/ConstantExpression.java:
##########
@@ -118,7 +126,15 @@ private static ExpressionWriter write(ExpressionWriter
writer,
if (value instanceof BigDecimal) {
bigDecimal = (BigDecimal) value;
} else {
- bigDecimal = BigDecimal.valueOf((Double) value);
+ double d = (Double) value;
+ if (d == Double.POSITIVE_INFINITY) {
Review Comment:
I see that you're checking for `Double` and `Float`. I'd like to avoid
adding another level of nesting + adding two very similar logic blocks if
possible. Do you think a helper could help fix this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]