tanclary commented on code in PR #3511:
URL: https://github.com/apache/calcite/pull/3511#discussion_r1397707587
##########
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:
It's fine to leave it I am just weary of adding similar nested `if` blocks.
If you don't think there is a way to improve it that is ok.
--
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]