mihaibudiu commented on code in PR #4465:
URL: https://github.com/apache/calcite/pull/4465#discussion_r2414580137


##########
core/src/main/java/org/apache/calcite/plan/RelOptPredicateList.java:
##########
@@ -104,6 +108,36 @@ private RelOptPredicateList(ImmutableList<RexNode> 
pulledUpPredicates,
     this.rightInferredPredicates =
         requireNonNull(rightInferredPredicates, "rightInferredPredicates");
     this.constantMap = requireNonNull(constantMap, "constantMap");
+
+    // Validate invariants required
+    // (unfortunately the style rules don't allow us to move this to a 
separate function).
+    // Do not allow comparisons with null literals in pulledUpPredicates
+    for (RexNode predicate : this.pulledUpPredicates) {
+      switch (predicate.getKind()) {

Review Comment:
   I think we actually need to exclude IS_DISTINCT_FROM and it's negative 
counterpart.
   These will actually not always return FALSE when comparing with NULL.



-- 
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]

Reply via email to