xiedeyantu commented on code in PR #4298:
URL: https://github.com/apache/calcite/pull/4298#discussion_r2040251440


##########
core/src/main/java/org/apache/calcite/rel/rules/MinusToAntiJoinRule.java:
##########
@@ -74,10 +74,17 @@ protected MinusToAntiJoinRule(Config config) {
       RelDataType leftFieldType = 
left.getRowType().getFieldList().get(i).getType();
       RelDataType rightFieldType = 
right.getRowType().getFieldList().get(i).getType();
 
-      conditions.add(
-          relBuilder.isNotDistinctFrom(
-              rexBuilder.makeInputRef(leftFieldType, i),
-              rexBuilder.makeInputRef(rightFieldType, i + fieldCount)));
+      if (!leftFieldType.isNullable() && !rightFieldType.isNullable()) {

Review Comment:
   I suddenly thought of a question. We need to judge whether it is `nullable` 
more precisely, so as to convert `is not distinct` from to `=`?



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