XieJiann commented on code in PR #34771:
URL: https://github.com/apache/doris/pull/34771#discussion_r1599298383


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/OrExpansion.java:
##########
@@ -73,63 +80,109 @@ public class OrExpansion extends OneExplorationRuleFactory 
{
             .build();
 
     @Override
-    public Rule build() {
-        return logicalJoin(any(), any()).when(JoinUtils::shouldNestedLoopJoin)
-                .whenNot(LogicalJoin::isMarkJoin)
-                .when(join -> supportJoinType.contains(join.getJoinType())
-                        && 
ConnectContext.get().getSessionVariable().getEnablePipelineEngine())
-                .thenApply(ctx -> {
-                    LogicalJoin<? extends Plan, ? extends Plan> join = 
ctx.root;
-                    
Preconditions.checkArgument(join.getHashJoinConjuncts().isEmpty(),
-                            "Only Expansion nest loop join without hashCond");
+    public Plan rewriteRoot(Plan plan, JobContext jobContext) {
+        OrExpandsionContext ctx = new OrExpandsionContext(
+                jobContext.getCascadesContext().getStatementContext(), 
jobContext.getCascadesContext());
+        if (!(plan instanceof LogicalResultSink)) {

Review Comment:
   fixed, add CTEAnchor above Sink



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to