zzwqqq commented on code in PR #5301:
URL: https://github.com/apache/calcite/pull/5301#discussion_r4175605105
##########
core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java:
##########
@@ -4656,6 +4656,20 @@ private void
checkPushJoinThroughUnionOnRightDoesNotMatchSemiOrAntiJoin(JoinRelT
sql(sql).withPre(preProgram).withProgram(program).check();
}
+ @Test void testBushyJoinRuleSkipsFullOuterJoin() {
Review Comment:
Could you please add a comment referencing the jira above these test cases?
##########
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:
Does this rule rebuild all joins as INNER joins? If so, could you mention
this in the comment?
--
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]