rajendrag commented on code in PR #18673:
URL: https://github.com/apache/iceberg/pull/18673#discussion_r4463691111
##########
api/src/main/java/org/apache/iceberg/expressions/ResidualEvaluator.java:
##########
@@ -165,13 +165,15 @@ public <T> Expression notNaN(BoundReference<T> ref) {
@Override
public <T> Expression lt(BoundReference<T> ref, Literal<T> lit) {
Comparator<T> cmp = lit.comparator();
- return (cmp.compare(ref.eval(struct), lit.value()) < 0) ? alwaysTrue() :
alwaysFalse();
+ T value = ref.eval(struct);
+ return value != null && cmp.compare(value, lit.value()) < 0 ?
alwaysTrue() : alwaysFalse();
Review Comment:
Good callout. Addressed by adding rewriteNot and added the test coverage
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]