mihaibudiu commented on code in PR #4465:
URL: https://github.com/apache/calcite/pull/4465#discussion_r2208985053
##########
core/src/main/java/org/apache/calcite/rex/RexSimplify.java:
##########
@@ -645,6 +645,11 @@ private <C extends Comparable<C>> RexNode
simplifyComparison(RexCall e,
}
}
+ RexNode node = simplifyComparisonWithNull(e, unknownAs);
Review Comment:
This will make it much more cumbersome to use in the map() call above, over
a stream(). What is the benefit?
##########
core/src/main/java/org/apache/calcite/rex/RexSimplify.java:
##########
@@ -655,6 +660,28 @@ private <C extends Comparable<C>> RexNode
simplifyComparison(RexCall e,
return simplifyUsingPredicates(e2, clazz);
}
+ /**
+ * If this RexNode is a comparison against NULL, return a simplified form,
Review Comment:
Frankly, I'd rather leave this policy decision to the Comparison class. I
can mention it in the comment. E.g., what about `IS DISTINCT FROM`? We don't
really need to know here.
--
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]