You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by ja...@apache.org on 2023/05/15 04:32:02 UTC
[doris] branch master updated: [fix](Nereids): SemiJoinLogicalJoinTranspose shouldn't throw error when eliminate outer failed. (#19566)
This is an automated email from the ASF dual-hosted git repository.
jakevin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 69243b3a57 [fix](Nereids): SemiJoinLogicalJoinTranspose shouldn't throw error when eliminate outer failed. (#19566)
69243b3a57 is described below
commit 69243b3a57ef3b668e8361dd81120899dfcd88b7
Author: jakevin <ja...@gmail.com>
AuthorDate: Mon May 15 12:31:54 2023 +0800
[fix](Nereids): SemiJoinLogicalJoinTranspose shouldn't throw error when eliminate outer failed. (#19566)
---
.../rules/rewrite/logical/SemiJoinLogicalJoinTranspose.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/logical/SemiJoinLogicalJoinTranspose.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/logical/SemiJoinLogicalJoinTranspose.java
index 322fca06d1..c18be68787 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/logical/SemiJoinLogicalJoinTranspose.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/logical/SemiJoinLogicalJoinTranspose.java
@@ -27,8 +27,6 @@ import org.apache.doris.nereids.trees.plans.Plan;
import org.apache.doris.nereids.trees.plans.logical.LogicalJoin;
import org.apache.doris.qe.ConnectContext;
-import com.google.common.base.Preconditions;
-
import java.util.Set;
/**
@@ -69,8 +67,9 @@ public class SemiJoinLogicalJoinTranspose extends OneRewriteRuleFactory {
* A B A C
*/
// RIGHT_OUTER_JOIN should be eliminated in rewrite phase
- Preconditions.checkState(bottomJoin.getJoinType() != JoinType.RIGHT_OUTER_JOIN);
-
+ if (bottomJoin.getJoinType() == JoinType.RIGHT_OUTER_JOIN) {
+ return null;
+ }
Plan newBottomSemiJoin = topSemiJoin.withChildren(a, c);
return bottomJoin.withChildren(newBottomSemiJoin, b);
} else {
@@ -82,8 +81,9 @@ public class SemiJoinLogicalJoinTranspose extends OneRewriteRuleFactory {
* A B B C
*/
// LEFT_OUTER_JOIN should be eliminated in rewrite phase
- Preconditions.checkState(bottomJoin.getJoinType() != JoinType.LEFT_OUTER_JOIN);
-
+ if (bottomJoin.getJoinType() == JoinType.LEFT_OUTER_JOIN) {
+ return null;
+ }
Plan newBottomSemiJoin = topSemiJoin.withChildren(b, c);
return bottomJoin.withChildren(a, newBottomSemiJoin);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org