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


##########
core/src/main/java/org/apache/calcite/rel/rules/PruneEmptyRules.java:
##########
@@ -406,6 +406,9 @@ public interface UnionEmptyPruneRuleConfig extends 
PruneEmptyRule.Config {
               + RelOptUtil.toString(union);
           if (nonEmptyInputs == 0) {
             relBuilder.push(union).empty();
+          } else if (nonEmptyInputs == 1 && !union.all) {

Review Comment:
   If intersect contains two children, one is values(1) and the other is 
values(), then the result will be an empty set. This is another logic, and the 
original implementation is as expected.



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