ehds commented on code in PR #5301:
URL: https://github.com/apache/calcite/pull/5301#discussion_r4177107608


##########
core/src/main/java/org/apache/calcite/rel/rules/MultiJoinOptimizeBushyRule.java:
##########
@@ -104,16 +104,11 @@ public 
MultiJoinOptimizeBushyRule(RelFactories.JoinFactory joinFactory,
     final RelMetadataQuery mq = call.getMetadataQuery();
 
     final LoptMultiJoin multiJoin = new LoptMultiJoin(multiJoinRel);
-    for (int i = 0; i < multiJoin.getNumJoinFactors(); i++) {
-      ImmutableBitSet outerJoinFactors = multiJoin.getOuterJoinFactors(i);
-      if (outerJoinFactors == null) {
-        continue;
-      }
-      if (!outerJoinFactors.isEmpty()) {
-        // Refuse to apply this rule to a multijoin with outer joins,
-        // since this rule cannot handle outer joins.
-        return;
-      }
+
+    if (multiJoinRel.isFullOuterJoin() || multiJoinRel.containsOuter()) {
+      // Refuse to apply this rule to a multijoin with outer joins,

Review Comment:
   Yes. This rule rebuilds all join factors as INNER joins, so it cannot 
preserve outer-join semantics.



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