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


##########
core/src/main/java/org/apache/calcite/rel/rules/IntersectToDistinctRule.java:
##########
@@ -206,6 +230,9 @@ public void onMatchAggregatePushdown(RelOptRuleCall call) {
     // Project all but the last field
     relBuilder.project(Util.skipLast(relBuilder.fields()));
 
+    // ensure the nullabilities of columns in the new relation match those of 
the input relation
+    relBuilder.convert(intersect.getRowType(), false);

Review Comment:
   I agree, it would be safer that way.



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