From 97b033813ada6bdbb0ce7e5ae442fdf2da0accab Mon Sep 17 00:00:00 2001 From: morrySnow <101034200+morrySnow@users.noreply.github.com> Date: Fri, 15 Dec 2023 14:26:29 +0800 Subject: [PATCH] [perf](Nereids) add back canEliminate temporary (#28017) --- .../org/apache/doris/nereids/memo/Memo.java | 2 +- .../processor/post/RuntimeFilterContext.java | 2 +- .../rewrite/EliminateUnnecessaryProject.java | 56 +- .../nereids/rules/rewrite/MergeProjects.java | 3 +- .../trees/plans/logical/LogicalProject.java | 34 +- .../EliminateUnnecessaryProjectTest.java | 3 + .../eager_aggregate/basic.out | 74 +- .../eager_aggregate/basic_one_side.out | 68 +- .../push_down_filter_other_condition.out | 459 +++++------- .../infer_set_operator_distinct.out | 164 +++-- .../limit_push_down/limit_push_down.out | 28 +- .../limit_push_down/order_push_down.out | 47 +- .../predicate_infer/infer_predicate.out | 662 +++++++----------- ...push_down_top_n_distinct_through_union.out | 52 +- .../push_down_top_n_through_union.out | 52 +- .../nereids_ssb_shape_sf100_p0/shape/q2.1.out | 39 +- .../nereids_ssb_shape_sf100_p0/shape/q2.2.out | 39 +- .../nereids_ssb_shape_sf100_p0/shape/q2.3.out | 39 +- .../shape/query10.out | 73 +- .../shape/query16.out | 53 +- .../shape/query23.out | 92 +-- .../shape/query31.out | 48 +- .../shape/query35.out | 85 ++- .../shape/query38.out | 99 +-- .../shape/query51.out | 85 +-- .../shape/query53.out | 61 +- .../shape/query59.out | 19 +- .../shape/query87.out | 99 +-- .../shape/query94.out | 53 +- .../shape/query95.out | 59 +- .../noStatsRfPrune/query10.out | 75 +- .../noStatsRfPrune/query16.out | 57 +- .../noStatsRfPrune/query31.out | 48 +- .../noStatsRfPrune/query35.out | 77 +- .../noStatsRfPrune/query38.out | 87 +-- .../noStatsRfPrune/query51.out | 85 +-- .../noStatsRfPrune/query53.out | 57 +- .../noStatsRfPrune/query54.out | 4 +- .../noStatsRfPrune/query59.out | 19 +- .../noStatsRfPrune/query87.out | 87 +-- .../noStatsRfPrune/query94.out | 57 +- .../noStatsRfPrune/query95.out | 61 +- .../no_stats_shape/query10.out | 75 +- .../no_stats_shape/query16.out | 57 +- .../no_stats_shape/query31.out | 48 +- .../no_stats_shape/query35.out | 77 +- .../no_stats_shape/query38.out | 87 +-- .../no_stats_shape/query51.out | 85 +-- .../no_stats_shape/query53.out | 57 +- .../no_stats_shape/query54.out | 4 +- .../no_stats_shape/query59.out | 19 +- .../no_stats_shape/query87.out | 87 +-- .../no_stats_shape/query94.out | 57 +- .../no_stats_shape/query95.out | 59 +- .../rf_prune/query10.out | 73 +- .../rf_prune/query16.out | 61 +- .../rf_prune/query31.out | 48 +- .../rf_prune/query35.out | 85 ++- .../rf_prune/query38.out | 99 +-- .../rf_prune/query51.out | 85 +-- .../rf_prune/query53.out | 61 +- .../rf_prune/query54.out | 111 +-- .../rf_prune/query59.out | 19 +- .../rf_prune/query87.out | 99 +-- .../rf_prune/query94.out | 53 +- .../rf_prune/query95.out | 61 +- .../shape/query10.out | 73 +- .../shape/query16.out | 61 +- .../shape/query31.out | 48 +- .../shape/query35.out | 85 ++- .../shape/query38.out | 99 +-- .../shape/query51.out | 85 +-- .../shape/query53.out | 61 +- .../shape/query54.out | 111 +-- .../shape/query59.out | 19 +- .../shape/query87.out | 99 +-- .../shape/query94.out | 53 +- .../shape/query95.out | 59 +- .../nostats_rf_prune/q10.out | 45 +- .../nostats_rf_prune/q3.out | 33 +- .../rf_prune/q10.out | 41 +- .../rf_prune/q3.out | 33 +- .../shape/q10.out | 41 +- .../nereids_tpch_shape_sf1000_p0/shape/q3.out | 33 +- .../shape_no_stats/q10.out | 45 +- .../shape_no_stats/q3.out | 33 +- .../eager_aggregate/basic.groovy | 1 + .../eager_aggregate/basic_one_side.groovy | 1 + .../push_down_filter_other_condition.groovy | 1 + .../predicate_infer/infer_predicate.groovy | 2 + 90 files changed, 2979 insertions(+), 3113 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/memo/Memo.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/memo/Memo.java index 5b75cb2d76..2075badcb4 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/memo/Memo.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/memo/Memo.java @@ -120,7 +120,7 @@ public class Memo { private Plan skipProject(Plan plan, Group targetGroup) { // Some top project can't be eliminated - if (plan instanceof LogicalProject) { + if (plan instanceof LogicalProject && ((LogicalProject) plan).canEliminate()) { LogicalProject logicalProject = (LogicalProject) plan; if (targetGroup != root) { if (logicalProject.getOutputSet().equals(logicalProject.child().getOutputSet())) { diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RuntimeFilterContext.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RuntimeFilterContext.java index e986921d72..05467588f8 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RuntimeFilterContext.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RuntimeFilterContext.java @@ -129,7 +129,7 @@ public class RuntimeFilterContext { private final Map> cteToJoinsMap = Maps.newHashMap(); // cte candidates which can be pushed into common runtime filter into from outside - private final Map> cteRFPushDownMap = Maps.newHashMap(); + private final Map> cteRFPushDownMap = Maps.newLinkedHashMap(); private final Map cteProducerMap = Maps.newHashMap(); diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/EliminateUnnecessaryProject.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/EliminateUnnecessaryProject.java index 852c6f5ea2..adb355f94d 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/EliminateUnnecessaryProject.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/EliminateUnnecessaryProject.java @@ -23,6 +23,8 @@ import org.apache.doris.nereids.trees.expressions.StatementScopeIdGenerator; import org.apache.doris.nereids.trees.plans.Plan; import org.apache.doris.nereids.trees.plans.logical.LogicalEmptyRelation; import org.apache.doris.nereids.trees.plans.logical.LogicalProject; +import org.apache.doris.nereids.trees.plans.logical.LogicalSetOperation; +import org.apache.doris.nereids.trees.plans.logical.OutputSavePoint; import org.apache.doris.nereids.trees.plans.visitor.CustomRewriter; import java.util.ArrayList; @@ -37,34 +39,62 @@ public class EliminateUnnecessaryProject implements CustomRewriter { @Override public Plan rewriteRoot(Plan plan, JobContext jobContext) { - return rewrite(plan); + return rewrite(plan, false); } - private Plan rewrite(Plan plan) { - if (plan instanceof LogicalProject) { - return rewriteProject((LogicalProject) plan); + private Plan rewrite(Plan plan, boolean outputSavePoint) { + if (plan instanceof LogicalSetOperation) { + return rewriteLogicalSetOperation((LogicalSetOperation) plan, outputSavePoint); + } else if (plan instanceof LogicalProject) { + return rewriteProject((LogicalProject) plan, outputSavePoint); + } else if (plan instanceof OutputSavePoint) { + return rewriteChildren(plan, true); } else { - return rewriteChildren(plan); + return rewriteChildren(plan, outputSavePoint); } } - private Plan rewriteProject(LogicalProject project) { + private Plan rewriteProject(LogicalProject project, boolean outputSavePoint) { if (project.child() instanceof LogicalEmptyRelation) { // eliminate unnecessary project return new LogicalEmptyRelation(StatementScopeIdGenerator.newRelationId(), project.getProjects()); - } else if (project.getOutputSet().equals(project.child().getOutputSet())) { + } else if (project.canEliminate() && outputSavePoint + && project.getOutputSet().equals(project.child().getOutputSet())) { // eliminate unnecessary project - return rewrite(project.child()); + return rewrite(project.child(), outputSavePoint); + } else if (project.canEliminate() && project.getOutput().equals(project.child().getOutput())) { + // eliminate unnecessary project + return rewrite(project.child(), outputSavePoint); } else { - return rewriteChildren(project); + return rewriteChildren(project, true); } } - private Plan rewriteChildren(Plan plan) { + private Plan rewriteLogicalSetOperation(LogicalSetOperation set, boolean outputSavePoint) { + if (set.arity() == 2) { + Plan left = set.child(0); + Plan right = set.child(1); + boolean changed = false; + if (isCanEliminateProject(left)) { + changed = true; + left = ((LogicalProject) left).withEliminate(false); + } + if (isCanEliminateProject(right)) { + changed = true; + right = ((LogicalProject) right).withEliminate(false); + } + if (changed) { + set = (LogicalSetOperation) set.withChildren(left, right); + } + } + return rewriteChildren(set, outputSavePoint); + } + + private Plan rewriteChildren(Plan plan, boolean outputSavePoint) { List newChildren = new ArrayList<>(); boolean hasNewChildren = false; for (Plan child : plan.children()) { - Plan newChild = rewrite(child); + Plan newChild = rewrite(child, outputSavePoint); if (newChild != child) { hasNewChildren = true; } @@ -72,4 +102,8 @@ public class EliminateUnnecessaryProject implements CustomRewriter { } return hasNewChildren ? plan.withChildren(newChildren) : plan; } + + private static boolean isCanEliminateProject(Plan plan) { + return plan instanceof LogicalProject && ((LogicalProject) plan).canEliminate(); + } } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/MergeProjects.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/MergeProjects.java index 6452b4e0ba..d152178b52 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/MergeProjects.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/MergeProjects.java @@ -51,7 +51,8 @@ public class MergeProjects extends OneRewriteRuleFactory { public static Plan mergeProjects(LogicalProject project) { LogicalProject childProject = (LogicalProject) project.child(); List projectExpressions = project.mergeProjections(childProject); - return project.withProjectsAndChild(projectExpressions, childProject.child(0)); + LogicalProject newProject = childProject.canEliminate() ? project : childProject; + return newProject.withProjectsAndChild(projectExpressions, childProject.child(0)); } private boolean containsWindowExpression(List expressions) { diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalProject.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalProject.java index af2861ad19..5e7ffc1e81 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalProject.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalProject.java @@ -55,22 +55,29 @@ public class LogicalProject extends LogicalUnary projects; private final List excepts; private final boolean isDistinct; + private final boolean canEliminate; public LogicalProject(List projects, CHILD_TYPE child) { - this(projects, ImmutableList.of(), false, ImmutableList.of(child)); + this(projects, ImmutableList.of(), false, true, ImmutableList.of(child)); } public LogicalProject(List projects, List excepts, boolean isDistinct, List child) { - this(projects, excepts, isDistinct, Optional.empty(), Optional.empty(), child); + this(projects, excepts, isDistinct, true, Optional.empty(), Optional.empty(), child); } public LogicalProject(List projects, List excepts, boolean isDistinct, Plan child) { - this(projects, excepts, isDistinct, Optional.empty(), Optional.empty(), ImmutableList.of(child)); + this(projects, excepts, isDistinct, true, Optional.empty(), Optional.empty(), ImmutableList.of(child)); + } + + private LogicalProject(List projects, List excepts, + boolean isDistinct, boolean canEliminate, List child) { + this(projects, excepts, isDistinct, canEliminate, Optional.empty(), Optional.empty(), child); } private LogicalProject(List projects, List excepts, boolean isDistinct, + boolean canEliminate, Optional groupExpression, Optional logicalProperties, List child) { super(PlanType.LOGICAL_PROJECT, groupExpression, logicalProperties, child); @@ -84,6 +91,7 @@ public class LogicalProject extends LogicalUnary extends LogicalUnary withChildren(List children) { Preconditions.checkArgument(children.size() == 1); - return new LogicalProject<>(projects, excepts, isDistinct, ImmutableList.copyOf(children)); + return new LogicalProject<>(projects, excepts, isDistinct, canEliminate, ImmutableList.copyOf(children)); } @Override public LogicalProject withGroupExpression(Optional groupExpression) { - return new LogicalProject<>(projects, excepts, isDistinct, + return new LogicalProject<>(projects, excepts, isDistinct, canEliminate, groupExpression, Optional.of(getLogicalProperties()), children); } @@ -170,22 +178,30 @@ public class LogicalProject extends LogicalUnary groupExpression, Optional logicalProperties, List children) { Preconditions.checkArgument(children.size() == 1); - return new LogicalProject<>(projects, excepts, isDistinct, + return new LogicalProject<>(projects, excepts, isDistinct, canEliminate, groupExpression, logicalProperties, children); } + public LogicalProject withEliminate(boolean isEliminate) { + return new LogicalProject<>(projects, excepts, isDistinct, isEliminate, children); + } + public LogicalProject withProjects(List projects) { - return new LogicalProject<>(projects, excepts, isDistinct, children); + return new LogicalProject<>(projects, excepts, isDistinct, canEliminate, children); } public LogicalProject withProjectsAndChild(List projects, Plan child) { - return new LogicalProject<>(projects, excepts, isDistinct, ImmutableList.of(child)); + return new LogicalProject<>(projects, excepts, isDistinct, canEliminate, ImmutableList.of(child)); } public boolean isDistinct() { return isDistinct; } + public boolean canEliminate() { + return canEliminate; + } + @Override public List getOutputs() { return projects; diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/EliminateUnnecessaryProjectTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/EliminateUnnecessaryProjectTest.java index 15eccdd8f2..4e1c127bac 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/EliminateUnnecessaryProjectTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/EliminateUnnecessaryProjectTest.java @@ -31,6 +31,7 @@ import org.apache.doris.nereids.util.PlanConstructor; import org.apache.doris.utframe.TestWithFeService; import com.google.common.collect.ImmutableList; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; /** @@ -52,6 +53,7 @@ class EliminateUnnecessaryProjectTest extends TestWithFeService implements MemoP + ");"); } + @Disabled("enable this case when we remove canEliminate on LogicalProject again") @Test void testEliminateNonTopUnnecessaryProject() { LogicalPlan unnecessaryProject = new LogicalPlanBuilder(PlanConstructor.newLogicalOlapScan(0, "t1", 0)) @@ -75,6 +77,7 @@ class EliminateUnnecessaryProjectTest extends TestWithFeService implements MemoP .matchesFromRoot(logicalOlapScan()); } + @Disabled("enable this case when we remove canEliminate on LogicalProject again") @Test void testEliminateTopProjectWhenOutputNotEquals() { LogicalPlan necessaryProject = new LogicalPlanBuilder(PlanConstructor.newLogicalOlapScan(0, "t1", 0)) diff --git a/regression-test/data/nereids_rules_p0/eager_aggregate/basic.out b/regression-test/data/nereids_rules_p0/eager_aggregate/basic.out index c85ab935d7..1fb129bcaf 100644 --- a/regression-test/data/nereids_rules_p0/eager_aggregate/basic.out +++ b/regression-test/data/nereids_rules_p0/eager_aggregate/basic.out @@ -1,63 +1,43 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !1 -- PhysicalResultSink ---PhysicalDistribute -----hashAgg[GLOBAL] -------PhysicalDistribute +--hashAgg[GLOBAL] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() build RFs:RF0 device_id->[device_id] --------hashAgg[LOCAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() build RFs:RF0 device_id->[device_id] ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------filter((a.event_id = 'ad_click')) ---------------------PhysicalOlapScan[com_dd_library] apply RFs: RF0 ---------------PhysicalDistribute -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------filter((cast(experiment_id as DOUBLE) = 37)) -----------------------PhysicalOlapScan[shunt_log_com_dd_library] +----------filter((a.event_id = 'ad_click')) +------------PhysicalOlapScan[com_dd_library] apply RFs: RF0 +--------hashAgg[LOCAL] +----------filter((cast(experiment_id as DOUBLE) = 37)) +------------PhysicalOlapScan[shunt_log_com_dd_library] -- !2 -- PhysicalResultSink ---PhysicalDistribute -----hashAgg[GLOBAL] -------PhysicalDistribute +--hashAgg[GLOBAL] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() build RFs:RF0 device_id->[device_id] --------hashAgg[LOCAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() build RFs:RF0 device_id->[device_id] ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------PhysicalOlapScan[com_dd_library] apply RFs: RF0 ---------------PhysicalDistribute -----------------hashAgg[LOCAL] -------------------filter((cast(experiment_id as DOUBLE) = 73)) ---------------------PhysicalOlapScan[shunt_log_com_dd_library] +----------PhysicalOlapScan[com_dd_library] apply RFs: RF0 +--------hashAgg[LOCAL] +----------filter((cast(experiment_id as DOUBLE) = 73)) +------------PhysicalOlapScan[shunt_log_com_dd_library] -- !3 -- PhysicalResultSink ---PhysicalDistribute -----hashAgg[GLOBAL] -------PhysicalDistribute ---------hashAgg[LOCAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() build RFs:RF0 device_id->[device_id] ---------------PhysicalOlapScan[com_dd_library] apply RFs: RF0 ---------------PhysicalDistribute -----------------filter((cast(experiment_id as DOUBLE) = 73)) -------------------PhysicalOlapScan[shunt_log_com_dd_library] +--hashAgg[GLOBAL] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() build RFs:RF0 device_id->[device_id] +--------PhysicalOlapScan[com_dd_library] apply RFs: RF0 +--------filter((cast(experiment_id as DOUBLE) = 73)) +----------PhysicalOlapScan[shunt_log_com_dd_library] -- !4 -- PhysicalResultSink ---PhysicalDistribute -----hashAgg[GLOBAL] -------PhysicalDistribute +--hashAgg[GLOBAL] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() --------hashAgg[LOCAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------PhysicalOlapScan[com_dd_library] ---------------PhysicalDistribute -----------------hashAgg[LOCAL] -------------------PhysicalOlapScan[shunt_log_com_dd_library] +----------PhysicalOlapScan[com_dd_library] +--------hashAgg[LOCAL] +----------PhysicalOlapScan[shunt_log_com_dd_library] diff --git a/regression-test/data/nereids_rules_p0/eager_aggregate/basic_one_side.out b/regression-test/data/nereids_rules_p0/eager_aggregate/basic_one_side.out index 7d99f92434..dac93a7105 100644 --- a/regression-test/data/nereids_rules_p0/eager_aggregate/basic_one_side.out +++ b/regression-test/data/nereids_rules_p0/eager_aggregate/basic_one_side.out @@ -1,60 +1,40 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !1 -- PhysicalResultSink ---PhysicalDistribute -----hashAgg[GLOBAL] -------PhysicalDistribute +--hashAgg[GLOBAL] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() build RFs:RF0 device_id->[device_id] --------hashAgg[LOCAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() build RFs:RF0 device_id->[device_id] ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------filter((a.event_id = 'ad_click')) ---------------------PhysicalOlapScan[com_dd_library_one_side] apply RFs: RF0 ---------------PhysicalDistribute -----------------PhysicalProject -------------------filter((cast(experiment_id as DOUBLE) = 37)) ---------------------PhysicalOlapScan[shunt_log_com_dd_library_one_side] +----------filter((a.event_id = 'ad_click')) +------------PhysicalOlapScan[com_dd_library_one_side] apply RFs: RF0 +--------filter((cast(experiment_id as DOUBLE) = 37)) +----------PhysicalOlapScan[shunt_log_com_dd_library_one_side] -- !2 -- PhysicalResultSink ---PhysicalDistribute -----hashAgg[GLOBAL] -------PhysicalDistribute +--hashAgg[GLOBAL] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() build RFs:RF0 device_id->[device_id] --------hashAgg[LOCAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() build RFs:RF0 device_id->[device_id] ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------PhysicalOlapScan[com_dd_library_one_side] apply RFs: RF0 ---------------PhysicalDistribute -----------------filter((cast(experiment_id as DOUBLE) = 73)) -------------------PhysicalOlapScan[shunt_log_com_dd_library_one_side] +----------PhysicalOlapScan[com_dd_library_one_side] apply RFs: RF0 +--------filter((cast(experiment_id as DOUBLE) = 73)) +----------PhysicalOlapScan[shunt_log_com_dd_library_one_side] -- !3 -- PhysicalResultSink ---PhysicalDistribute -----hashAgg[GLOBAL] -------PhysicalDistribute ---------hashAgg[LOCAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() build RFs:RF0 device_id->[device_id] ---------------PhysicalOlapScan[com_dd_library_one_side] apply RFs: RF0 ---------------PhysicalDistribute -----------------filter((cast(experiment_id as DOUBLE) = 73)) -------------------PhysicalOlapScan[shunt_log_com_dd_library_one_side] +--hashAgg[GLOBAL] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() build RFs:RF0 device_id->[device_id] +--------PhysicalOlapScan[com_dd_library_one_side] apply RFs: RF0 +--------filter((cast(experiment_id as DOUBLE) = 73)) +----------PhysicalOlapScan[shunt_log_com_dd_library_one_side] -- !4 -- PhysicalResultSink ---PhysicalDistribute -----hashAgg[GLOBAL] -------PhysicalDistribute +--hashAgg[GLOBAL] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() --------hashAgg[LOCAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------PhysicalOlapScan[com_dd_library_one_side] ---------------PhysicalDistribute -----------------PhysicalOlapScan[shunt_log_com_dd_library_one_side] +----------PhysicalOlapScan[com_dd_library_one_side] +--------PhysicalOlapScan[shunt_log_com_dd_library_one_side] diff --git a/regression-test/data/nereids_rules_p0/filter_push_down/push_down_filter_other_condition.out b/regression-test/data/nereids_rules_p0/filter_push_down/push_down_filter_other_condition.out index 00ddcd48c5..f0ba5cc35d 100644 --- a/regression-test/data/nereids_rules_p0/filter_push_down/push_down_filter_other_condition.out +++ b/regression-test/data/nereids_rules_p0/filter_push_down/push_down_filter_other_condition.out @@ -1,382 +1,253 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !pushdown_inner_join -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------filter((t1.id > 1)) -----------PhysicalOlapScan[t1] apply RFs: RF0 ---------PhysicalDistribute -----------filter((t2.id > 1)) -------------PhysicalOlapScan[t2] +--hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +----filter((t1.id > 1)) +------PhysicalOlapScan[t1] apply RFs: RF0 +----filter((t2.id > 1)) +------PhysicalOlapScan[t2] -- !pushdown_left_semi_join -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------filter((t1.id > 1)) -----------PhysicalOlapScan[t1] apply RFs: RF0 ---------PhysicalDistribute -----------PhysicalProject -------------filter((t2.id > 1)) ---------------PhysicalOlapScan[t2] +--hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +----filter((t1.id > 1)) +------PhysicalOlapScan[t1] apply RFs: RF0 +----filter((t2.id > 1)) +------PhysicalOlapScan[t2] -- !pushdown_right_semi_join -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalProject -----------filter((t1.id > 1)) -------------PhysicalOlapScan[t1] apply RFs: RF0 ---------PhysicalDistribute -----------filter((t2.id > 1)) -------------PhysicalOlapScan[t2] +--hashJoin[RIGHT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +----filter((t1.id > 1)) +------PhysicalOlapScan[t1] apply RFs: RF0 +----filter((t2.id > 1)) +------PhysicalOlapScan[t2] -- !pushdown_left_outer_join -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.id > 1)) ---------PhysicalOlapScan[t1] ---------PhysicalDistribute -----------filter((t2.id > 1)) -------------PhysicalOlapScan[t2] +--hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.id > 1)) +----PhysicalOlapScan[t1] +----filter((t2.id > 1)) +------PhysicalOlapScan[t2] -- !pushdown_right_outer_join -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalDistribute -----------filter((t1.id > 1)) -------------PhysicalOlapScan[t1] ---------PhysicalDistribute -----------PhysicalOlapScan[t2] +--hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----filter((t1.id > 1)) +------PhysicalOlapScan[t1] +----PhysicalOlapScan[t2] -- !pushdown_full_outer_join -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.id > 1)) ---------PhysicalDistribute -----------PhysicalOlapScan[t1] ---------PhysicalDistribute -----------PhysicalOlapScan[t2] +--hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.id > 1)) +----PhysicalOlapScan[t1] +----PhysicalOlapScan[t2] -- !pushdown_left_anti_join -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.id > 1)) ---------PhysicalOlapScan[t1] ---------PhysicalDistribute -----------PhysicalProject -------------filter((t2.id > 1)) ---------------PhysicalOlapScan[t2] +--hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.id > 1)) +----PhysicalOlapScan[t1] +----filter((t2.id > 1)) +------PhysicalOlapScan[t2] -- !pushdown_right_anti_join -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalDistribute -----------PhysicalProject -------------filter((t1.id > 1)) ---------------PhysicalOlapScan[t1] ---------PhysicalDistribute -----------PhysicalOlapScan[t2] +--hashJoin[RIGHT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----filter((t1.id > 1)) +------PhysicalOlapScan[t1] +----PhysicalOlapScan[t2] -- !pushdown_cross_join -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------filter((t1.id > 1)) -----------PhysicalOlapScan[t1] apply RFs: RF0 ---------PhysicalDistribute -----------filter((t2.id > 1)) -------------PhysicalOlapScan[t2] +--hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +----filter((t1.id > 1)) +------PhysicalOlapScan[t1] apply RFs: RF0 +----filter((t2.id > 1)) +------PhysicalOlapScan[t2] -- !pushdown_inner_join_combined -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -----------filter((t1.id < 10) and (t1.id > 1)) -------------PhysicalOlapScan[t1] apply RFs: RF0 -----------PhysicalDistribute -------------filter((t2.id < 10) and (t2.id > 1)) ---------------PhysicalOlapScan[t2] apply RFs: RF1 ---------PhysicalDistribute -----------filter((t3.id < 10) and (t3.id > 1)) -------------PhysicalOlapScan[t3] +--hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------filter((t1.id < 10) and (t1.id > 1)) +--------PhysicalOlapScan[t1] apply RFs: RF0 +------filter((t2.id < 10) and (t2.id > 1)) +--------PhysicalOlapScan[t2] apply RFs: RF1 +----filter((t3.id < 10) and (t3.id > 1)) +------PhysicalOlapScan[t3] -- !pushdown_left_semi_join_combined -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] ---------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -----------filter((t1.id < 10) and (t1.id > 1)) -------------PhysicalOlapScan[t1] apply RFs: RF0 RF1 -----------PhysicalDistribute -------------PhysicalProject ---------------filter((t2.id < 10) and (t2.id > 1)) -----------------PhysicalOlapScan[t2] ---------PhysicalDistribute -----------filter((t3.id < 10) and (t3.id > 1)) -------------PhysicalOlapScan[t3] +--hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] +----hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------filter((t1.id < 10) and (t1.id > 1)) +--------PhysicalOlapScan[t1] apply RFs: RF0 RF1 +------filter((t2.id < 10) and (t2.id > 1)) +--------PhysicalOlapScan[t2] +----filter((t3.id < 10) and (t3.id > 1)) +------PhysicalOlapScan[t3] -- !pushdown_right_semi_join_combined -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] ---------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -----------PhysicalProject -------------filter((t1.id < 10) and (t1.id > 1)) ---------------PhysicalOlapScan[t1] apply RFs: RF0 -----------PhysicalDistribute -------------filter((t2.id < 10) and (t2.id > 1)) ---------------PhysicalOlapScan[t2] apply RFs: RF1 ---------PhysicalDistribute -----------filter((t3.id < 10) and (t3.id > 1)) -------------PhysicalOlapScan[t3] +--hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] +----hashJoin[RIGHT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------filter((t1.id < 10) and (t1.id > 1)) +--------PhysicalOlapScan[t1] apply RFs: RF0 +------filter((t2.id < 10) and (t2.id > 1)) +--------PhysicalOlapScan[t2] apply RFs: RF1 +----filter((t3.id < 10) and (t3.id > 1)) +------PhysicalOlapScan[t3] -- !pushdown_left_outer_join_combined -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -----------filter((t1.id < 10) and (t1.id > 1)) -------------PhysicalOlapScan[t1] apply RFs: RF0 -----------PhysicalDistribute -------------filter((t2.id < 10) and (t2.id > 1)) ---------------PhysicalOlapScan[t2] apply RFs: RF1 ---------PhysicalDistribute -----------filter((t3.id < 10) and (t3.id > 1)) -------------PhysicalOlapScan[t3] +--hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------filter((t1.id < 10) and (t1.id > 1)) +--------PhysicalOlapScan[t1] apply RFs: RF0 +------filter((t2.id < 10) and (t2.id > 1)) +--------PhysicalOlapScan[t2] apply RFs: RF1 +----filter((t3.id < 10) and (t3.id > 1)) +------PhysicalOlapScan[t3] -- !pushdown_right_outer_join_combined -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] ---------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -----------PhysicalDistribute -------------filter((t1.id < 10) and (t1.id > 1)) ---------------PhysicalOlapScan[t1] apply RFs: RF0 -----------PhysicalDistribute -------------filter((t2.id < 10)) ---------------PhysicalOlapScan[t2] apply RFs: RF1 ---------PhysicalDistribute -----------filter((t3.id < 10)) -------------PhysicalOlapScan[t3] +--hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] +----hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------filter((t1.id < 10) and (t1.id > 1)) +--------PhysicalOlapScan[t1] apply RFs: RF0 +------filter((t2.id < 10)) +--------PhysicalOlapScan[t2] apply RFs: RF1 +----filter((t3.id < 10)) +------PhysicalOlapScan[t3] -- !pushdown_full_outer_join_combined -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] ---------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -----------PhysicalDistribute -------------filter((t1.id < 10) and (t1.id > 1)) ---------------PhysicalOlapScan[t1] apply RFs: RF0 -----------PhysicalDistribute -------------filter((t2.id < 10)) ---------------PhysicalOlapScan[t2] apply RFs: RF1 ---------PhysicalDistribute -----------filter((t3.id < 10)) -------------PhysicalOlapScan[t3] +--hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] +----hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------filter((t1.id < 10) and (t1.id > 1)) +--------PhysicalOlapScan[t1] apply RFs: RF0 +------filter((t2.id < 10)) +--------PhysicalOlapScan[t2] apply RFs: RF1 +----filter((t3.id < 10)) +------PhysicalOlapScan[t3] -- !pushdown_left_anti_join_combined -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF0 id->[id] ---------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.id > 1)) -----------filter((t1.id < 10)) -------------PhysicalOlapScan[t1] apply RFs: RF0 -----------PhysicalDistribute -------------PhysicalProject ---------------filter((t2.id < 10) and (t2.id > 1)) -----------------PhysicalOlapScan[t2] ---------PhysicalDistribute -----------filter((t3.id < 10)) -------------PhysicalOlapScan[t3] +--hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF0 id->[id] +----hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.id > 1)) +------filter((t1.id < 10)) +--------PhysicalOlapScan[t1] apply RFs: RF0 +------filter((t2.id < 10) and (t2.id > 1)) +--------PhysicalOlapScan[t2] +----filter((t3.id < 10)) +------PhysicalOlapScan[t3] -- !pushdown_right_anti_join_combined -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] ---------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -----------PhysicalDistribute -------------PhysicalProject ---------------filter((t1.id < 10) and (t1.id > 1)) -----------------PhysicalOlapScan[t1] apply RFs: RF0 -----------PhysicalDistribute -------------filter((t2.id < 10)) ---------------PhysicalOlapScan[t2] apply RFs: RF1 ---------PhysicalDistribute -----------filter((t3.id < 10)) -------------PhysicalOlapScan[t3] +--hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] +----hashJoin[RIGHT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------filter((t1.id < 10) and (t1.id > 1)) +--------PhysicalOlapScan[t1] apply RFs: RF0 +------filter((t2.id < 10)) +--------PhysicalOlapScan[t2] apply RFs: RF1 +----filter((t3.id < 10)) +------PhysicalOlapScan[t3] -- !pushdown_cross_join_combined -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalDistribute -----------NestedLoopJoin[CROSS_JOIN] -------------PhysicalOlapScan[t1] -------------PhysicalDistribute ---------------filter((t2.id < 10)) -----------------PhysicalOlapScan[t2] apply RFs: RF0 ---------PhysicalDistribute -----------filter((t3.id < 10)) -------------PhysicalOlapScan[t3] +--hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF0 id->[id] +----NestedLoopJoin[CROSS_JOIN] +------PhysicalOlapScan[t1] +------filter((t2.id < 10)) +--------PhysicalOlapScan[t2] apply RFs: RF0 +----filter((t3.id < 10)) +------PhysicalOlapScan[t3] -- !pushdown_null_aware_anti_join_combined -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[NULL_AWARE_LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[t1] ---------PhysicalDistribute -----------PhysicalProject -------------filter((t2.id > 0)) ---------------PhysicalOlapScan[t2] +--hashJoin[NULL_AWARE_LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----PhysicalOlapScan[t1] +----filter((t2.id > 0)) +------PhysicalOlapScan[t2] -- !pushdown_inner_join_subquery -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((expr_cast(id as BIGINT) = sum(id))) otherCondition=() build RFs:RF0 sum(id)->[id] ---------PhysicalDistribute -----------PhysicalProject -------------filter((cast(id as BIGINT) = 1) and (t1.id = 1)) ---------------PhysicalOlapScan[t1] apply RFs: RF0 ---------PhysicalDistribute -----------filter((sum(id) = 1)) -------------hashAgg[GLOBAL] ---------------PhysicalDistribute -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------PhysicalOlapScan[t2] +--hashJoin[INNER_JOIN] hashCondition=((expr_cast(id as BIGINT) = sum(id))) otherCondition=() build RFs:RF0 sum(id)->[id] +----filter((cast(id as BIGINT) = 1) and (t1.id = 1)) +------PhysicalOlapScan[t1] apply RFs: RF0 +----filter((sum(id) = 1)) +------hashAgg[GLOBAL] +--------hashAgg[LOCAL] +----------PhysicalOlapScan[t2] -- !pushdown_left_semi_join_subquery -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------filter((t1.id > 1)) -----------PhysicalOlapScan[t1] apply RFs: RF0 ---------PhysicalDistribute -----------PhysicalProject -------------filter((t2.id > 1)) ---------------PhysicalOlapScan[t2] +--hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +----filter((t1.id > 1)) +------PhysicalOlapScan[t1] apply RFs: RF0 +----filter((t2.id > 1)) +------PhysicalOlapScan[t2] -- !pushdown_left_outer_join_subquery -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------filter(((cast(id as BIGINT) = sum(id)) OR id IS NULL)) ---------NestedLoopJoin[LEFT_OUTER_JOIN](t1.id = 1) -----------PhysicalOlapScan[t1] -----------PhysicalDistribute -------------hashAgg[GLOBAL] ---------------PhysicalDistribute -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------PhysicalOlapScan[t2] +--filter(((cast(id as BIGINT) = sum(id)) OR id IS NULL)) +----NestedLoopJoin[LEFT_OUTER_JOIN](t1.id = 1) +------PhysicalOlapScan[t1] +------hashAgg[GLOBAL] +--------hashAgg[LOCAL] +----------PhysicalOlapScan[t2] -- !pushdown_left_anti_join_subquery -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------NestedLoopJoin[LEFT_ANTI_JOIN](((t1.id = t2.id) OR id IS NULL) OR id IS NULL)(t1.id > 1) ---------PhysicalOlapScan[t1] ---------PhysicalDistribute -----------PhysicalProject -------------PhysicalOlapScan[t2] +--NestedLoopJoin[LEFT_ANTI_JOIN](((t1.id = t2.id) OR id IS NULL) OR id IS NULL)(t1.id > 1) +----PhysicalOlapScan[t1] +----PhysicalOlapScan[t2] -- !pushdown_cross_subquery -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------NestedLoopJoin[LEFT_SEMI_JOIN] ---------filter((t1.id > 1)) -----------PhysicalOlapScan[t1] ---------PhysicalDistribute -----------PhysicalProject -------------PhysicalOlapScan[t2] +--NestedLoopJoin[LEFT_SEMI_JOIN] +----filter((t1.id > 1)) +------PhysicalOlapScan[t1] +----PhysicalOlapScan[t2] -- !pushdown_inner_join_subquery_outer -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------filter((t1.id > 1)) -----------PhysicalOlapScan[t1] apply RFs: RF0 ---------PhysicalDistribute -----------filter((t2.id > 1)) -------------PhysicalAssertNumRows ---------------PhysicalDistribute -----------------PhysicalProject -------------------PhysicalOlapScan[t2] +--hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +----filter((t1.id > 1)) +------PhysicalOlapScan[t1] apply RFs: RF0 +----filter((t2.id > 1)) +------PhysicalAssertNumRows +--------PhysicalOlapScan[t2] -- !pushdown_left_semi_join_subquery_outer -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------filter((t1.id > 1)) -----------PhysicalOlapScan[t1] apply RFs: RF0 ---------PhysicalDistribute -----------PhysicalProject -------------filter((t2.id > 1)) ---------------PhysicalOlapScan[t2] +--hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +----filter((t1.id > 1)) +------PhysicalOlapScan[t1] apply RFs: RF0 +----filter((t2.id > 1)) +------PhysicalOlapScan[t2] -- !pushdown_left_outer_join_subquery_outer -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------NestedLoopJoin[INNER_JOIN]((t1.id = t2.id) OR (id IS NULL AND (t1.id > 1))) ---------PhysicalOlapScan[t1] ---------PhysicalDistribute -----------PhysicalAssertNumRows -------------PhysicalDistribute ---------------PhysicalProject -----------------PhysicalOlapScan[t2] +--NestedLoopJoin[INNER_JOIN]((t1.id = t2.id) OR (id IS NULL AND (t1.id > 1))) +----PhysicalOlapScan[t1] +----PhysicalAssertNumRows +------PhysicalOlapScan[t2] -- !pushdown_left_anti_join_subquery_outer -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[NULL_AWARE_LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------filter((t1.id > 1)) -----------PhysicalOlapScan[t1] ---------PhysicalDistribute -----------PhysicalProject -------------filter((t2.id > 1)) ---------------PhysicalOlapScan[t2] +--hashJoin[NULL_AWARE_LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----filter((t1.id > 1)) +------PhysicalOlapScan[t1] +----filter((t2.id > 1)) +------PhysicalOlapScan[t2] -- !pushdown_cross_join_subquery_outer -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------NestedLoopJoin[CROSS_JOIN] ---------filter((t1.id > 1)) -----------PhysicalOlapScan[t1] ---------PhysicalDistribute -----------PhysicalLimit[GLOBAL] -------------PhysicalDistribute ---------------PhysicalLimit[LOCAL] -----------------PhysicalProject -------------------PhysicalOlapScan[t2] +--NestedLoopJoin[CROSS_JOIN] +----filter((t1.id > 1)) +------PhysicalOlapScan[t1] +----PhysicalLimit[GLOBAL] +------PhysicalLimit[LOCAL] +--------PhysicalOlapScan[t2] diff --git a/regression-test/data/nereids_rules_p0/infer_set_operator_distinct/infer_set_operator_distinct.out b/regression-test/data/nereids_rules_p0/infer_set_operator_distinct/infer_set_operator_distinct.out index ecd234e1fc..74018f96d5 100644 --- a/regression-test/data/nereids_rules_p0/infer_set_operator_distinct/infer_set_operator_distinct.out +++ b/regression-test/data/nereids_rules_p0/infer_set_operator_distinct/infer_set_operator_distinct.out @@ -7,9 +7,11 @@ PhysicalResultSink --------hashAgg[LOCAL] ----------PhysicalUnion ------------PhysicalDistribute ---------------PhysicalOlapScan[t1] +--------------PhysicalProject +----------------PhysicalOlapScan[t1] ------------PhysicalDistribute ---------------PhysicalOlapScan[t2] +--------------PhysicalProject +----------------PhysicalOlapScan[t2] -- !union_complex_conditions -- PhysicalResultSink @@ -19,11 +21,13 @@ PhysicalResultSink --------hashAgg[LOCAL] ----------PhysicalUnion ------------PhysicalDistribute ---------------filter((t1.score > 10)) -----------------PhysicalOlapScan[t1] +--------------PhysicalProject +----------------filter((t1.score > 10)) +------------------PhysicalOlapScan[t1] ------------PhysicalDistribute ---------------filter((t2.name = 'Test')) -----------------PhysicalOlapScan[t2] +--------------PhysicalProject +----------------filter((t2.name = 'Test')) +------------------PhysicalOlapScan[t2] -- !multi_union -- PhysicalResultSink @@ -33,51 +37,61 @@ PhysicalResultSink --------hashAgg[LOCAL] ----------PhysicalUnion ------------PhysicalDistribute ---------------PhysicalOlapScan[t1] +--------------PhysicalProject +----------------PhysicalOlapScan[t1] ------------PhysicalDistribute ---------------PhysicalOlapScan[t2] +--------------PhysicalProject +----------------PhysicalOlapScan[t2] ------------PhysicalDistribute ---------------PhysicalOlapScan[t3] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] -- !except_distinct -- PhysicalResultSink --PhysicalDistribute ----PhysicalExcept ------PhysicalDistribute ---------PhysicalOlapScan[t1] +--------PhysicalProject +----------PhysicalOlapScan[t1] ------PhysicalDistribute ---------PhysicalOlapScan[t2] +--------PhysicalProject +----------PhysicalOlapScan[t2] -- !except_with_filter -- PhysicalResultSink --PhysicalDistribute ----PhysicalExcept ------PhysicalDistribute ---------filter((t1.id > 100)) -----------PhysicalOlapScan[t1] +--------PhysicalProject +----------filter((t1.id > 100)) +------------PhysicalOlapScan[t1] ------PhysicalDistribute ---------filter((t2.id < 50)) -----------PhysicalOlapScan[t2] +--------PhysicalProject +----------filter((t2.id < 50)) +------------PhysicalOlapScan[t2] -- !intersect_distinct -- PhysicalResultSink --PhysicalDistribute ----PhysicalIntersect ------PhysicalDistribute ---------PhysicalOlapScan[t1] +--------PhysicalProject +----------PhysicalOlapScan[t1] ------PhysicalDistribute ---------PhysicalOlapScan[t2] +--------PhysicalProject +----------PhysicalOlapScan[t2] -- !intersect_with_aggregate -- PhysicalResultSink --PhysicalDistribute ----PhysicalIntersect ------PhysicalDistribute ---------hashAgg[GLOBAL] -----------PhysicalDistribute -------------hashAgg[LOCAL] ---------------PhysicalProject -----------------PhysicalOlapScan[t1] +--------PhysicalProject +----------hashAgg[GLOBAL] +------------PhysicalDistribute +--------------hashAgg[LOCAL] +----------------PhysicalProject +------------------PhysicalOlapScan[t1] ------PhysicalDistribute --------PhysicalProject ----------hashAgg[GLOBAL] @@ -96,13 +110,17 @@ PhysicalResultSink ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalDistribute -------------------PhysicalOlapScan[t1] +------------------PhysicalProject +--------------------PhysicalOlapScan[t1] ----------------PhysicalDistribute -------------------PhysicalOlapScan[t2] +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] --------PhysicalDistribute -----------PhysicalOlapScan[t3] +----------PhysicalProject +------------PhysicalOlapScan[t3] ------PhysicalDistribute ---------PhysicalOlapScan[t4] +--------PhysicalProject +----------PhysicalOlapScan[t4] -- !join_with_union -- PhysicalResultSink @@ -119,7 +137,8 @@ PhysicalResultSink --------------------PhysicalProject ----------------------PhysicalOlapScan[t2] ------------PhysicalDistribute ---------------PhysicalOlapScan[t3] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] -- !set_operator_with_subquery -- PhysicalResultSink @@ -129,11 +148,13 @@ PhysicalResultSink --------hashAgg[LOCAL] ----------PhysicalUnion ------------PhysicalDistribute ---------------filter((t1.score > 10)) -----------------PhysicalOlapScan[t1] +--------------PhysicalProject +----------------filter((t1.score > 10)) +------------------PhysicalOlapScan[t1] ------------PhysicalDistribute ---------------filter((t2.score < 5)) -----------------PhysicalOlapScan[t2] +--------------PhysicalProject +----------------filter((t2.score < 5)) +------------------PhysicalOlapScan[t2] -- !nested_union -- PhysicalResultSink @@ -143,13 +164,17 @@ PhysicalResultSink --------hashAgg[LOCAL] ----------PhysicalUnion ------------PhysicalDistribute ---------------PhysicalOlapScan[t1] +--------------PhysicalProject +----------------PhysicalOlapScan[t1] ------------PhysicalDistribute ---------------PhysicalOlapScan[t2] +--------------PhysicalProject +----------------PhysicalOlapScan[t2] ------------PhysicalDistribute ---------------PhysicalOlapScan[t3] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] ------------PhysicalDistribute ---------------PhysicalOlapScan[t4] +--------------PhysicalProject +----------------PhysicalOlapScan[t4] -- !union_order_limit -- PhysicalResultSink @@ -159,7 +184,8 @@ PhysicalResultSink --------hashAgg[LOCAL] ----------PhysicalUnion ------------PhysicalDistribute ---------------PhysicalOlapScan[t1] +--------------PhysicalProject +----------------PhysicalOlapScan[t1] ------------PhysicalDistribute --------------PhysicalTopN[MERGE_SORT] ----------------PhysicalDistribute @@ -181,7 +207,8 @@ PhysicalResultSink --------------------PhysicalProject ----------------------PhysicalOlapScan[t2] ------------PhysicalDistribute ---------------PhysicalOlapScan[t3] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] -- !union_left_join_combination -- PhysicalResultSink @@ -198,7 +225,8 @@ PhysicalResultSink --------------------PhysicalProject ----------------------PhysicalOlapScan[t2] ------------PhysicalDistribute ---------------PhysicalOlapScan[t3] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] -- !union_right_join_combination -- PhysicalResultSink @@ -215,7 +243,8 @@ PhysicalResultSink ------------------PhysicalDistribute --------------------PhysicalOlapScan[t1] ------------PhysicalDistribute ---------------PhysicalOlapScan[t3] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] -- !union_full_join_combination -- PhysicalResultSink @@ -232,7 +261,8 @@ PhysicalResultSink ------------------PhysicalProject --------------------PhysicalOlapScan[t2] ------------PhysicalDistribute ---------------PhysicalOlapScan[t3] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] -- !union_left_semi_join_combination -- PhysicalResultSink @@ -242,23 +272,27 @@ PhysicalResultSink --------hashAgg[LOCAL] ----------PhysicalUnion ------------PhysicalDistribute ---------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------------PhysicalOlapScan[t1] -----------------PhysicalDistribute -------------------PhysicalProject ---------------------PhysicalOlapScan[t2] +--------------PhysicalProject +----------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------------PhysicalOlapScan[t1] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------PhysicalOlapScan[t2] ------------PhysicalDistribute ---------------PhysicalOlapScan[t3] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] -- !except_with_subquery -- PhysicalResultSink --PhysicalDistribute ----PhysicalExcept ------PhysicalDistribute ---------PhysicalOlapScan[t1] +--------PhysicalProject +----------PhysicalOlapScan[t1] ------PhysicalDistribute ---------filter((t2.score > 10)) -----------PhysicalOlapScan[t2] +--------PhysicalProject +----------filter((t2.score > 10)) +------------PhysicalOlapScan[t2] -- !intersect_different_types -- PhysicalResultSink @@ -279,28 +313,32 @@ PhysicalResultSink --------hashAgg[LOCAL] ----------PhysicalUnion ------------PhysicalDistribute ---------------hashAgg[GLOBAL] -----------------PhysicalDistribute -------------------hashAgg[LOCAL] ---------------------PhysicalProject -----------------------filter((t1.id > 100)) -------------------------PhysicalOlapScan[t1] +--------------PhysicalProject +----------------hashAgg[GLOBAL] +------------------PhysicalDistribute +--------------------hashAgg[LOCAL] +----------------------PhysicalProject +------------------------filter((t1.id > 100)) +--------------------------PhysicalOlapScan[t1] ------------PhysicalDistribute ---------------hashAgg[GLOBAL] -----------------PhysicalDistribute -------------------hashAgg[LOCAL] ---------------------PhysicalProject -----------------------filter((t2.id < 50)) -------------------------PhysicalOlapScan[t2] +--------------PhysicalProject +----------------hashAgg[GLOBAL] +------------------PhysicalDistribute +--------------------hashAgg[LOCAL] +----------------------PhysicalProject +------------------------filter((t2.id < 50)) +--------------------------PhysicalOlapScan[t2] -- !union_all_distinct -- PhysicalResultSink --PhysicalDistribute ----PhysicalUnion ------PhysicalDistribute ---------PhysicalOlapScan[t1] +--------PhysicalProject +----------PhysicalOlapScan[t1] ------PhysicalDistribute ---------PhysicalOlapScan[t2] +--------PhysicalProject +----------PhysicalOlapScan[t2] -- !except_complex_subquery -- PhysicalResultSink diff --git a/regression-test/data/nereids_rules_p0/limit_push_down/limit_push_down.out b/regression-test/data/nereids_rules_p0/limit_push_down/limit_push_down.out index 0a6d01ac10..87e1454b65 100644 --- a/regression-test/data/nereids_rules_p0/limit_push_down/limit_push_down.out +++ b/regression-test/data/nereids_rules_p0/limit_push_down/limit_push_down.out @@ -457,20 +457,22 @@ PhysicalResultSink ----------------hashAgg[GLOBAL] ------------------PhysicalDistribute --------------------hashAgg[LOCAL] -----------------------PhysicalWindow -------------------------PhysicalQuickSort[MERGE_SORT] ---------------------------PhysicalDistribute -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalOlapScan[t1] +----------------------PhysicalProject +------------------------PhysicalWindow +--------------------------PhysicalQuickSort[MERGE_SORT] +----------------------------PhysicalDistribute +------------------------------PhysicalQuickSort[LOCAL_SORT] +--------------------------------PhysicalOlapScan[t1] --------------PhysicalLimit[LOCAL] ----------------hashAgg[GLOBAL] ------------------PhysicalDistribute --------------------hashAgg[LOCAL] -----------------------PhysicalWindow -------------------------PhysicalQuickSort[MERGE_SORT] ---------------------------PhysicalDistribute -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalOlapScan[t2] +----------------------PhysicalProject +------------------------PhysicalWindow +--------------------------PhysicalQuickSort[MERGE_SORT] +----------------------------PhysicalDistribute +------------------------------PhysicalQuickSort[LOCAL_SORT] +--------------------------------PhysicalOlapScan[t2] -- !limit_subquery_join_filter -- PhysicalResultSink @@ -568,9 +570,11 @@ PhysicalResultSink --------------------hashAgg[LOCAL] ----------------------PhysicalUnion ------------------------PhysicalDistribute ---------------------------PhysicalOlapScan[t1] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[t1] ------------------------PhysicalDistribute ---------------------------PhysicalOlapScan[t2] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[t2] -- !limit_correlated_subquery -- PhysicalResultSink diff --git a/regression-test/data/nereids_rules_p0/limit_push_down/order_push_down.out b/regression-test/data/nereids_rules_p0/limit_push_down/order_push_down.out index e7b2ccd23b..7864411210 100644 --- a/regression-test/data/nereids_rules_p0/limit_push_down/order_push_down.out +++ b/regression-test/data/nereids_rules_p0/limit_push_down/order_push_down.out @@ -546,17 +546,19 @@ PhysicalResultSink ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalDistribute -------------------PhysicalWindow ---------------------PhysicalQuickSort[MERGE_SORT] -----------------------PhysicalDistribute -------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------PhysicalOlapScan[t1] +------------------PhysicalProject +--------------------PhysicalWindow +----------------------PhysicalQuickSort[MERGE_SORT] +------------------------PhysicalDistribute +--------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------PhysicalOlapScan[t1] ----------------PhysicalDistribute -------------------PhysicalWindow ---------------------PhysicalQuickSort[MERGE_SORT] -----------------------PhysicalDistribute -------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------PhysicalOlapScan[t2] +------------------PhysicalProject +--------------------PhysicalWindow +----------------------PhysicalQuickSort[MERGE_SORT] +------------------------PhysicalDistribute +--------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------PhysicalOlapScan[t2] -- !limit_subquery_join_filter -- PhysicalResultSink @@ -644,9 +646,11 @@ PhysicalResultSink ------------------hashAgg[LOCAL] --------------------PhysicalUnion ----------------------PhysicalDistribute -------------------------PhysicalOlapScan[t1] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[t1] ----------------------PhysicalDistribute -------------------------PhysicalOlapScan[t2] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[t2] -- !limit_correlated_subquery -- PhysicalResultSink @@ -804,15 +808,16 @@ PhysicalResultSink -- !limit_subquery_window -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalProject ---------PhysicalWindow -----------PhysicalQuickSort[MERGE_SORT] -------------PhysicalDistribute ---------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalProject -------------------PhysicalOlapScan[t1] +--PhysicalProject +----PhysicalTopN[MERGE_SORT] +------PhysicalTopN[LOCAL_SORT] +--------PhysicalProject +----------PhysicalWindow +------------PhysicalQuickSort[MERGE_SORT] +--------------PhysicalDistribute +----------------PhysicalQuickSort[LOCAL_SORT] +------------------PhysicalProject +--------------------PhysicalOlapScan[t1] -- !limit_nested_subquery -- PhysicalResultSink diff --git a/regression-test/data/nereids_rules_p0/predicate_infer/infer_predicate.out b/regression-test/data/nereids_rules_p0/predicate_infer/infer_predicate.out index bed06fa484..7f26b8da9d 100644 --- a/regression-test/data/nereids_rules_p0/predicate_infer/infer_predicate.out +++ b/regression-test/data/nereids_rules_p0/predicate_infer/infer_predicate.out @@ -1,565 +1,397 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !infer_predicate_basic_join -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalOlapScan[t] apply RFs: RF0 ---------filter((t1.score > 10)) -----------PhysicalOlapScan[t] +--hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----filter((t1.score > 10)) +------PhysicalOlapScan[t] +----PhysicalOlapScan[t] -- !infer_predicate_join_with_filter -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------filter((t1.score > 10)) -----------PhysicalOlapScan[t] apply RFs: RF0 ---------filter((t2.name = 'Alice')) -----------PhysicalOlapScan[t] +--hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +----filter((t1.score > 10)) +------PhysicalOlapScan[t] apply RFs: RF0 +----filter((t2.name = 'Alice')) +------PhysicalOlapScan[t] -- !infer_predicate_left_join -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalOlapScan[t] apply RFs: RF0 ---------filter((t1.score > 20)) -----------PhysicalOlapScan[t] +--hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----filter((t1.score > 20)) +------PhysicalOlapScan[t] +----PhysicalOlapScan[t] -- !infer_predicate_right_join -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalOlapScan[t] apply RFs: RF0 ---------filter((t2.score > 20)) -----------PhysicalOlapScan[t] +--hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +----PhysicalOlapScan[t] apply RFs: RF0 +----filter((t2.score > 20)) +------PhysicalOlapScan[t] -- !infer_predicate_full_outer_join -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------filter(((t1.name = 'Test') OR (t2.name = 'Test'))) ---------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[t] -----------PhysicalOlapScan[t] +--filter(((t1.name = 'Test') OR (t2.name = 'Test'))) +----hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------PhysicalOlapScan[t] +------PhysicalOlapScan[t] -- !infer_predicate_left_semi_join -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalProject -----------PhysicalOlapScan[t] apply RFs: RF0 ---------filter((t1.score > 20)) -----------PhysicalOlapScan[t] +--hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----filter((t1.score > 20)) +------PhysicalOlapScan[t] +----PhysicalOlapScan[t] -- !infer_predicate_left_anti_join -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalProject -----------PhysicalOlapScan[t] apply RFs: RF0 ---------filter((t1.score > 20)) -----------PhysicalOlapScan[t] +--hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----filter((t1.score > 20)) +------PhysicalOlapScan[t] +----PhysicalOlapScan[t] -- !infer_predicate_from_subquery -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------filter((t1.id = 1)) -----------PhysicalOlapScan[t] apply RFs: RF0 ---------filter((t2.id = 1)) -----------PhysicalOlapScan[t] +--hashJoin[INNER_JOIN] hashCondition=((t.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +----filter((t1.id = 1)) +------PhysicalOlapScan[t] apply RFs: RF0 +----filter((t2.id = 1)) +------PhysicalOlapScan[t] -- !infer_predicate_multi_level_join -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -----------PhysicalOlapScan[t] apply RFs: RF0 -----------PhysicalOlapScan[t] apply RFs: RF1 ---------filter((t3.name = 'Test')) -----------PhysicalOlapScan[t] +--hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------PhysicalOlapScan[t] apply RFs: RF0 +------PhysicalOlapScan[t] apply RFs: RF1 +----filter((t3.name = 'Test')) +------PhysicalOlapScan[t] -- !infer_predicate_join_with_project_limit -- PhysicalResultSink ---PhysicalProject -----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -------PhysicalLimit[GLOBAL] ---------PhysicalDistribute -----------PhysicalLimit[LOCAL] -------------PhysicalOlapScan[t] apply RFs: RF0 -------PhysicalDistribute ---------PhysicalProject -----------filter((t2.score > 20)) -------------PhysicalOlapScan[t] +--hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +----PhysicalLimit[GLOBAL] +------PhysicalLimit[LOCAL] +--------PhysicalOlapScan[t] apply RFs: RF0 +----filter((t2.score > 20)) +------PhysicalOlapScan[t] -- !infer_predicate_with_union -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t.id = t3.id)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalDistribute -------------hashAgg[LOCAL] ---------------PhysicalUnion -----------------PhysicalDistribute -------------------filter((t1.id = 1)) ---------------------PhysicalOlapScan[t] -----------------PhysicalDistribute -------------------PhysicalOlapScan[t] ---------PhysicalDistribute +--hashJoin[INNER_JOIN] hashCondition=((t.id = t3.id)) otherCondition=() +----hashAgg[GLOBAL] +------hashAgg[LOCAL] +--------PhysicalUnion +----------filter((t1.id = 1)) +------------PhysicalOlapScan[t] ----------PhysicalOlapScan[t] +----PhysicalOlapScan[t] -- !infer_predicate_with_except -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t.id = t3.id)) otherCondition=() ---------PhysicalExcept -----------PhysicalDistribute -------------PhysicalOlapScan[t] -----------PhysicalDistribute -------------PhysicalOlapScan[t] ---------PhysicalDistribute -----------PhysicalOlapScan[t] +--hashJoin[INNER_JOIN] hashCondition=((t.id = t3.id)) otherCondition=() +----PhysicalExcept +------PhysicalOlapScan[t] +------PhysicalOlapScan[t] +----PhysicalOlapScan[t] -- !infer_predicate_with_subquery -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalOlapScan[t] apply RFs: RF0 ---------PhysicalProject -----------filter((t.score > 60)) -------------PhysicalOlapScan[t] +--hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t.id)) otherCondition=() build RFs:RF0 id->[id] +----PhysicalOlapScan[t] apply RFs: RF0 +----filter((t.score > 60)) +------PhysicalOlapScan[t] -- !infer_predicate_complex_condition -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.score > t2.score)) build RFs:RF0 id->[id] ---------PhysicalOlapScan[t] apply RFs: RF0 ---------filter((t1.name = 'Test')) -----------PhysicalOlapScan[t] +--hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.score > t2.score)) +----filter((t1.name = 'Test')) +------PhysicalOlapScan[t] +----PhysicalOlapScan[t] -- !infer_predicate_with_window_function -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------PhysicalWindow ---------PhysicalQuickSort[LOCAL_SORT] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------------PhysicalProject -----------------PhysicalOlapScan[t] apply RFs: RF0 ---------------PhysicalProject -----------------filter((t2.name = 'Charlie')) -------------------PhysicalOlapScan[t] +--PhysicalWindow +----PhysicalQuickSort[LOCAL_SORT] +------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +--------PhysicalOlapScan[t] apply RFs: RF0 +--------filter((t2.name = 'Charlie')) +----------PhysicalOlapScan[t] -- !infer_predicate_with_aggregate -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashAgg[LOCAL] ---------PhysicalProject -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -------------PhysicalProject ---------------filter((t1.id > 70)) -----------------PhysicalOlapScan[t] apply RFs: RF0 -------------PhysicalProject ---------------filter((t2.id > 70)) -----------------PhysicalOlapScan[t] +--hashAgg[LOCAL] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------filter((t1.id > 70)) +--------PhysicalOlapScan[t] apply RFs: RF0 +------filter((t2.id > 70)) +--------PhysicalOlapScan[t] -- !infer_predicate_complex_and_or_logic -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=(((t1.score > 80) OR ((t2.name = 'Dave') AND (t1.id < 50)))) build RFs:RF0 id->[id] ---------PhysicalOlapScan[t] apply RFs: RF0 ---------filter(((t1.score > 80) OR (t1.id < 50))) -----------PhysicalOlapScan[t] +--hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=(((t1.score > 80) OR ((t2.name = 'Dave') AND (t1.id < 50)))) +----filter(((t1.score > 80) OR (t1.id < 50))) +------PhysicalOlapScan[t] +----PhysicalOlapScan[t] -- !infer_predicate_multiple_join_filter -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() build RFs:RF0 id->[id];RF1 name->[name] ---------filter((t1.score > 90)) -----------PhysicalOlapScan[t] apply RFs: RF0 RF1 ---------filter((t2.score < 60)) -----------PhysicalOlapScan[t] +--hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() build RFs:RF0 id->[id];RF1 name->[name] +----filter((t1.score > 90)) +------PhysicalOlapScan[t] apply RFs: RF0 RF1 +----filter((t2.score < 60)) +------PhysicalOlapScan[t] -- !infer_predicate_join_with_not_exists -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t2.id = t1.id)) otherCondition=() ---------PhysicalOlapScan[t] ---------PhysicalProject -----------filter((t2.score > 100)) -------------PhysicalOlapScan[t] +--hashJoin[LEFT_ANTI_JOIN] hashCondition=((t2.id = t1.id)) otherCondition=() +----PhysicalOlapScan[t] +----filter((t2.score > 100)) +------PhysicalOlapScan[t] -- !infer_predicate_complex_subquery -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalOlapScan[t] apply RFs: RF0 ---------PhysicalProject -----------filter((t2.name = 'Frank') and (t2.score > 110)) -------------PhysicalOlapScan[t] +--hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +----PhysicalOlapScan[t] apply RFs: RF0 +----filter((t2.name = 'Frank') and (t2.score > 110)) +------PhysicalOlapScan[t] -- !infer_predicate_join_with_function_processed -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((expr_length(name) = expr_length(name))) otherCondition=() ---------PhysicalProject -----------filter((t1.score > 120)) -------------PhysicalOlapScan[t] ---------PhysicalDistribute -----------PhysicalProject -------------PhysicalOlapScan[t] +--hashJoin[INNER_JOIN] hashCondition=((expr_length(name) = expr_length(name))) otherCondition=() +----filter((t1.score > 120)) +------PhysicalOlapScan[t] +----PhysicalOlapScan[t] -- !infer_predicate_nested_subqueries -- PhysicalResultSink ---PhysicalDistribute -----filter((t.score > 130) and (t1.id < 70) and (t2.name = 'George')) -------PhysicalOlapScan[t] +--filter((t.score > 130) and (t1.id < 70) and (t2.name = 'George')) +----PhysicalOlapScan[t] -- !infer_predicate_join_with_aggregate_having -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------filter((sum(score) > 140)) ---------hashAgg[LOCAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------------PhysicalProject -----------------PhysicalOlapScan[t] ---------------PhysicalProject -----------------PhysicalOlapScan[t] +--filter((sum(score) > 140)) +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------PhysicalOlapScan[t] +--------PhysicalOlapScan[t] -- !infer_predicate_mixed_join_types -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF0 id->[id] ---------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[t] apply RFs: RF0 -----------PhysicalOlapScan[t] ---------filter((t3.score > 150)) -----------PhysicalOlapScan[t] +--hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF0 id->[id] +----hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------PhysicalOlapScan[t] apply RFs: RF0 +------PhysicalOlapScan[t] +----filter((t3.score > 150)) +------PhysicalOlapScan[t] -- !infer_predicate_join_with_distinct -- PhysicalResultSink ---PhysicalDistribute -----hashAgg[LOCAL] -------PhysicalProject ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -----------PhysicalProject -------------PhysicalOlapScan[t] apply RFs: RF0 -----------PhysicalProject -------------filter((t1.score > 160)) ---------------PhysicalOlapScan[t] +--hashAgg[LOCAL] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------filter((t1.score > 160)) +--------PhysicalOlapScan[t] +------PhysicalOlapScan[t] -- !infer_predicate_join_with_case_when -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalOlapScan[t] apply RFs: RF0 ---------filter((if((score > 170), 'high', 'low') = 'high')) -----------PhysicalOlapScan[t] +--hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----filter((if((score > 170), 'high', 'low') = 'high')) +------PhysicalOlapScan[t] +----PhysicalOlapScan[t] -- !infer_predicate_self_join -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalOlapScan[t] apply RFs: RF0 ---------filter((t1.score > 10)) -----------PhysicalOlapScan[t] +--hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----filter((t1.score > 10)) +------PhysicalOlapScan[t] +----PhysicalOlapScan[t] -- !infer_predicate_complex_multitable_join -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -----------PhysicalOlapScan[t] apply RFs: RF0 -----------filter((t1.score > 20)) -------------PhysicalOlapScan[t] apply RFs: RF1 ---------filter((t3.name = 'Helen')) -----------PhysicalOlapScan[t] +--hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------filter((t1.score > 20)) +--------PhysicalOlapScan[t] apply RFs: RF1 +------PhysicalOlapScan[t] +----filter((t3.name = 'Helen')) +------PhysicalOlapScan[t] -- !infer_predicate_aggregate_subquery -- PhysicalResultSink ---PhysicalDistribute -----filter((t_agg.total > 30)) -------hashAgg[LOCAL] ---------PhysicalProject -----------PhysicalOlapScan[t] +--filter((t_agg.total > 30)) +----hashAgg[LOCAL] +------PhysicalOlapScan[t] -- !infer_predicate_join_with_function -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------NestedLoopJoin[INNER_JOIN](abs((score - score)) < 40) ---------PhysicalOlapScan[t] ---------PhysicalDistribute -----------PhysicalOlapScan[t] +--NestedLoopJoin[INNER_JOIN](abs((score - score)) < 40) +----PhysicalOlapScan[t] +----PhysicalOlapScan[t] -- !infer_predicate_subquery_filter -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalOlapScan[t] apply RFs: RF0 ---------PhysicalProject -----------filter((t.score > 50)) -------------PhysicalOlapScan[t] +--hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t.id)) otherCondition=() build RFs:RF0 id->[id] +----PhysicalOlapScan[t] apply RFs: RF0 +----filter((t.score > 50)) +------PhysicalOlapScan[t] -- !infer_predicate_with_not_operator -- PhysicalResultSink ---PhysicalDistribute -----filter((t1.score <= 60)) -------PhysicalOlapScan[t] +--filter((t1.score <= 60)) +----PhysicalOlapScan[t] -- !infer_predicate_complex_nested_subquery -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((t.score = t.score)) otherCondition=() build RFs:RF0 score->[score] ---------PhysicalDistribute -----------PhysicalProject -------------filter((t.score > 80)) ---------------PhysicalOlapScan[t] apply RFs: RF0 ---------PhysicalDistribute -----------filter((t.score > 80) and (t1.id > 10)) -------------PhysicalOlapScan[t] +--hashJoin[LEFT_SEMI_JOIN] hashCondition=((t.score = t.score)) otherCondition=() build RFs:RF0 score->[score] +----filter((t.score > 80) and (t1.id > 10)) +------PhysicalOlapScan[t] apply RFs: RF0 +----filter((t.score > 80)) +------PhysicalOlapScan[t] -- !infer_predicate_multi_join_subquery_aggregate -- PhysicalResultSink ---PhysicalDistribute -----hashAgg[LOCAL] -------PhysicalProject ---------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t2.id = t.id)) otherCondition=() build RFs:RF2 id->[id] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() -------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------------PhysicalProject -----------------PhysicalOlapScan[t] apply RFs: RF0 ---------------PhysicalProject -----------------PhysicalOlapScan[t] apply RFs: RF2 -------------PhysicalProject ---------------PhysicalOlapScan[t] -----------PhysicalProject -------------filter((t.score > 100)) ---------------PhysicalOlapScan[t] - --- !infer_predicate_multi_join_complex_condition_not_exists -- -PhysicalResultSink ---PhysicalDistribute -----PhysicalProject +--hashAgg[LOCAL] +----hashJoin[LEFT_SEMI_JOIN] hashCondition=((t2.id = t.id)) otherCondition=() build RFs:RF2 id->[id] ------hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() --------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ----------PhysicalOlapScan[t] apply RFs: RF0 -----------filter((t1.score > 110)) -------------PhysicalOlapScan[t] ---------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t4.id = t3.id)) otherCondition=() +----------PhysicalOlapScan[t] apply RFs: RF2 +--------PhysicalOlapScan[t] +------filter((t.score > 100)) +--------PhysicalOlapScan[t] + +-- !infer_predicate_multi_join_complex_condition_not_exists -- +PhysicalResultSink +--hashJoin[LEFT_ANTI_JOIN] hashCondition=((t4.id = t3.id)) otherCondition=() +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() +------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------filter((t1.score > 110)) ----------PhysicalOlapScan[t] -----------PhysicalProject -------------PhysicalOlapScan[t] +--------PhysicalOlapScan[t] +------PhysicalOlapScan[t] +----PhysicalOlapScan[t] -- !infer_predicate_multi_join_complex_subquery -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[t] apply RFs: RF1 -----------PhysicalOlapScan[t] ---------filter((t.score > 130)) -----------PhysicalOlapScan[t] +--hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------PhysicalOlapScan[t] apply RFs: RF1 +------PhysicalOlapScan[t] +----filter((t.score > 130)) +------PhysicalOlapScan[t] -- !infer_predicate_multi_join_with_having_clause -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------filter((sum(score) > 150)) ---------hashAgg[LOCAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() ---------------PhysicalProject -----------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------------PhysicalProject ---------------------PhysicalOlapScan[t] -------------------PhysicalProject ---------------------PhysicalOlapScan[t] ---------------PhysicalProject -----------------PhysicalOlapScan[t] +--filter((sum(score) > 150)) +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() +--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------PhysicalOlapScan[t] +----------PhysicalOlapScan[t] +--------PhysicalOlapScan[t] -- !infer0 -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------filter((t1.id = 1)) -----------PhysicalOlapScan[t1] apply RFs: RF0 ---------PhysicalDistribute -----------filter((t2.id = 1)) -------------PhysicalOlapScan[t2] +--hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +----filter((t1.id = 1)) +------PhysicalOlapScan[t1] apply RFs: RF0 +----filter((t2.id = 1)) +------PhysicalOlapScan[t2] -- !infer1 -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -----------filter((t1.id = 1)) -------------PhysicalOlapScan[t1] apply RFs: RF0 RF1 -----------PhysicalDistribute -------------filter((t2.id = 1)) ---------------PhysicalOlapScan[t2] ---------PhysicalDistribute -----------filter((t3.id = 1)) -------------PhysicalOlapScan[t] +--hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------filter((t1.id = 1)) +--------PhysicalOlapScan[t1] apply RFs: RF0 RF1 +------filter((t2.id = 1)) +--------PhysicalOlapScan[t2] +----filter((t3.id = 1)) +------PhysicalOlapScan[t] -- !infer2 -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.id = 1)) ---------PhysicalOlapScan[t1] ---------PhysicalDistribute -----------filter((t2.id = 1)) -------------PhysicalOlapScan[t2] +--hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.id = 1)) +----PhysicalOlapScan[t1] +----filter((t2.id = 1)) +------PhysicalOlapScan[t2] -- !infer3 -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.id = 1)) ---------PhysicalDistribute -----------PhysicalOlapScan[t1] ---------PhysicalDistribute -----------PhysicalOlapScan[t2] +--hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.id = 1)) +----PhysicalOlapScan[t1] +----PhysicalOlapScan[t2] -- !infer4 -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------filter((t1.id = 1)) -----------PhysicalOlapScan[t1] apply RFs: RF0 ---------PhysicalDistribute -----------PhysicalProject -------------filter((t2.id = 1)) ---------------PhysicalOlapScan[t2] +--hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +----filter((t1.id = 1)) +------PhysicalOlapScan[t1] apply RFs: RF0 +----filter((t2.id = 1)) +------PhysicalOlapScan[t2] -- !infer5 -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -----------filter((t2.id = 1)) -------------PhysicalOlapScan[t2] apply RFs: RF0 -----------PhysicalDistribute -------------filter((t1.id = 1)) ---------------PhysicalLimit[GLOBAL] -----------------PhysicalDistribute -------------------PhysicalLimit[LOCAL] ---------------------PhysicalProject -----------------------PhysicalOlapScan[t1] apply RFs: RF1 ---------PhysicalDistribute -----------filter((t3.id = 1)) -------------PhysicalOlapScan[t] +--hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------filter((t1.id = 1)) +--------PhysicalLimit[GLOBAL] +----------PhysicalLimit[LOCAL] +------------PhysicalOlapScan[t1] apply RFs: RF0 RF1 +------filter((t2.id = 1)) +--------PhysicalOlapScan[t2] +----filter((t3.id = 1)) +------PhysicalOlapScan[t] -- !infer6 -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=((t1.id = 1)) ---------PhysicalOlapScan[t1] ---------PhysicalDistribute -----------filter((t2.id = 1) and (t2.name = 'bob')) -------------PhysicalOlapScan[t2] +--hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=((t1.id = 1)) +----PhysicalOlapScan[t1] +----filter((t2.id = 1) and (t2.name = 'bob')) +------PhysicalOlapScan[t2] -- !infer7 -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF2 id->[id] ---------hashJoin[INNER_JOIN] hashCondition=((t12.id = t34.id)) otherCondition=() build RFs:RF1 id->[id] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((t3.id = t4.id)) otherCondition=() build RFs:RF0 id->[id] ---------------PhysicalProject -----------------filter(( not (id = 3)) and (t34.id < 9) and (t34.id > 1)) -------------------PhysicalOlapScan[t3] apply RFs: RF0 RF1 ---------------PhysicalDistribute -----------------PhysicalProject -------------------filter(( not (id = 4)) and (t4.id < 9) and (t4.id > 1)) ---------------------PhysicalOlapScan[t4] -----------PhysicalDistribute -------------PhysicalProject ---------------filter((t1.id < 9) and (t1.id > 1)) -----------------PhysicalOlapScan[t1] apply RFs: RF2 ---------PhysicalDistribute -----------PhysicalProject -------------filter((t2.id < 9) and (t2.id > 1)) ---------------PhysicalOlapScan[t2] +--hashJoin[INNER_JOIN] hashCondition=((t12.id = t34.id)) otherCondition=() build RFs:RF2 id->[id] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF1 id->[id] +------filter((t1.id < 9) and (t1.id > 1)) +--------PhysicalOlapScan[t1] apply RFs: RF1 RF2 +------filter((t2.id < 9) and (t2.id > 1)) +--------PhysicalOlapScan[t2] +----hashJoin[INNER_JOIN] hashCondition=((t3.id = t4.id)) otherCondition=() build RFs:RF0 id->[id] +------filter(( not (id = 3)) and (t34.id < 9) and (t34.id > 1)) +--------PhysicalOlapScan[t3] apply RFs: RF0 +------filter(( not (id = 4)) and (t4.id < 9) and (t4.id > 1)) +--------PhysicalOlapScan[t4] -- !infer8 -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------NestedLoopJoin[INNER_JOIN]( not (id = id)) ---------PhysicalOlapScan[t2] ---------PhysicalDistribute -----------filter((t1.id = 1)) -------------PhysicalOlapScan[t1] +--NestedLoopJoin[INNER_JOIN]( not (id = id)) +----filter((t1.id = 1)) +------PhysicalOlapScan[t1] +----PhysicalOlapScan[t2] -- !infer9 -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------filter((cast(id as BIGINT) = 2147483648)) -----------PhysicalOlapScan[t1] apply RFs: RF0 ---------PhysicalDistribute -----------filter((cast(id as BIGINT) = 2147483648)) -------------PhysicalOlapScan[t2] +--hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +----filter((cast(id as BIGINT) = 2147483648)) +------PhysicalOlapScan[t1] apply RFs: RF0 +----filter((cast(id as BIGINT) = 2147483648)) +------PhysicalOlapScan[t2] -- !infer10 -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((expr_cast(id as SMALLINT) = expr_cast(id as SMALLINT))) otherCondition=() build RFs:RF0 expr_cast(id as SMALLINT)->[id] ---------PhysicalProject -----------filter((cast(id as BIGINT) = 2147483648)) -------------PhysicalOlapScan[t1] apply RFs: RF0 ---------PhysicalDistribute -----------PhysicalProject -------------filter((cast(id as BIGINT) = 2147483648)) ---------------PhysicalOlapScan[t2] +--hashJoin[INNER_JOIN] hashCondition=((expr_cast(id as SMALLINT) = expr_cast(id as SMALLINT))) otherCondition=() build RFs:RF0 expr_cast(id as SMALLINT)->[id] +----filter((cast(id as BIGINT) = 2147483648)) +------PhysicalOlapScan[t1] apply RFs: RF0 +----filter((cast(id as BIGINT) = 2147483648)) +------PhysicalOlapScan[t2] -- !infer11 -- PhysicalResultSink ---PhysicalDistribute -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((expr_cast(id as LARGEINT) = expr_cast(id as LARGEINT))) otherCondition=() build RFs:RF0 expr_cast(id as LARGEINT)->[id] ---------PhysicalProject -----------filter((cast(id as BIGINT) = 2147483648)) -------------PhysicalOlapScan[t1] apply RFs: RF0 ---------PhysicalDistribute -----------PhysicalProject -------------filter((cast(id as BIGINT) = 2147483648)) ---------------PhysicalOlapScan[t2] +--hashJoin[INNER_JOIN] hashCondition=((expr_cast(id as LARGEINT) = expr_cast(id as LARGEINT))) otherCondition=() build RFs:RF0 expr_cast(id as LARGEINT)->[id] +----filter((cast(id as BIGINT) = 2147483648)) +------PhysicalOlapScan[t1] apply RFs: RF0 +----filter((cast(id as BIGINT) = 2147483648)) +------PhysicalOlapScan[t2] diff --git a/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_distinct_through_union.out b/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_distinct_through_union.out index 76b99a278f..cd1c60b17d 100644 --- a/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_distinct_through_union.out +++ b/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_distinct_through_union.out @@ -9,9 +9,11 @@ PhysicalResultSink ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalDistribute -------------------PhysicalOlapScan[table2] +------------------PhysicalProject +--------------------PhysicalOlapScan[table2] ----------------PhysicalDistribute -------------------PhysicalOlapScan[table2] +------------------PhysicalProject +--------------------PhysicalOlapScan[table2] -- !push_down_topn_union_with_conditions -- PhysicalResultSink @@ -23,14 +25,17 @@ PhysicalResultSink ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalDistribute -------------------filter((t1.score > 10)) ---------------------PhysicalOlapScan[table2] +------------------PhysicalProject +--------------------filter((t1.score > 10)) +----------------------PhysicalOlapScan[table2] ----------------PhysicalDistribute -------------------filter((t2.name = 'Test')) ---------------------PhysicalOlapScan[table2] +------------------PhysicalProject +--------------------filter((t2.name = 'Test')) +----------------------PhysicalOlapScan[table2] ----------------PhysicalDistribute -------------------filter((t3.id < 5)) ---------------------PhysicalOlapScan[table2] +------------------PhysicalProject +--------------------filter((t3.id < 5)) +----------------------PhysicalOlapScan[table2] -- !push_down_topn_union_with_order_by -- PhysicalResultSink @@ -42,11 +47,14 @@ PhysicalResultSink ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalDistribute -------------------PhysicalOlapScan[table2] +------------------PhysicalProject +--------------------PhysicalOlapScan[table2] ----------------PhysicalDistribute -------------------PhysicalOlapScan[table2] +------------------PhysicalProject +--------------------PhysicalOlapScan[table2] ----------------PhysicalDistribute -------------------PhysicalOlapScan[table2] +------------------PhysicalProject +--------------------PhysicalOlapScan[table2] -- !push_down_topn_nested_union -- PhysicalResultSink @@ -58,13 +66,17 @@ PhysicalResultSink ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalDistribute -------------------PhysicalOlapScan[table2] +------------------PhysicalProject +--------------------PhysicalOlapScan[table2] ----------------PhysicalDistribute -------------------PhysicalOlapScan[table2] +------------------PhysicalProject +--------------------PhysicalOlapScan[table2] ----------------PhysicalDistribute -------------------PhysicalOlapScan[table2] +------------------PhysicalProject +--------------------PhysicalOlapScan[table2] ----------------PhysicalDistribute -------------------PhysicalOlapScan[table2] +------------------PhysicalProject +--------------------PhysicalOlapScan[table2] -- !push_down_topn_union_after_join -- PhysicalResultSink @@ -149,9 +161,11 @@ PhysicalResultSink ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalDistribute -------------------filter((t1.name = 'Test') and (t1.score > 10)) ---------------------PhysicalOlapScan[table2] +------------------PhysicalProject +--------------------filter((t1.name = 'Test') and (t1.score > 10)) +----------------------PhysicalOlapScan[table2] ----------------PhysicalDistribute -------------------filter((t2.id < 5) and (t2.score < 20)) ---------------------PhysicalOlapScan[table2] +------------------PhysicalProject +--------------------filter((t2.id < 5) and (t2.score < 20)) +----------------------PhysicalOlapScan[table2] diff --git a/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_through_union.out b/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_through_union.out index 57232fbf12..8120b0d38e 100644 --- a/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_through_union.out +++ b/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_through_union.out @@ -9,12 +9,14 @@ PhysicalResultSink ------------PhysicalTopN[MERGE_SORT] --------------PhysicalDistribute ----------------PhysicalTopN[LOCAL_SORT] -------------------PhysicalOlapScan[table1] +------------------PhysicalProject +--------------------PhysicalOlapScan[table1] ----------PhysicalDistribute ------------PhysicalTopN[MERGE_SORT] --------------PhysicalDistribute ----------------PhysicalTopN[LOCAL_SORT] -------------------PhysicalOlapScan[table1] +------------------PhysicalProject +--------------------PhysicalOlapScan[table1] -- !push_down_topn_union_with_conditions -- PhysicalResultSink @@ -26,20 +28,23 @@ PhysicalResultSink ------------PhysicalTopN[MERGE_SORT] --------------PhysicalDistribute ----------------PhysicalTopN[LOCAL_SORT] -------------------filter((t1.score > 10)) ---------------------PhysicalOlapScan[table1] +------------------PhysicalProject +--------------------filter((t1.score > 10)) +----------------------PhysicalOlapScan[table1] ----------PhysicalDistribute ------------PhysicalTopN[MERGE_SORT] --------------PhysicalDistribute ----------------PhysicalTopN[LOCAL_SORT] -------------------filter((t2.name = 'Test')) ---------------------PhysicalOlapScan[table1] +------------------PhysicalProject +--------------------filter((t2.name = 'Test')) +----------------------PhysicalOlapScan[table1] ----------PhysicalDistribute ------------PhysicalTopN[MERGE_SORT] --------------PhysicalDistribute ----------------PhysicalTopN[LOCAL_SORT] -------------------filter((t3.id < 5)) ---------------------PhysicalOlapScan[table1] +------------------PhysicalProject +--------------------filter((t3.id < 5)) +----------------------PhysicalOlapScan[table1] -- !push_down_topn_union_with_order_by -- PhysicalResultSink @@ -51,17 +56,20 @@ PhysicalResultSink ------------PhysicalTopN[MERGE_SORT] --------------PhysicalDistribute ----------------PhysicalTopN[LOCAL_SORT] -------------------PhysicalOlapScan[table1] +------------------PhysicalProject +--------------------PhysicalOlapScan[table1] ----------PhysicalDistribute ------------PhysicalTopN[MERGE_SORT] --------------PhysicalDistribute ----------------PhysicalTopN[LOCAL_SORT] -------------------PhysicalOlapScan[table1] +------------------PhysicalProject +--------------------PhysicalOlapScan[table1] ----------PhysicalDistribute ------------PhysicalTopN[MERGE_SORT] --------------PhysicalDistribute ----------------PhysicalTopN[LOCAL_SORT] -------------------PhysicalOlapScan[table1] +------------------PhysicalProject +--------------------PhysicalOlapScan[table1] -- !push_down_topn_nested_union -- PhysicalResultSink @@ -73,22 +81,26 @@ PhysicalResultSink ------------PhysicalTopN[MERGE_SORT] --------------PhysicalDistribute ----------------PhysicalTopN[LOCAL_SORT] -------------------PhysicalOlapScan[table1] +------------------PhysicalProject +--------------------PhysicalOlapScan[table1] ----------PhysicalDistribute ------------PhysicalTopN[MERGE_SORT] --------------PhysicalDistribute ----------------PhysicalTopN[LOCAL_SORT] -------------------PhysicalOlapScan[table1] +------------------PhysicalProject +--------------------PhysicalOlapScan[table1] ----------PhysicalDistribute ------------PhysicalTopN[MERGE_SORT] --------------PhysicalDistribute ----------------PhysicalTopN[LOCAL_SORT] -------------------PhysicalOlapScan[table1] +------------------PhysicalProject +--------------------PhysicalOlapScan[table1] ----------PhysicalDistribute ------------PhysicalTopN[MERGE_SORT] --------------PhysicalDistribute ----------------PhysicalTopN[LOCAL_SORT] -------------------PhysicalOlapScan[table1] +------------------PhysicalProject +--------------------PhysicalOlapScan[table1] -- !push_down_topn_union_after_join -- PhysicalResultSink @@ -183,12 +195,14 @@ PhysicalResultSink ------------PhysicalTopN[MERGE_SORT] --------------PhysicalDistribute ----------------PhysicalTopN[LOCAL_SORT] -------------------filter((t1.name = 'Test') and (t1.score > 10)) ---------------------PhysicalOlapScan[table1] +------------------PhysicalProject +--------------------filter((t1.name = 'Test') and (t1.score > 10)) +----------------------PhysicalOlapScan[table1] ----------PhysicalDistribute ------------PhysicalTopN[MERGE_SORT] --------------PhysicalDistribute ----------------PhysicalTopN[LOCAL_SORT] -------------------filter((t2.id < 5) and (t2.score < 20)) ---------------------PhysicalOlapScan[table1] +------------------PhysicalProject +--------------------filter((t2.id < 5) and (t2.score < 20)) +----------------------PhysicalOlapScan[table1] diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.1.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.1.out index 6025868c87..78e68e065e 100644 --- a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.1.out +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.1.out @@ -4,25 +4,26 @@ PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] ----PhysicalDistribute ------PhysicalQuickSort[LOCAL_SORT] ---------hashAgg[GLOBAL] -----------PhysicalDistribute -------------hashAgg[LOCAL] ---------------PhysicalProject -----------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF2 d_datekey->[lo_orderdate] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[lo_suppkey] -----------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[lo_partkey] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 +--------PhysicalProject +----------hashAgg[GLOBAL] +------------PhysicalDistribute +--------------hashAgg[LOCAL] +----------------PhysicalProject +------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF2 d_datekey->[lo_orderdate] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[lo_suppkey] +------------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[lo_partkey] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------filter((part.p_category = 'MFGR#12')) +--------------------------------PhysicalOlapScan[part] ------------------------PhysicalDistribute --------------------------PhysicalProject -----------------------------filter((part.p_category = 'MFGR#12')) -------------------------------PhysicalOlapScan[part] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------filter((supplier.s_region = 'AMERICA')) -----------------------------PhysicalOlapScan[supplier] -------------------PhysicalDistribute ---------------------PhysicalProject -----------------------PhysicalOlapScan[dates] +----------------------------filter((supplier.s_region = 'AMERICA')) +------------------------------PhysicalOlapScan[supplier] +--------------------PhysicalDistribute +----------------------PhysicalProject +------------------------PhysicalOlapScan[dates] diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.2.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.2.out index 121a53fc64..ced7caab8f 100644 --- a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.2.out +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.2.out @@ -4,25 +4,26 @@ PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] ----PhysicalDistribute ------PhysicalQuickSort[LOCAL_SORT] ---------hashAgg[GLOBAL] -----------PhysicalDistribute -------------hashAgg[LOCAL] ---------------PhysicalProject -----------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF2 d_datekey->[lo_orderdate] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[lo_suppkey] -----------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[lo_partkey] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 +--------PhysicalProject +----------hashAgg[GLOBAL] +------------PhysicalDistribute +--------------hashAgg[LOCAL] +----------------PhysicalProject +------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF2 d_datekey->[lo_orderdate] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[lo_suppkey] +------------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[lo_partkey] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------filter((part.p_brand <= 'MFGR#2228') and (part.p_brand >= 'MFGR#2221')) +--------------------------------PhysicalOlapScan[part] ------------------------PhysicalDistribute --------------------------PhysicalProject -----------------------------filter((part.p_brand <= 'MFGR#2228') and (part.p_brand >= 'MFGR#2221')) -------------------------------PhysicalOlapScan[part] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------filter((supplier.s_region = 'ASIA')) -----------------------------PhysicalOlapScan[supplier] -------------------PhysicalDistribute ---------------------PhysicalProject -----------------------PhysicalOlapScan[dates] +----------------------------filter((supplier.s_region = 'ASIA')) +------------------------------PhysicalOlapScan[supplier] +--------------------PhysicalDistribute +----------------------PhysicalProject +------------------------PhysicalOlapScan[dates] diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.3.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.3.out index f49156a588..1d076944f9 100644 --- a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.3.out +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.3.out @@ -4,25 +4,26 @@ PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] ----PhysicalDistribute ------PhysicalQuickSort[LOCAL_SORT] ---------hashAgg[GLOBAL] -----------PhysicalDistribute -------------hashAgg[LOCAL] ---------------PhysicalProject -----------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF2 d_datekey->[lo_orderdate] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[lo_suppkey] -----------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[lo_partkey] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 +--------PhysicalProject +----------hashAgg[GLOBAL] +------------PhysicalDistribute +--------------hashAgg[LOCAL] +----------------PhysicalProject +------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF2 d_datekey->[lo_orderdate] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[lo_suppkey] +------------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[lo_partkey] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------filter((part.p_brand = 'MFGR#2239')) +--------------------------------PhysicalOlapScan[part] ------------------------PhysicalDistribute --------------------------PhysicalProject -----------------------------filter((part.p_brand = 'MFGR#2239')) -------------------------------PhysicalOlapScan[part] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------filter((supplier.s_region = 'EUROPE')) -----------------------------PhysicalOlapScan[supplier] -------------------PhysicalDistribute ---------------------PhysicalProject -----------------------PhysicalOlapScan[dates] +----------------------------filter((supplier.s_region = 'EUROPE')) +------------------------------PhysicalOlapScan[supplier] +--------------------PhysicalDistribute +----------------------PhysicalProject +------------------------PhysicalOlapScan[dates] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query10.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query10.out index 2853b9d6f1..dcbbe6a350 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query10.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query10.out @@ -5,53 +5,50 @@ PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalDistribute --------PhysicalTopN[LOCAL_SORT] -----------hashAgg[GLOBAL] -------------PhysicalDistribute ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] +----------hashAgg[LOCAL] +------------PhysicalProject +--------------filter(($c$1 OR $c$2)) +----------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() +------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 c_current_cdemo_sk->[cd_demo_sk] +------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF5 +------------------------PhysicalDistribute --------------------------PhysicalProject -----------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2001)) ---------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------filter(($c$1 OR $c$2)) ---------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() -----------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF3 c_current_cdemo_sk->[cd_demo_sk] -----------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF3 -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[c_current_addr_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 -----------------------------------------PhysicalDistribute -------------------------------------------PhysicalProject ---------------------------------------------filter(ca_county IN ('Campbell County', 'Cleburne County', 'Escambia County', 'Fairfield County', 'Washtenaw County')) -----------------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] ------------------------------PhysicalDistribute --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 ------------------------------------PhysicalDistribute --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2001)) ------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +------------------------------PhysicalDistribute +--------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[c_current_addr_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 ----------------------------------PhysicalDistribute ------------------------------------PhysicalProject ---------------------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2001)) -----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter(ca_county IN ('Campbell County', 'Cleburne County', 'Escambia County', 'Fairfield County', 'Washtenaw County')) +----------------------------------------PhysicalOlapScan[customer_address] +--------------------PhysicalDistribute +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2001)) +--------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2001)) +------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query16.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query16.out index 3fe19ee10d..1b116185ae 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query16.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query16.out @@ -3,36 +3,37 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] -------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF4 cs_order_number->[cs_order_number] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 ---------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() build RFs:RF3 cs_order_number->[cr_order_number] +------PhysicalProject +--------hashAgg[DISTINCT_GLOBAL] +----------PhysicalDistribute +------------hashAgg[DISTINCT_LOCAL] +--------------hashAgg[GLOBAL] +----------------hashAgg[LOCAL] +------------------PhysicalProject +--------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF4 cs_order_number->[cs_order_number] ----------------------PhysicalDistribute ------------------------PhysicalProject ---------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF3 -----------------------PhysicalDistribute -------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cc_call_center_sk->[cs_call_center_sk] ---------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk] -----------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cs_ship_addr_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 +--------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 +----------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() build RFs:RF3 cs_order_number->[cr_order_number] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF3 +------------------------PhysicalDistribute +--------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cc_call_center_sk->[cs_call_center_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cs_ship_addr_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------filter((customer_address.ca_state = 'PA')) +--------------------------------------PhysicalOlapScan[customer_address] ------------------------------PhysicalDistribute --------------------------------PhysicalProject -----------------------------------filter((customer_address.ca_state = 'PA')) -------------------------------------PhysicalOlapScan[customer_address] +----------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) +------------------------------------PhysicalOlapScan[date_dim] ----------------------------PhysicalDistribute ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------filter((call_center.cc_county = 'Williamson County')) ---------------------------------PhysicalOlapScan[call_center] +--------------------------------filter((call_center.cc_county = 'Williamson County')) +----------------------------------PhysicalOlapScan[call_center] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query23.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query23.out index d9af7d72f2..615fcf40b6 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query23.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query23.out @@ -162,58 +162,60 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------PhysicalTopN[MERGE_SORT] ------------------PhysicalDistribute --------------------PhysicalTopN[LOCAL_SORT] -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() ---------------------------------PhysicalDistribute -----------------------------------PhysicalProject -------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------------------PhysicalDistribute -----------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF7 c_customer_sk->[cs_bill_customer_sk] -------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF6 c_customer_sk->[cs_bill_customer_sk] ---------------------------------------PhysicalDistribute -----------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 -------------------------------------------PhysicalDistribute +----------------------PhysicalProject +------------------------hashAgg[GLOBAL] +--------------------------PhysicalDistribute +----------------------------hashAgg[LOCAL] +------------------------------PhysicalProject +--------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() +----------------------------------PhysicalDistribute +------------------------------------PhysicalProject +--------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------------------PhysicalDistribute +------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF7 c_customer_sk->[cs_bill_customer_sk] +--------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF6 c_customer_sk->[cs_bill_customer_sk] +----------------------------------------PhysicalDistribute +------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] --------------------------------------------PhysicalProject -----------------------------------------------filter((date_dim.d_moy = 7) and (date_dim.d_year = 2000)) -------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 +--------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalProject +------------------------------------------------filter((date_dim.d_moy = 7) and (date_dim.d_year = 2000)) +--------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalDistribute +------------------------------------------PhysicalProject +--------------------------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) --------------------------------------PhysicalDistribute ----------------------------------------PhysicalProject -------------------------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) -------------------------------------PhysicalDistribute ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[customer] +------------------------------------------PhysicalOlapScan[customer] --------------PhysicalDistribute ----------------PhysicalTopN[MERGE_SORT] ------------------PhysicalDistribute --------------------PhysicalTopN[LOCAL_SORT] -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() ---------------------------------PhysicalDistribute -----------------------------------PhysicalProject -------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------------------PhysicalDistribute -----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF10 ws_bill_customer_sk->[c_customer_sk] -------------------------------------PhysicalDistribute ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[customer] apply RFs: RF10 -------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF9 c_customer_sk->[ws_bill_customer_sk] ---------------------------------------PhysicalDistribute -----------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 -------------------------------------------PhysicalDistribute ---------------------------------------------PhysicalProject -----------------------------------------------filter((date_dim.d_moy = 7) and (date_dim.d_year = 2000)) -------------------------------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalProject +------------------------hashAgg[GLOBAL] +--------------------------PhysicalDistribute +----------------------------hashAgg[LOCAL] +------------------------------PhysicalProject +--------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() +----------------------------------PhysicalDistribute +------------------------------------PhysicalProject +--------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------------------PhysicalDistribute +------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF10 ws_bill_customer_sk->[c_customer_sk] --------------------------------------PhysicalDistribute ----------------------------------------PhysicalProject -------------------------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) +------------------------------------------PhysicalOlapScan[customer] apply RFs: RF10 +--------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF9 c_customer_sk->[ws_bill_customer_sk] +----------------------------------------PhysicalDistribute +------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 +--------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalProject +------------------------------------------------filter((date_dim.d_moy = 7) and (date_dim.d_year = 2000)) +--------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalDistribute +------------------------------------------PhysicalProject +--------------------------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query31.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query31.out index 4adb1ebb85..dc5b17ea99 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query31.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query31.out @@ -2,42 +2,44 @@ -- !ds_shape_31 -- PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) -----hashAgg[GLOBAL] -------PhysicalDistribute ---------hashAgg[LOCAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] ---------------PhysicalDistribute -----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ---------------------PhysicalProject -----------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------filter((ss.d_year = 1999) and d_qoy IN (1, 2, 3)) ---------------------------PhysicalOlapScan[date_dim] ---------------PhysicalDistribute -----------------PhysicalProject -------------------PhysicalOlapScan[customer_address] ---PhysicalCteAnchor ( cteId=CTEId#1 ) -----PhysicalCteProducer ( cteId=CTEId#1 ) +----PhysicalProject ------hashAgg[GLOBAL] --------PhysicalDistribute ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ws_bill_addr_sk] +--------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] ----------------PhysicalDistribute ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] +--------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------PhysicalProject -------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 +------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ----------------------PhysicalDistribute ------------------------PhysicalProject ---------------------------filter((ws.d_year = 1999) and d_qoy IN (1, 2, 3)) +--------------------------filter((ss.d_year = 1999) and d_qoy IN (1, 2, 3)) ----------------------------PhysicalOlapScan[date_dim] ----------------PhysicalDistribute ------------------PhysicalProject --------------------PhysicalOlapScan[customer_address] +--PhysicalCteAnchor ( cteId=CTEId#1 ) +----PhysicalCteProducer ( cteId=CTEId#1 ) +------PhysicalProject +--------hashAgg[GLOBAL] +----------PhysicalDistribute +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ws_bill_addr_sk] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------filter((ws.d_year = 1999) and d_qoy IN (1, 2, 3)) +------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------PhysicalOlapScan[customer_address] ----PhysicalResultSink ------PhysicalQuickSort[MERGE_SORT] --------PhysicalDistribute diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query35.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query35.out index 7530778f33..a85e61edf0 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query35.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query35.out @@ -9,51 +9,50 @@ PhysicalResultSink ------------PhysicalDistribute --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 1999)) ---------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------filter(($c$1 OR $c$2)) ---------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() -----------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF3 cd_demo_sk->[c_current_cdemo_sk] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[c_current_addr_sk] -----------------------------------------PhysicalDistribute -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 RF3 -----------------------------------------PhysicalDistribute -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[customer_address] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[customer_demographics] -------------------------------PhysicalDistribute ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 -------------------------------------PhysicalDistribute ---------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 1999)) -------------------------------------------PhysicalOlapScan[date_dim] +------------------filter(($c$1 OR $c$2)) +--------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() +----------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk] ----------------------------PhysicalDistribute ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +--------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] +----------------------------------PhysicalDistribute +------------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] +--------------------------------------PhysicalDistribute +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 +--------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalProject +------------------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 1999)) +--------------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------PhysicalDistribute +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5 ----------------------------------PhysicalDistribute ------------------------------------PhysicalProject ---------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 1999)) -----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------PhysicalOlapScan[customer_address] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[customer_demographics] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 1999)) +------------------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalDistribute +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 1999)) +----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query38.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query38.out index 42aba0dee4..160bd4fdd8 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query38.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query38.out @@ -8,55 +8,58 @@ PhysicalResultSink ----------hashAgg[LOCAL] ------------PhysicalProject --------------PhysicalIntersect -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk] ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ---------------------------------PhysicalDistribute +----------------PhysicalProject +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_month_seq <= 1200) and (date_dim.d_month_seq >= 1189)) ---------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 ---------------------------------PhysicalDistribute +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +----------------------------------PhysicalDistribute +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_month_seq <= 1200) and (date_dim.d_month_seq >= 1189)) +----------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[customer] +----------------PhysicalProject +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_month_seq <= 1200) and (date_dim.d_month_seq >= 1189)) ---------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 ---------------------------------PhysicalDistribute +------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 +----------------------------------PhysicalDistribute +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_month_seq <= 1200) and (date_dim.d_month_seq >= 1189)) +----------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[customer] +----------------PhysicalProject +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_month_seq <= 1200) and (date_dim.d_month_seq >= 1189)) ---------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer] +------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 +----------------------------------PhysicalDistribute +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_month_seq <= 1200) and (date_dim.d_month_seq >= 1189)) +----------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query51.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query51.out index 385c03c80a..ca96f0216a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query51.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query51.out @@ -1,48 +1,49 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_51 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalDistribute -------PhysicalTopN[LOCAL_SORT] ---------PhysicalProject -----------filter((web_cumulative > store_cumulative)) -------------PhysicalWindow ---------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute -------------------PhysicalProject ---------------------hashJoin[FULL_OUTER_JOIN] hashCondition=((web.d_date = store.d_date) and (web.item_sk = store.item_sk)) otherCondition=() -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalDistribute ---------------------------------PhysicalProject -----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute ---------------------------------------hashAgg[LOCAL] -----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ---------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 ---------------------------------------------PhysicalDistribute +--PhysicalProject +----PhysicalTopN[MERGE_SORT] +------PhysicalDistribute +--------PhysicalTopN[LOCAL_SORT] +----------PhysicalProject +------------filter((web_cumulative > store_cumulative)) +--------------PhysicalWindow +----------------PhysicalQuickSort[LOCAL_SORT] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------hashJoin[FULL_OUTER_JOIN] hashCondition=((web.d_date = store.d_date) and (web.item_sk = store.item_sk)) otherCondition=() +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------PhysicalWindow +------------------------------PhysicalQuickSort[LOCAL_SORT] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------hashAgg[GLOBAL] +--------------------------------------PhysicalDistribute +----------------------------------------hashAgg[LOCAL] +------------------------------------------PhysicalProject +--------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ----------------------------------------------PhysicalProject -------------------------------------------------filter((date_dim.d_month_seq <= 1223) and (date_dim.d_month_seq >= 1212)) ---------------------------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalDistribute ---------------------------------PhysicalProject -----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute ---------------------------------------hashAgg[LOCAL] -----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ---------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ---------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +----------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalProject +--------------------------------------------------filter((date_dim.d_month_seq <= 1223) and (date_dim.d_month_seq >= 1212)) +----------------------------------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------PhysicalWindow +------------------------------PhysicalQuickSort[LOCAL_SORT] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------hashAgg[GLOBAL] +--------------------------------------PhysicalDistribute +----------------------------------------hashAgg[LOCAL] +------------------------------------------PhysicalProject +--------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------------PhysicalProject -------------------------------------------------filter((date_dim.d_month_seq <= 1223) and (date_dim.d_month_seq >= 1212)) ---------------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 +----------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalProject +--------------------------------------------------filter((date_dim.d_month_seq <= 1223) and (date_dim.d_month_seq >= 1212)) +----------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query53.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query53.out index 02334d09c9..9bde953f89 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query53.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query53.out @@ -1,35 +1,36 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_53 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalDistribute -------PhysicalTopN[LOCAL_SORT] ---------PhysicalProject -----------filter((if((avg_quarterly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_quarterly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_quarterly_sales), NULL) > 0.100000)) -------------PhysicalWindow ---------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute -------------------PhysicalProject ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------------PhysicalDistribute -----------------------------------------PhysicalProject -------------------------------------------filter((((i_category IN ('Books', 'Children', 'Electronics') AND i_class IN ('personal', 'portable', 'reference', 'self-help')) AND i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')) OR ((i_category IN ('Men', 'Music', 'Women') AND i_class IN ('accessories', 'classical', 'fragrances', 'pants')) AND i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')))) ---------------------------------------------PhysicalOlapScan[item] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------filter(d_month_seq IN (1186, 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197)) -----------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalDistribute +--PhysicalProject +----PhysicalTopN[MERGE_SORT] +------PhysicalDistribute +--------PhysicalTopN[LOCAL_SORT] +----------PhysicalProject +------------filter((if((avg_quarterly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_quarterly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_quarterly_sales), NULL) > 0.100000)) +--------------PhysicalWindow +----------------PhysicalQuickSort[LOCAL_SORT] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------hashAgg[GLOBAL] +------------------------PhysicalDistribute +--------------------------hashAgg[LOCAL] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store] +----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------------------------PhysicalProject +--------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +----------------------------------------PhysicalDistribute +------------------------------------------PhysicalProject +--------------------------------------------filter((((i_category IN ('Books', 'Children', 'Electronics') AND i_class IN ('personal', 'portable', 'reference', 'self-help')) AND i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')) OR ((i_category IN ('Men', 'Music', 'Women') AND i_class IN ('accessories', 'classical', 'fragrances', 'pants')) AND i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')))) +----------------------------------------------PhysicalOlapScan[item] +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------filter(d_month_seq IN (1186, 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197)) +------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query59.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query59.out index 2981435bc5..518f193edf 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query59.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query59.out @@ -2,16 +2,17 @@ -- !ds_shape_59 -- PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) -----hashAgg[GLOBAL] -------PhysicalDistribute ---------hashAgg[LOCAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ---------------PhysicalProject -----------------PhysicalOlapScan[store_sales] apply RFs: RF0 ---------------PhysicalDistribute +----PhysicalProject +------hashAgg[GLOBAL] +--------PhysicalDistribute +----------hashAgg[LOCAL] +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------PhysicalProject -------------------PhysicalOlapScan[date_dim] +------------------PhysicalOlapScan[store_sales] apply RFs: RF0 +----------------PhysicalDistribute +------------------PhysicalProject +--------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalProject ------PhysicalTopN[MERGE_SORT] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query87.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query87.out index 054bf781d2..8d28654a2a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query87.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query87.out @@ -6,55 +6,58 @@ PhysicalResultSink ------hashAgg[LOCAL] --------PhysicalProject ----------PhysicalExcept -------------hashAgg[GLOBAL] ---------------PhysicalDistribute -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------------PhysicalDistribute +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_month_seq <= 1213) and (date_dim.d_month_seq >= 1202)) -----------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------PhysicalOlapScan[customer] -------------hashAgg[GLOBAL] ---------------PhysicalDistribute -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 -----------------------------PhysicalDistribute +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------filter((date_dim.d_month_seq <= 1213) and (date_dim.d_month_seq >= 1202)) +------------------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[customer] +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_month_seq <= 1213) and (date_dim.d_month_seq >= 1202)) -----------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------PhysicalOlapScan[customer] -------------hashAgg[GLOBAL] ---------------PhysicalDistribute -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 -----------------------------PhysicalDistribute +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------filter((date_dim.d_month_seq <= 1213) and (date_dim.d_month_seq >= 1202)) +------------------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[customer] +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_month_seq <= 1213) and (date_dim.d_month_seq >= 1202)) -----------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------PhysicalOlapScan[customer] +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------filter((date_dim.d_month_seq <= 1213) and (date_dim.d_month_seq >= 1202)) +------------------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query94.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query94.out index 4e6d82d7ab..b7cc3a9c80 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query94.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query94.out @@ -3,36 +3,37 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] -------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF4 ws_order_number->[ws_order_number] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 ---------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() build RFs:RF3 ws_order_number->[wr_order_number] +------PhysicalProject +--------hashAgg[DISTINCT_GLOBAL] +----------PhysicalDistribute +------------hashAgg[DISTINCT_LOCAL] +--------------hashAgg[GLOBAL] +----------------hashAgg[LOCAL] +------------------PhysicalProject +--------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF4 ws_order_number->[ws_order_number] ----------------------PhysicalDistribute ------------------------PhysicalProject ---------------------------PhysicalOlapScan[web_returns] apply RFs: RF3 -----------------------PhysicalDistribute -------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_sk] ---------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_ship_date_sk] -----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 +--------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 +----------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() build RFs:RF3 ws_order_number->[wr_order_number] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[web_returns] apply RFs: RF3 +------------------------PhysicalDistribute +--------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_ship_date_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------filter((customer_address.ca_state = 'OK')) +--------------------------------------PhysicalOlapScan[customer_address] ------------------------------PhysicalDistribute --------------------------------PhysicalProject -----------------------------------filter((customer_address.ca_state = 'OK')) -------------------------------------PhysicalOlapScan[customer_address] +----------------------------------filter((date_dim.d_date <= '2002-06-30') and (date_dim.d_date >= '2002-05-01')) +------------------------------------PhysicalOlapScan[date_dim] ----------------------------PhysicalDistribute ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '2002-06-30') and (date_dim.d_date >= '2002-05-01')) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------filter((web_site.web_company_name = 'pri')) ---------------------------------PhysicalOlapScan[web_site] +--------------------------------filter((web_site.web_company_name = 'pri')) +----------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query95.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query95.out index 55fdf59995..2344273a88 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query95.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query95.out @@ -6,48 +6,49 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] --------PhysicalDistribute ----------PhysicalProject -------------PhysicalOlapScan[web_sales] apply RFs: RF0 +------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF6 RF7 --------PhysicalDistribute ----------PhysicalProject -------------PhysicalOlapScan[web_sales] +------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalTopN[LOCAL_SORT] ---------hashAgg[DISTINCT_GLOBAL] -----------PhysicalDistribute -------------hashAgg[DISTINCT_LOCAL] ---------------hashAgg[GLOBAL] -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() -----------------------PhysicalDistribute +--------PhysicalProject +----------hashAgg[DISTINCT_GLOBAL] +------------PhysicalDistribute +--------------hashAgg[DISTINCT_LOCAL] +----------------hashAgg[GLOBAL] +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() ------------------------PhysicalProject ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF5 ws_order_number->[wr_order_number] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF4 wr_order_number->[ws_order_number] +--------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF5 wr_order_number->[ws_order_number];RF7 wr_order_number->[ws_order_number,ws_order_number] ----------------------------PhysicalDistribute ------------------------------PhysicalProject --------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------------PhysicalDistribute ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_returns] apply RFs: RF5 -------------------------PhysicalDistribute ---------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] -----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_ship_date_sk] -------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 +--------------------------------PhysicalOlapScan[web_returns] +------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF4 ws_order_number->[ws_order_number];RF6 ws_order_number->[ws_order_number,ws_order_number] +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +--------------------------PhysicalDistribute +----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_ship_date_sk] +--------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 +----------------------------------PhysicalDistribute +------------------------------------PhysicalProject +--------------------------------------filter((customer_address.ca_state = 'VA')) +----------------------------------------PhysicalOlapScan[customer_address] --------------------------------PhysicalDistribute ----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_state = 'VA')) ---------------------------------------PhysicalOlapScan[customer_address] +------------------------------------filter((date_dim.d_date <= '2001-05-31') and (date_dim.d_date >= '2001-04-01')) +--------------------------------------PhysicalOlapScan[date_dim] ------------------------------PhysicalDistribute --------------------------------PhysicalProject -----------------------------------filter((date_dim.d_date <= '2001-05-31') and (date_dim.d_date >= '2001-04-01')) -------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------filter((web_site.web_company_name = 'pri')) -----------------------------------PhysicalOlapScan[web_site] +----------------------------------filter((web_site.web_company_name = 'pri')) +------------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query10.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query10.out index 965a23d852..853ad14be7 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query10.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query10.out @@ -9,49 +9,48 @@ PhysicalResultSink ------------PhysicalDistribute --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) ---------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------filter(($c$1 OR $c$2)) ---------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() -----------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] -----------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() -------------------------------------PhysicalDistribute ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 -------------------------------------PhysicalDistribute ---------------------------------------PhysicalOlapScan[customer_demographics] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County')) -----------------------------------------PhysicalOlapScan[customer_address] -------------------------------PhysicalDistribute ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 -------------------------------------PhysicalDistribute ---------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) -------------------------------------------PhysicalOlapScan[date_dim] +------------------filter(($c$1 OR $c$2)) +--------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() +----------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +------------------------PhysicalProject +--------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] ----------------------------PhysicalDistribute ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +--------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 ----------------------------------PhysicalDistribute ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) ----------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalDistribute +------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() +--------------------------------PhysicalDistribute +----------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[c_current_addr_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County')) +------------------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalDistribute +----------------------------------PhysicalOlapScan[customer_demographics] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) +------------------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalDistribute +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) +----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query16.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query16.out index b08f9d6273..d7431a4cc9 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query16.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query16.out @@ -3,36 +3,37 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] -------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() ---------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk] -----------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF2 cs_order_number->[cs_order_number] -------------------------PhysicalDistribute ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 -------------------------PhysicalDistribute ---------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[cs_ship_addr_sk] -----------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_ship_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF3 +------PhysicalProject +--------hashAgg[DISTINCT_GLOBAL] +----------PhysicalDistribute +------------hashAgg[DISTINCT_LOCAL] +--------------hashAgg[GLOBAL] +----------------hashAgg[LOCAL] +------------------PhysicalProject +--------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() +----------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk] +------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF2 cs_order_number->[cs_order_number] +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 +--------------------------PhysicalDistribute +----------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[cs_ship_addr_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_ship_date_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF3 +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) +--------------------------------------PhysicalOlapScan[date_dim] ------------------------------PhysicalDistribute --------------------------------PhysicalProject -----------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) -------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------filter((customer_address.ca_state = 'WV')) -----------------------------------PhysicalOlapScan[customer_address] +----------------------------------filter((customer_address.ca_state = 'WV')) +------------------------------------PhysicalOlapScan[customer_address] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) +------------------------------PhysicalOlapScan[call_center] ----------------------PhysicalDistribute ------------------------PhysicalProject ---------------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) -----------------------------PhysicalOlapScan[call_center] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------PhysicalOlapScan[catalog_returns] +--------------------------PhysicalOlapScan[catalog_returns] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query31.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query31.out index b99861d990..7f18759a2f 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query31.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query31.out @@ -2,39 +2,41 @@ -- !ds_shape_31 -- PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) -----hashAgg[GLOBAL] -------PhysicalDistribute ---------hashAgg[LOCAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ---------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() -----------------PhysicalProject -------------------PhysicalOlapScan[store_sales] apply RFs: RF1 -----------------PhysicalDistribute -------------------PhysicalProject ---------------------PhysicalOlapScan[customer_address] ---------------PhysicalDistribute -----------------PhysicalProject -------------------filter((ss.d_year = 2000) and d_qoy IN (1, 2, 3)) ---------------------PhysicalOlapScan[date_dim] ---PhysicalCteAnchor ( cteId=CTEId#1 ) -----PhysicalCteProducer ( cteId=CTEId#1 ) +----PhysicalProject ------hashAgg[GLOBAL] --------PhysicalDistribute ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ws_sold_date_sk] -----------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ws_bill_addr_sk] -------------------PhysicalDistribute ---------------------PhysicalProject -----------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 +--------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() +------------------PhysicalProject +--------------------PhysicalOlapScan[store_sales] apply RFs: RF1 ------------------PhysicalDistribute --------------------PhysicalProject ----------------------PhysicalOlapScan[customer_address] ----------------PhysicalDistribute ------------------PhysicalProject ---------------------filter((ws.d_year = 2000) and d_qoy IN (1, 2, 3)) +--------------------filter((ss.d_year = 2000) and d_qoy IN (1, 2, 3)) ----------------------PhysicalOlapScan[date_dim] +--PhysicalCteAnchor ( cteId=CTEId#1 ) +----PhysicalCteProducer ( cteId=CTEId#1 ) +------PhysicalProject +--------hashAgg[GLOBAL] +----------PhysicalDistribute +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ws_sold_date_sk] +------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ws_bill_addr_sk] +--------------------PhysicalDistribute +----------------------PhysicalProject +------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 +--------------------PhysicalDistribute +----------------------PhysicalProject +------------------------PhysicalOlapScan[customer_address] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------filter((ws.d_year = 2000) and d_qoy IN (1, 2, 3)) +------------------------PhysicalOlapScan[date_dim] ----PhysicalResultSink ------PhysicalQuickSort[MERGE_SORT] --------PhysicalDistribute diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query35.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query35.out index 5be1b1c561..dacc3f6f24 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query35.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query35.out @@ -9,50 +9,49 @@ PhysicalResultSink ------------PhysicalDistribute --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ---------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------filter(($c$1 OR $c$2)) ---------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() -----------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() -----------------------------------PhysicalDistribute -------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() ---------------------------------------PhysicalDistribute -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[customer] ---------------------------------------PhysicalDistribute -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[customer_demographics] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[customer_address] -------------------------------PhysicalDistribute ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 -------------------------------------PhysicalDistribute ---------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) -------------------------------------------PhysicalOlapScan[date_dim] +------------------filter(($c$1 OR $c$2)) +--------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() +----------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +------------------------PhysicalProject +--------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() ----------------------------PhysicalDistribute ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +--------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 ----------------------------------PhysicalDistribute ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ----------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalDistribute +------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() +--------------------------------PhysicalDistribute +----------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[customer] +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[customer_demographics] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) +------------------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalDistribute +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) +----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query38.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query38.out index 0d19a28114..38bd42a7c9 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query38.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query38.out @@ -8,52 +8,55 @@ PhysicalResultSink ----------hashAgg[LOCAL] ------------PhysicalProject --------------PhysicalIntersect -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() +----------------PhysicalProject +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[customer] ----------------------------PhysicalDistribute ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 +--------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) +----------------------------------PhysicalOlapScan[date_dim] +----------------PhysicalProject +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cs_bill_customer_sk] +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[customer] ----------------------------PhysicalDistribute ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[customer] ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ---------------------------------PhysicalOlapScan[date_dim] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] ---------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cs_bill_customer_sk] +--------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) +----------------------------------PhysicalOlapScan[date_dim] +----------------PhysicalProject +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ws_bill_customer_sk] +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[customer] ----------------------------PhysicalDistribute ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[customer] ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ---------------------------------PhysicalOlapScan[date_dim] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] ---------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ws_bill_customer_sk] -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[customer] ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) +----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query51.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query51.out index ecf279836c..0278c0a003 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query51.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query51.out @@ -1,48 +1,49 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_51 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalDistribute -------PhysicalTopN[LOCAL_SORT] ---------PhysicalProject -----------filter((web_cumulative > store_cumulative)) -------------PhysicalWindow ---------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute -------------------PhysicalProject ---------------------hashJoin[FULL_OUTER_JOIN] hashCondition=((web.d_date = store.d_date) and (web.item_sk = store.item_sk)) otherCondition=() -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalDistribute ---------------------------------PhysicalProject -----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute ---------------------------------------hashAgg[LOCAL] -----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ---------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 ---------------------------------------------PhysicalDistribute +--PhysicalProject +----PhysicalTopN[MERGE_SORT] +------PhysicalDistribute +--------PhysicalTopN[LOCAL_SORT] +----------PhysicalProject +------------filter((web_cumulative > store_cumulative)) +--------------PhysicalWindow +----------------PhysicalQuickSort[LOCAL_SORT] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------hashJoin[FULL_OUTER_JOIN] hashCondition=((web.d_date = store.d_date) and (web.item_sk = store.item_sk)) otherCondition=() +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------PhysicalWindow +------------------------------PhysicalQuickSort[LOCAL_SORT] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------hashAgg[GLOBAL] +--------------------------------------PhysicalDistribute +----------------------------------------hashAgg[LOCAL] +------------------------------------------PhysicalProject +--------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------------------------PhysicalProject -------------------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) ---------------------------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalDistribute ---------------------------------PhysicalProject -----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute ---------------------------------------hashAgg[LOCAL] -----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] ---------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 ---------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 +----------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalProject +--------------------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) +----------------------------------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------PhysicalWindow +------------------------------PhysicalQuickSort[LOCAL_SORT] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------hashAgg[GLOBAL] +--------------------------------------PhysicalDistribute +----------------------------------------hashAgg[LOCAL] +------------------------------------------PhysicalProject +--------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] ----------------------------------------------PhysicalProject -------------------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) ---------------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +----------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalProject +--------------------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) +----------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query53.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query53.out index bf274d37d4..24df13e1db 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query53.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query53.out @@ -1,34 +1,35 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_53 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalDistribute -------PhysicalTopN[LOCAL_SORT] ---------PhysicalProject -----------filter((if((avg_quarterly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_quarterly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_quarterly_sales), NULL) > 0.100000)) -------------PhysicalWindow ---------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute -------------------PhysicalProject ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] -----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +--PhysicalProject +----PhysicalTopN[MERGE_SORT] +------PhysicalDistribute +--------PhysicalTopN[LOCAL_SORT] +----------PhysicalProject +------------filter((if((avg_quarterly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_quarterly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_quarterly_sales), NULL) > 0.100000)) +--------------PhysicalWindow +----------------PhysicalQuickSort[LOCAL_SORT] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------hashAgg[GLOBAL] +------------------------PhysicalDistribute +--------------------------hashAgg[LOCAL] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] +------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +--------------------------------------PhysicalDistribute +----------------------------------------PhysicalProject +------------------------------------------filter(d_month_seq IN (1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211)) +--------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalDistribute --------------------------------------PhysicalProject -----------------------------------------filter(d_month_seq IN (1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211)) -------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------filter((((i_category IN ('Books', 'Children', 'Electronics') AND i_class IN ('personal', 'portable', 'reference', 'self-help')) AND i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')) OR ((i_category IN ('Men', 'Music', 'Women') AND i_class IN ('accessories', 'classical', 'fragrances', 'pants')) AND i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')))) -----------------------------------------PhysicalOlapScan[item] -------------------------------PhysicalDistribute ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store] +----------------------------------------filter((((i_category IN ('Books', 'Children', 'Electronics') AND i_class IN ('personal', 'portable', 'reference', 'self-help')) AND i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')) OR ((i_category IN ('Men', 'Music', 'Women') AND i_class IN ('accessories', 'classical', 'fragrances', 'pants')) AND i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')))) +------------------------------------------PhysicalOlapScan[item] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query54.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query54.out index c0c2047082..dcd43dc4bc 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query54.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query54.out @@ -51,8 +51,8 @@ PhysicalResultSink ----------------------------------PhysicalOlapScan[customer_address] --------------------------PhysicalDistribute ----------------------------PhysicalProject -------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= (d_month_seq + 1)) ---------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= (d_month_seq + 3)) +------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= (d_month_seq + 3)) +--------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= (d_month_seq + 1)) ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[date_dim] ----------------------------------PhysicalDistribute diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query59.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query59.out index d731b71a90..2c0eb7317a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query59.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query59.out @@ -2,16 +2,17 @@ -- !ds_shape_59 -- PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) -----hashAgg[GLOBAL] -------PhysicalDistribute ---------hashAgg[LOCAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() ---------------PhysicalProject -----------------PhysicalOlapScan[store_sales] ---------------PhysicalDistribute +----PhysicalProject +------hashAgg[GLOBAL] +--------PhysicalDistribute +----------hashAgg[LOCAL] +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() ----------------PhysicalProject -------------------PhysicalOlapScan[date_dim] +------------------PhysicalOlapScan[store_sales] +----------------PhysicalDistribute +------------------PhysicalProject +--------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalProject ------PhysicalTopN[MERGE_SORT] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query87.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query87.out index 8ca07c488e..56a1416b7c 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query87.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query87.out @@ -6,52 +6,55 @@ PhysicalResultSink ------hashAgg[LOCAL] --------PhysicalProject ----------PhysicalExcept -------------hashAgg[GLOBAL] ---------------PhysicalDistribute -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] -----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[customer] ------------------------PhysicalDistribute --------------------------PhysicalProject -----------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 +----------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) +------------------------------PhysicalOlapScan[date_dim] +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cs_bill_customer_sk] +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[customer] ------------------------PhysicalDistribute --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) -----------------------------PhysicalOlapScan[date_dim] -------------hashAgg[GLOBAL] ---------------PhysicalDistribute -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] -----------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cs_bill_customer_sk] +----------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) +------------------------------PhysicalOlapScan[date_dim] +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ws_bill_customer_sk] +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[customer] ------------------------PhysicalDistribute --------------------------PhysicalProject -----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 -------------------------PhysicalDistribute ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) -----------------------------PhysicalOlapScan[date_dim] -------------hashAgg[GLOBAL] ---------------PhysicalDistribute -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] -----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ws_bill_customer_sk] -------------------------PhysicalDistribute ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 -------------------------PhysicalDistribute ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) -----------------------------PhysicalOlapScan[date_dim] +----------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) +------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query94.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query94.out index a7f921c597..879e2acc49 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query94.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query94.out @@ -3,36 +3,37 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] -------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() ---------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] -----------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF2 ws_order_number->[ws_order_number] -------------------------PhysicalDistribute ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 -------------------------PhysicalDistribute ---------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk] -----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_ship_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF3 +------PhysicalProject +--------hashAgg[DISTINCT_GLOBAL] +----------PhysicalDistribute +------------hashAgg[DISTINCT_LOCAL] +--------------hashAgg[GLOBAL] +----------------hashAgg[LOCAL] +------------------PhysicalProject +--------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() +----------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] +------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF2 ws_order_number->[ws_order_number] +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 +--------------------------PhysicalDistribute +----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_ship_date_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF3 +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) +--------------------------------------PhysicalOlapScan[date_dim] ------------------------------PhysicalDistribute --------------------------------PhysicalProject -----------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) -------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------filter((customer_address.ca_state = 'OK')) -----------------------------------PhysicalOlapScan[customer_address] +----------------------------------filter((customer_address.ca_state = 'OK')) +------------------------------------PhysicalOlapScan[customer_address] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------filter((web_site.web_company_name = 'pri')) +------------------------------PhysicalOlapScan[web_site] ----------------------PhysicalDistribute ------------------------PhysicalProject ---------------------------filter((web_site.web_company_name = 'pri')) -----------------------------PhysicalOlapScan[web_site] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------PhysicalOlapScan[web_returns] +--------------------------PhysicalOlapScan[web_returns] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query95.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query95.out index 62afa40397..0d457d1bc7 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query95.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query95.out @@ -3,51 +3,52 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) +------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] --------PhysicalDistribute ----------PhysicalProject -------------PhysicalOlapScan[web_sales] +------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF6 RF7 --------PhysicalDistribute ----------PhysicalProject -------------PhysicalOlapScan[web_sales] +------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalTopN[LOCAL_SORT] ---------hashAgg[DISTINCT_GLOBAL] -----------PhysicalDistribute -------------hashAgg[DISTINCT_LOCAL] ---------------hashAgg[GLOBAL] -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() -----------------------PhysicalDistribute +--------PhysicalProject +----------hashAgg[DISTINCT_GLOBAL] +------------PhysicalDistribute +--------------hashAgg[DISTINCT_LOCAL] +----------------hashAgg[GLOBAL] +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() ------------------------PhysicalProject ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF5 ws_order_number->[wr_order_number] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF4 wr_order_number->[ws_order_number] +--------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF5 wr_order_number->[ws_order_number];RF7 wr_order_number->[ws_order_number,ws_order_number] ----------------------------PhysicalDistribute ------------------------------PhysicalProject --------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------------PhysicalDistribute ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_returns] apply RFs: RF5 -------------------------PhysicalDistribute ---------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] -----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ws_ship_addr_sk] -------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_ship_date_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 +--------------------------------PhysicalOlapScan[web_returns] +------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF4 ws_order_number->[ws_order_number];RF6 ws_order_number->[ws_order_number,ws_order_number] +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +--------------------------PhysicalDistribute +----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ws_ship_addr_sk] +--------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_ship_date_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 +----------------------------------PhysicalDistribute +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalDistribute ----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) ---------------------------------------PhysicalOlapScan[date_dim] +------------------------------------filter((customer_address.ca_state = 'NC')) +--------------------------------------PhysicalOlapScan[customer_address] ------------------------------PhysicalDistribute --------------------------------PhysicalProject -----------------------------------filter((customer_address.ca_state = 'NC')) -------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------filter((web_site.web_company_name = 'pri')) -----------------------------------PhysicalOlapScan[web_site] +----------------------------------filter((web_site.web_company_name = 'pri')) +------------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query10.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query10.out index c4510a0e0c..9abd313cfd 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query10.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query10.out @@ -9,49 +9,48 @@ PhysicalResultSink ------------PhysicalDistribute --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) ---------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------filter(($c$1 OR $c$2)) ---------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() -----------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] -----------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF2 cd_demo_sk->[c_current_cdemo_sk] -------------------------------------PhysicalDistribute ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 RF3 -------------------------------------PhysicalDistribute ---------------------------------------PhysicalOlapScan[customer_demographics] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County')) -----------------------------------------PhysicalOlapScan[customer_address] -------------------------------PhysicalDistribute ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 -------------------------------------PhysicalDistribute ---------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) -------------------------------------------PhysicalOlapScan[date_dim] +------------------filter(($c$1 OR $c$2)) +--------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() +----------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +------------------------PhysicalProject +--------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] ----------------------------PhysicalDistribute ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +--------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 ----------------------------------PhysicalDistribute ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) ----------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalDistribute +------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF3 cd_demo_sk->[c_current_cdemo_sk] +--------------------------------PhysicalDistribute +----------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[c_current_addr_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 RF3 +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County')) +------------------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalDistribute +----------------------------------PhysicalOlapScan[customer_demographics] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) +------------------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalDistribute +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) +----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query16.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query16.out index b08f9d6273..d7431a4cc9 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query16.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query16.out @@ -3,36 +3,37 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] -------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() ---------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk] -----------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF2 cs_order_number->[cs_order_number] -------------------------PhysicalDistribute ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 -------------------------PhysicalDistribute ---------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[cs_ship_addr_sk] -----------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_ship_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF3 +------PhysicalProject +--------hashAgg[DISTINCT_GLOBAL] +----------PhysicalDistribute +------------hashAgg[DISTINCT_LOCAL] +--------------hashAgg[GLOBAL] +----------------hashAgg[LOCAL] +------------------PhysicalProject +--------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() +----------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk] +------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF2 cs_order_number->[cs_order_number] +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 +--------------------------PhysicalDistribute +----------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[cs_ship_addr_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_ship_date_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF3 +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) +--------------------------------------PhysicalOlapScan[date_dim] ------------------------------PhysicalDistribute --------------------------------PhysicalProject -----------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) -------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------filter((customer_address.ca_state = 'WV')) -----------------------------------PhysicalOlapScan[customer_address] +----------------------------------filter((customer_address.ca_state = 'WV')) +------------------------------------PhysicalOlapScan[customer_address] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) +------------------------------PhysicalOlapScan[call_center] ----------------------PhysicalDistribute ------------------------PhysicalProject ---------------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) -----------------------------PhysicalOlapScan[call_center] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------PhysicalOlapScan[catalog_returns] +--------------------------PhysicalOlapScan[catalog_returns] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query31.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query31.out index 281bc604c6..af348e09ac 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query31.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query31.out @@ -2,39 +2,41 @@ -- !ds_shape_31 -- PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) -----hashAgg[GLOBAL] -------PhysicalDistribute ---------hashAgg[LOCAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ---------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ss_addr_sk] -----------------PhysicalProject -------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------PhysicalDistribute -------------------PhysicalProject ---------------------PhysicalOlapScan[customer_address] ---------------PhysicalDistribute -----------------PhysicalProject -------------------filter((ss.d_year = 2000) and d_qoy IN (1, 2, 3)) ---------------------PhysicalOlapScan[date_dim] ---PhysicalCteAnchor ( cteId=CTEId#1 ) -----PhysicalCteProducer ( cteId=CTEId#1 ) +----PhysicalProject ------hashAgg[GLOBAL] --------PhysicalDistribute ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ws_sold_date_sk] -----------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ws_bill_addr_sk] -------------------PhysicalDistribute ---------------------PhysicalProject -----------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 +--------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ss_addr_sk] +------------------PhysicalProject +--------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------PhysicalDistribute --------------------PhysicalProject ----------------------PhysicalOlapScan[customer_address] ----------------PhysicalDistribute ------------------PhysicalProject ---------------------filter((ws.d_year = 2000) and d_qoy IN (1, 2, 3)) +--------------------filter((ss.d_year = 2000) and d_qoy IN (1, 2, 3)) ----------------------PhysicalOlapScan[date_dim] +--PhysicalCteAnchor ( cteId=CTEId#1 ) +----PhysicalCteProducer ( cteId=CTEId#1 ) +------PhysicalProject +--------hashAgg[GLOBAL] +----------PhysicalDistribute +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ws_sold_date_sk] +------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ws_bill_addr_sk] +--------------------PhysicalDistribute +----------------------PhysicalProject +------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 +--------------------PhysicalDistribute +----------------------PhysicalProject +------------------------PhysicalOlapScan[customer_address] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------filter((ws.d_year = 2000) and d_qoy IN (1, 2, 3)) +------------------------PhysicalOlapScan[date_dim] ----PhysicalResultSink ------PhysicalQuickSort[MERGE_SORT] --------PhysicalDistribute diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query35.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query35.out index 3c87143276..309523a3ad 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query35.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query35.out @@ -9,50 +9,49 @@ PhysicalResultSink ------------PhysicalDistribute --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ---------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------filter(($c$1 OR $c$2)) ---------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() -----------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] -----------------------------------PhysicalDistribute -------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF2 cd_demo_sk->[c_current_cdemo_sk] ---------------------------------------PhysicalDistribute -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 RF3 ---------------------------------------PhysicalDistribute -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[customer_demographics] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[customer_address] -------------------------------PhysicalDistribute ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 -------------------------------------PhysicalDistribute ---------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) -------------------------------------------PhysicalOlapScan[date_dim] +------------------filter(($c$1 OR $c$2)) +--------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() +----------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +------------------------PhysicalProject +--------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] ----------------------------PhysicalDistribute ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +--------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 ----------------------------------PhysicalDistribute ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ----------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalDistribute +------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF3 cd_demo_sk->[c_current_cdemo_sk] +--------------------------------PhysicalDistribute +----------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[c_current_addr_sk] +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 RF3 +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[customer_demographics] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) +------------------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalDistribute +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) +----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query38.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query38.out index 85f941f6e6..deaed932e3 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query38.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query38.out @@ -8,52 +8,55 @@ PhysicalResultSink ----------hashAgg[LOCAL] ------------PhysicalProject --------------PhysicalIntersect -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ss_customer_sk] +----------------PhysicalProject +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ss_customer_sk] +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[customer] ----------------------------PhysicalDistribute ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +--------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) +----------------------------------PhysicalOlapScan[date_dim] +----------------PhysicalProject +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cs_bill_customer_sk] +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[customer] ----------------------------PhysicalDistribute ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[customer] ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ---------------------------------PhysicalOlapScan[date_dim] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] ---------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cs_bill_customer_sk] +--------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) +----------------------------------PhysicalOlapScan[date_dim] +----------------PhysicalProject +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ws_bill_customer_sk] +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[customer] ----------------------------PhysicalDistribute ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[customer] ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ---------------------------------PhysicalOlapScan[date_dim] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] ---------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ws_bill_customer_sk] -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[customer] ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) +----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query51.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query51.out index ecf279836c..0278c0a003 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query51.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query51.out @@ -1,48 +1,49 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_51 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalDistribute -------PhysicalTopN[LOCAL_SORT] ---------PhysicalProject -----------filter((web_cumulative > store_cumulative)) -------------PhysicalWindow ---------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute -------------------PhysicalProject ---------------------hashJoin[FULL_OUTER_JOIN] hashCondition=((web.d_date = store.d_date) and (web.item_sk = store.item_sk)) otherCondition=() -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalDistribute ---------------------------------PhysicalProject -----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute ---------------------------------------hashAgg[LOCAL] -----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ---------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 ---------------------------------------------PhysicalDistribute +--PhysicalProject +----PhysicalTopN[MERGE_SORT] +------PhysicalDistribute +--------PhysicalTopN[LOCAL_SORT] +----------PhysicalProject +------------filter((web_cumulative > store_cumulative)) +--------------PhysicalWindow +----------------PhysicalQuickSort[LOCAL_SORT] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------hashJoin[FULL_OUTER_JOIN] hashCondition=((web.d_date = store.d_date) and (web.item_sk = store.item_sk)) otherCondition=() +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------PhysicalWindow +------------------------------PhysicalQuickSort[LOCAL_SORT] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------hashAgg[GLOBAL] +--------------------------------------PhysicalDistribute +----------------------------------------hashAgg[LOCAL] +------------------------------------------PhysicalProject +--------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------------------------PhysicalProject -------------------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) ---------------------------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalDistribute ---------------------------------PhysicalProject -----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute ---------------------------------------hashAgg[LOCAL] -----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] ---------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 ---------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 +----------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalProject +--------------------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) +----------------------------------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------PhysicalWindow +------------------------------PhysicalQuickSort[LOCAL_SORT] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------hashAgg[GLOBAL] +--------------------------------------PhysicalDistribute +----------------------------------------hashAgg[LOCAL] +------------------------------------------PhysicalProject +--------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] ----------------------------------------------PhysicalProject -------------------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) ---------------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +----------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalProject +--------------------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) +----------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query53.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query53.out index d3ff697f4f..d68abeea8b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query53.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query53.out @@ -1,34 +1,35 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_53 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalDistribute -------PhysicalTopN[LOCAL_SORT] ---------PhysicalProject -----------filter((if((avg_quarterly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_quarterly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_quarterly_sales), NULL) > 0.100000)) -------------PhysicalWindow ---------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute -------------------PhysicalProject ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] -----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +--PhysicalProject +----PhysicalTopN[MERGE_SORT] +------PhysicalDistribute +--------PhysicalTopN[LOCAL_SORT] +----------PhysicalProject +------------filter((if((avg_quarterly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_quarterly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_quarterly_sales), NULL) > 0.100000)) +--------------PhysicalWindow +----------------PhysicalQuickSort[LOCAL_SORT] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------hashAgg[GLOBAL] +------------------------PhysicalDistribute +--------------------------hashAgg[LOCAL] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] +------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +--------------------------------------PhysicalDistribute +----------------------------------------PhysicalProject +------------------------------------------filter(d_month_seq IN (1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211)) +--------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalDistribute --------------------------------------PhysicalProject -----------------------------------------filter(d_month_seq IN (1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211)) -------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------filter((((i_category IN ('Books', 'Children', 'Electronics') AND i_class IN ('personal', 'portable', 'reference', 'self-help')) AND i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')) OR ((i_category IN ('Men', 'Music', 'Women') AND i_class IN ('accessories', 'classical', 'fragrances', 'pants')) AND i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')))) -----------------------------------------PhysicalOlapScan[item] -------------------------------PhysicalDistribute ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store] +----------------------------------------filter((((i_category IN ('Books', 'Children', 'Electronics') AND i_class IN ('personal', 'portable', 'reference', 'self-help')) AND i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')) OR ((i_category IN ('Men', 'Music', 'Women') AND i_class IN ('accessories', 'classical', 'fragrances', 'pants')) AND i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')))) +------------------------------------------PhysicalOlapScan[item] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query54.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query54.out index 79fea752c1..154cee12d9 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query54.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query54.out @@ -51,8 +51,8 @@ PhysicalResultSink ----------------------------------PhysicalOlapScan[customer_address] apply RFs: RF5 RF6 --------------------------PhysicalDistribute ----------------------------PhysicalProject -------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= (d_month_seq + 1)) ---------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= (d_month_seq + 3)) +------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= (d_month_seq + 3)) +--------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= (d_month_seq + 1)) ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[date_dim] ----------------------------------PhysicalDistribute diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query59.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query59.out index 65458d6bf5..4b8285602d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query59.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query59.out @@ -2,16 +2,17 @@ -- !ds_shape_59 -- PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) -----hashAgg[GLOBAL] -------PhysicalDistribute ---------hashAgg[LOCAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ---------------PhysicalProject -----------------PhysicalOlapScan[store_sales] apply RFs: RF0 ---------------PhysicalDistribute +----PhysicalProject +------hashAgg[GLOBAL] +--------PhysicalDistribute +----------hashAgg[LOCAL] +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------PhysicalProject -------------------PhysicalOlapScan[date_dim] +------------------PhysicalOlapScan[store_sales] apply RFs: RF0 +----------------PhysicalDistribute +------------------PhysicalProject +--------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalProject ------PhysicalTopN[MERGE_SORT] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query87.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query87.out index 4b56c6e981..6ae69062e0 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query87.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query87.out @@ -6,52 +6,55 @@ PhysicalResultSink ------hashAgg[LOCAL] --------PhysicalProject ----------PhysicalExcept -------------hashAgg[GLOBAL] ---------------PhysicalDistribute -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] -----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ss_customer_sk] +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ss_customer_sk] +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[customer] ------------------------PhysicalDistribute --------------------------PhysicalProject -----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +----------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) +------------------------------PhysicalOlapScan[date_dim] +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cs_bill_customer_sk] +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[customer] ------------------------PhysicalDistribute --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) -----------------------------PhysicalOlapScan[date_dim] -------------hashAgg[GLOBAL] ---------------PhysicalDistribute -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] -----------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cs_bill_customer_sk] +----------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) +------------------------------PhysicalOlapScan[date_dim] +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ws_bill_customer_sk] +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[customer] ------------------------PhysicalDistribute --------------------------PhysicalProject -----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 -------------------------PhysicalDistribute ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) -----------------------------PhysicalOlapScan[date_dim] -------------hashAgg[GLOBAL] ---------------PhysicalDistribute -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] -----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ws_bill_customer_sk] -------------------------PhysicalDistribute ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 -------------------------PhysicalDistribute ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) -----------------------------PhysicalOlapScan[date_dim] +----------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) +------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query94.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query94.out index a7f921c597..879e2acc49 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query94.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query94.out @@ -3,36 +3,37 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] -------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() ---------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] -----------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF2 ws_order_number->[ws_order_number] -------------------------PhysicalDistribute ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 -------------------------PhysicalDistribute ---------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk] -----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_ship_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF3 +------PhysicalProject +--------hashAgg[DISTINCT_GLOBAL] +----------PhysicalDistribute +------------hashAgg[DISTINCT_LOCAL] +--------------hashAgg[GLOBAL] +----------------hashAgg[LOCAL] +------------------PhysicalProject +--------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() +----------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] +------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF2 ws_order_number->[ws_order_number] +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 +--------------------------PhysicalDistribute +----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_ship_date_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF3 +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) +--------------------------------------PhysicalOlapScan[date_dim] ------------------------------PhysicalDistribute --------------------------------PhysicalProject -----------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) -------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------filter((customer_address.ca_state = 'OK')) -----------------------------------PhysicalOlapScan[customer_address] +----------------------------------filter((customer_address.ca_state = 'OK')) +------------------------------------PhysicalOlapScan[customer_address] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------filter((web_site.web_company_name = 'pri')) +------------------------------PhysicalOlapScan[web_site] ----------------------PhysicalDistribute ------------------------PhysicalProject ---------------------------filter((web_site.web_company_name = 'pri')) -----------------------------PhysicalOlapScan[web_site] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------PhysicalOlapScan[web_returns] +--------------------------PhysicalOlapScan[web_returns] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query95.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query95.out index 41041719b2..0d457d1bc7 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query95.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query95.out @@ -6,48 +6,49 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] --------PhysicalDistribute ----------PhysicalProject -------------PhysicalOlapScan[web_sales] apply RFs: RF0 +------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF6 RF7 --------PhysicalDistribute ----------PhysicalProject -------------PhysicalOlapScan[web_sales] +------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalTopN[LOCAL_SORT] ---------hashAgg[DISTINCT_GLOBAL] -----------PhysicalDistribute -------------hashAgg[DISTINCT_LOCAL] ---------------hashAgg[GLOBAL] -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() -----------------------PhysicalDistribute +--------PhysicalProject +----------hashAgg[DISTINCT_GLOBAL] +------------PhysicalDistribute +--------------hashAgg[DISTINCT_LOCAL] +----------------hashAgg[GLOBAL] +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() ------------------------PhysicalProject ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF5 ws_order_number->[wr_order_number] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF4 wr_order_number->[ws_order_number] +--------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF5 wr_order_number->[ws_order_number];RF7 wr_order_number->[ws_order_number,ws_order_number] ----------------------------PhysicalDistribute ------------------------------PhysicalProject --------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------------PhysicalDistribute ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_returns] apply RFs: RF5 -------------------------PhysicalDistribute ---------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] -----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ws_ship_addr_sk] -------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_ship_date_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 +--------------------------------PhysicalOlapScan[web_returns] +------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF4 ws_order_number->[ws_order_number];RF6 ws_order_number->[ws_order_number,ws_order_number] +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +--------------------------PhysicalDistribute +----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ws_ship_addr_sk] +--------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_ship_date_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 +----------------------------------PhysicalDistribute +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalDistribute ----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) ---------------------------------------PhysicalOlapScan[date_dim] +------------------------------------filter((customer_address.ca_state = 'NC')) +--------------------------------------PhysicalOlapScan[customer_address] ------------------------------PhysicalDistribute --------------------------------PhysicalProject -----------------------------------filter((customer_address.ca_state = 'NC')) -------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------filter((web_site.web_company_name = 'pri')) -----------------------------------PhysicalOlapScan[web_site] +----------------------------------filter((web_site.web_company_name = 'pri')) +------------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query10.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query10.out index 8ddb91682f..223a7168b3 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query10.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query10.out @@ -5,53 +5,50 @@ PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalDistribute --------PhysicalTopN[LOCAL_SORT] -----------hashAgg[GLOBAL] -------------PhysicalDistribute ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] +----------hashAgg[LOCAL] +------------PhysicalProject +--------------filter(($c$1 OR $c$2)) +----------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() +------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 c_current_cdemo_sk->[cd_demo_sk] +------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF5 +------------------------PhysicalDistribute --------------------------PhysicalProject -----------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) ---------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------filter(($c$1 OR $c$2)) ---------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() -----------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF3 c_current_cdemo_sk->[cd_demo_sk] -----------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF3 -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[c_current_addr_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 -----------------------------------------PhysicalDistribute -------------------------------------------PhysicalProject ---------------------------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County')) -----------------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] ------------------------------PhysicalDistribute --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 ------------------------------------PhysicalDistribute --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) ------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +------------------------------PhysicalDistribute +--------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[c_current_addr_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 ----------------------------------PhysicalDistribute ------------------------------------PhysicalProject ---------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) -----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County')) +----------------------------------------PhysicalOlapScan[customer_address] +--------------------PhysicalDistribute +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) +--------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) +------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query16.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query16.out index f715eb2136..b0921bb9f0 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query16.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query16.out @@ -3,36 +3,37 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] -------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF4 cs_order_number->[cs_order_number] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 ---------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk] -----------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() build RFs:RF2 cs_order_number->[cr_order_number] -------------------------PhysicalDistribute ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 -------------------------PhysicalDistribute ---------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk] -----------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cs_ship_addr_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF3 -------------------------------PhysicalDistribute ---------------------------------PhysicalProject -----------------------------------filter((customer_address.ca_state = 'WV')) -------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) -----------------------------------PhysicalOlapScan[date_dim] +------PhysicalProject +--------hashAgg[DISTINCT_GLOBAL] +----------PhysicalDistribute +------------hashAgg[DISTINCT_LOCAL] +--------------hashAgg[GLOBAL] +----------------hashAgg[LOCAL] +------------------PhysicalProject +--------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF4 cs_order_number->[cs_order_number] ----------------------PhysicalDistribute ------------------------PhysicalProject ---------------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) -----------------------------PhysicalOlapScan[call_center] +--------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 +----------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk] +------------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() build RFs:RF2 cs_order_number->[cr_order_number] +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 +--------------------------PhysicalDistribute +----------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cs_ship_addr_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF3 +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------filter((customer_address.ca_state = 'WV')) +--------------------------------------PhysicalOlapScan[customer_address] +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) +------------------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) +------------------------------PhysicalOlapScan[call_center] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query31.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query31.out index b1ac64cb80..3a317c3ce3 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query31.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query31.out @@ -2,42 +2,44 @@ -- !ds_shape_31 -- PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) -----hashAgg[GLOBAL] -------PhysicalDistribute ---------hashAgg[LOCAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() ---------------PhysicalDistribute -----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ---------------------PhysicalProject -----------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------filter((ss.d_year = 2000) and d_qoy IN (1, 2, 3)) ---------------------------PhysicalOlapScan[date_dim] ---------------PhysicalDistribute -----------------PhysicalProject -------------------PhysicalOlapScan[customer_address] ---PhysicalCteAnchor ( cteId=CTEId#1 ) -----PhysicalCteProducer ( cteId=CTEId#1 ) +----PhysicalProject ------hashAgg[GLOBAL] --------PhysicalDistribute ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ws_bill_addr_sk] +--------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() ----------------PhysicalDistribute ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] +--------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------PhysicalProject -------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 +------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ----------------------PhysicalDistribute ------------------------PhysicalProject ---------------------------filter((ws.d_year = 2000) and d_qoy IN (1, 2, 3)) +--------------------------filter((ss.d_year = 2000) and d_qoy IN (1, 2, 3)) ----------------------------PhysicalOlapScan[date_dim] ----------------PhysicalDistribute ------------------PhysicalProject --------------------PhysicalOlapScan[customer_address] +--PhysicalCteAnchor ( cteId=CTEId#1 ) +----PhysicalCteProducer ( cteId=CTEId#1 ) +------PhysicalProject +--------hashAgg[GLOBAL] +----------PhysicalDistribute +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ws_bill_addr_sk] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------filter((ws.d_year = 2000) and d_qoy IN (1, 2, 3)) +------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------PhysicalOlapScan[customer_address] ----PhysicalResultSink ------PhysicalQuickSort[MERGE_SORT] --------PhysicalDistribute diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query35.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query35.out index 00313966c6..55fc703f21 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query35.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query35.out @@ -9,51 +9,50 @@ PhysicalResultSink ------------PhysicalDistribute --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ---------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------filter(($c$1 OR $c$2)) ---------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() -----------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() -----------------------------------------PhysicalDistribute -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[customer] -----------------------------------------PhysicalDistribute -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[customer_address] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[customer_demographics] -------------------------------PhysicalDistribute ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 -------------------------------------PhysicalDistribute ---------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) -------------------------------------------PhysicalOlapScan[date_dim] +------------------filter(($c$1 OR $c$2)) +--------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() +----------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() ----------------------------PhysicalDistribute ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +--------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() +----------------------------------PhysicalDistribute +------------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() +--------------------------------------PhysicalDistribute +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 +--------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalProject +------------------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) +--------------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------PhysicalDistribute +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[customer] ----------------------------------PhysicalDistribute ------------------------------------PhysicalProject ---------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) -----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------PhysicalOlapScan[customer_address] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[customer_demographics] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) +------------------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalDistribute +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) +----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query38.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query38.out index 74872dfe19..216d0c5531 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query38.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query38.out @@ -8,55 +8,58 @@ PhysicalResultSink ----------hashAgg[LOCAL] ------------PhysicalProject --------------PhysicalIntersect -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ---------------------------------PhysicalDistribute +----------------PhysicalProject +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ---------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 ---------------------------------PhysicalDistribute +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 +----------------------------------PhysicalDistribute +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) +----------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[customer] +----------------PhysicalProject +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ---------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 ---------------------------------PhysicalDistribute +------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 +----------------------------------PhysicalDistribute +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) +----------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[customer] +----------------PhysicalProject +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ---------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer] +------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 +----------------------------------PhysicalDistribute +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) +----------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query51.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query51.out index ecf279836c..0278c0a003 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query51.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query51.out @@ -1,48 +1,49 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_51 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalDistribute -------PhysicalTopN[LOCAL_SORT] ---------PhysicalProject -----------filter((web_cumulative > store_cumulative)) -------------PhysicalWindow ---------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute -------------------PhysicalProject ---------------------hashJoin[FULL_OUTER_JOIN] hashCondition=((web.d_date = store.d_date) and (web.item_sk = store.item_sk)) otherCondition=() -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalDistribute ---------------------------------PhysicalProject -----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute ---------------------------------------hashAgg[LOCAL] -----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ---------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 ---------------------------------------------PhysicalDistribute +--PhysicalProject +----PhysicalTopN[MERGE_SORT] +------PhysicalDistribute +--------PhysicalTopN[LOCAL_SORT] +----------PhysicalProject +------------filter((web_cumulative > store_cumulative)) +--------------PhysicalWindow +----------------PhysicalQuickSort[LOCAL_SORT] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------hashJoin[FULL_OUTER_JOIN] hashCondition=((web.d_date = store.d_date) and (web.item_sk = store.item_sk)) otherCondition=() +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------PhysicalWindow +------------------------------PhysicalQuickSort[LOCAL_SORT] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------hashAgg[GLOBAL] +--------------------------------------PhysicalDistribute +----------------------------------------hashAgg[LOCAL] +------------------------------------------PhysicalProject +--------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------------------------PhysicalProject -------------------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) ---------------------------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalDistribute ---------------------------------PhysicalProject -----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute ---------------------------------------hashAgg[LOCAL] -----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] ---------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 ---------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 +----------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalProject +--------------------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) +----------------------------------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------PhysicalWindow +------------------------------PhysicalQuickSort[LOCAL_SORT] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------hashAgg[GLOBAL] +--------------------------------------PhysicalDistribute +----------------------------------------hashAgg[LOCAL] +------------------------------------------PhysicalProject +--------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] ----------------------------------------------PhysicalProject -------------------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) ---------------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +----------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalProject +--------------------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) +----------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query53.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query53.out index ce7f7a6b56..2581a0fc3e 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query53.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query53.out @@ -1,35 +1,36 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_53 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalDistribute -------PhysicalTopN[LOCAL_SORT] ---------PhysicalProject -----------filter((if((avg_quarterly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_quarterly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_quarterly_sales), NULL) > 0.100000)) -------------PhysicalWindow ---------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute -------------------PhysicalProject ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ---------------------------------------PhysicalDistribute -----------------------------------------PhysicalProject -------------------------------------------filter((((i_category IN ('Books', 'Children', 'Electronics') AND i_class IN ('personal', 'portable', 'reference', 'self-help')) AND i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')) OR ((i_category IN ('Men', 'Music', 'Women') AND i_class IN ('accessories', 'classical', 'fragrances', 'pants')) AND i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')))) ---------------------------------------------PhysicalOlapScan[item] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------filter(d_month_seq IN (1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211)) -----------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalDistribute +--PhysicalProject +----PhysicalTopN[MERGE_SORT] +------PhysicalDistribute +--------PhysicalTopN[LOCAL_SORT] +----------PhysicalProject +------------filter((if((avg_quarterly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_quarterly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_quarterly_sales), NULL) > 0.100000)) +--------------PhysicalWindow +----------------PhysicalQuickSort[LOCAL_SORT] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------hashAgg[GLOBAL] +------------------------PhysicalDistribute +--------------------------hashAgg[LOCAL] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store] +----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------------------------PhysicalProject +--------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +----------------------------------------PhysicalDistribute +------------------------------------------PhysicalProject +--------------------------------------------filter((((i_category IN ('Books', 'Children', 'Electronics') AND i_class IN ('personal', 'portable', 'reference', 'self-help')) AND i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')) OR ((i_category IN ('Men', 'Music', 'Women') AND i_class IN ('accessories', 'classical', 'fragrances', 'pants')) AND i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')))) +----------------------------------------------PhysicalOlapScan[item] +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------filter(d_month_seq IN (1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211)) +------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query54.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query54.out index 74994c2cd2..e33b59033c 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query54.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query54.out @@ -14,64 +14,65 @@ PhysicalResultSink ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= (d_month_seq + 3)) -----------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= (d_month_seq + 1)) -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN] hashCondition=((my_customers.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 -----------------------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= (d_month_seq + 1)) +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------hashJoin[INNER_JOIN] hashCondition=((my_customers.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] ------------------------------------------PhysicalProject ---------------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_county = store.s_county) and (customer_address.ca_state = store.s_state)) otherCondition=() build RFs:RF3 s_county->[ca_county];RF4 s_state->[ca_state] -----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((my_customers.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 c_current_addr_sk->[ca_address_sk] -------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF2 RF3 RF4 +--------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 +------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalProject +----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_county = store.s_county) and (customer_address.ca_state = store.s_state)) otherCondition=() build RFs:RF3 s_county->[ca_county];RF4 s_state->[ca_state] +------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((my_customers.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 c_current_addr_sk->[ca_address_sk] +--------------------------------------------------PhysicalProject +----------------------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF2 RF3 RF4 +--------------------------------------------------PhysicalDistribute +----------------------------------------------------PhysicalProject +------------------------------------------------------hashAgg[GLOBAL] +--------------------------------------------------------PhysicalDistribute +----------------------------------------------------------hashAgg[LOCAL] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_customer_sk = cs_or_ws_sales.customer_sk)) otherCondition=() build RFs:RF1 customer_sk->[c_customer_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 +----------------------------------------------------------------PhysicalDistribute +------------------------------------------------------------------PhysicalProject +--------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs_or_ws_sales.sold_date_sk = date_dim.d_date_sk)) otherCondition=() +----------------------------------------------------------------------PhysicalProject +------------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs_or_ws_sales.item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk,ws_item_sk] +--------------------------------------------------------------------------PhysicalUnion +----------------------------------------------------------------------------PhysicalDistribute +------------------------------------------------------------------------------PhysicalProject +--------------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +----------------------------------------------------------------------------PhysicalDistribute +------------------------------------------------------------------------------PhysicalProject +--------------------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +--------------------------------------------------------------------------PhysicalDistribute +----------------------------------------------------------------------------PhysicalProject +------------------------------------------------------------------------------filter((item.i_category = 'Women') and (item.i_class = 'maternity')) +--------------------------------------------------------------------------------PhysicalOlapScan[item] +----------------------------------------------------------------------PhysicalDistribute +------------------------------------------------------------------------PhysicalProject +--------------------------------------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) +----------------------------------------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------------------PhysicalDistribute --------------------------------------------------PhysicalProject -----------------------------------------------------hashAgg[GLOBAL] -------------------------------------------------------PhysicalDistribute ---------------------------------------------------------hashAgg[LOCAL] -----------------------------------------------------------PhysicalProject -------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_customer_sk = cs_or_ws_sales.customer_sk)) otherCondition=() build RFs:RF1 customer_sk->[c_customer_sk] ---------------------------------------------------------------PhysicalProject -----------------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 ---------------------------------------------------------------PhysicalDistribute -----------------------------------------------------------------PhysicalProject -------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs_or_ws_sales.sold_date_sk = date_dim.d_date_sk)) otherCondition=() ---------------------------------------------------------------------PhysicalProject -----------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs_or_ws_sales.item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk,ws_item_sk] -------------------------------------------------------------------------PhysicalUnion ---------------------------------------------------------------------------PhysicalDistribute -----------------------------------------------------------------------------PhysicalProject -------------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 ---------------------------------------------------------------------------PhysicalDistribute -----------------------------------------------------------------------------PhysicalProject -------------------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 -------------------------------------------------------------------------PhysicalDistribute ---------------------------------------------------------------------------PhysicalProject -----------------------------------------------------------------------------filter((item.i_category = 'Women') and (item.i_class = 'maternity')) -------------------------------------------------------------------------------PhysicalOlapScan[item] ---------------------------------------------------------------------PhysicalDistribute -----------------------------------------------------------------------PhysicalProject -------------------------------------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) ---------------------------------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------------------PhysicalDistribute -------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[store] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalDistribute ---------------------------------PhysicalAssertNumRows -----------------------------------PhysicalDistribute -------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute -----------------------------------------hashAgg[LOCAL] -------------------------------------------PhysicalProject ---------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) -----------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------PhysicalOlapScan[store] +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalDistribute +----------------------------------PhysicalAssertNumRows +------------------------------------PhysicalDistribute +--------------------------------------hashAgg[GLOBAL] +----------------------------------------PhysicalDistribute +------------------------------------------hashAgg[LOCAL] +--------------------------------------------PhysicalProject +----------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) +------------------------------------------------PhysicalOlapScan[date_dim] ----------------------------PhysicalDistribute ------------------------------PhysicalAssertNumRows --------------------------------PhysicalDistribute diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query59.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query59.out index ba99f47148..2aa68aef78 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query59.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query59.out @@ -2,16 +2,17 @@ -- !ds_shape_59 -- PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) -----hashAgg[GLOBAL] -------PhysicalDistribute ---------hashAgg[LOCAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() ---------------PhysicalProject -----------------PhysicalOlapScan[store_sales] ---------------PhysicalDistribute +----PhysicalProject +------hashAgg[GLOBAL] +--------PhysicalDistribute +----------hashAgg[LOCAL] +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() ----------------PhysicalProject -------------------PhysicalOlapScan[date_dim] +------------------PhysicalOlapScan[store_sales] +----------------PhysicalDistribute +------------------PhysicalProject +--------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalProject ------PhysicalTopN[MERGE_SORT] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query87.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query87.out index b30f16e13a..81331316f7 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query87.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query87.out @@ -6,55 +6,58 @@ PhysicalResultSink ------hashAgg[LOCAL] --------PhysicalProject ----------PhysicalExcept -------------hashAgg[GLOBAL] ---------------PhysicalDistribute -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 -----------------------------PhysicalDistribute +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) -----------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------PhysicalOlapScan[customer] -------------hashAgg[GLOBAL] ---------------PhysicalDistribute -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 -----------------------------PhysicalDistribute +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) +------------------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[customer] +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) -----------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------PhysicalOlapScan[customer] -------------hashAgg[GLOBAL] ---------------PhysicalDistribute -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 -----------------------------PhysicalDistribute +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) +------------------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[customer] +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) -----------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------PhysicalOlapScan[customer] +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) +------------------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query94.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query94.out index 4c4f311c28..4fb347a2c7 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query94.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query94.out @@ -3,36 +3,37 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] -------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF4 ws_order_number->[ws_order_number] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 ---------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() build RFs:RF3 ws_order_number->[wr_order_number] +------PhysicalProject +--------hashAgg[DISTINCT_GLOBAL] +----------PhysicalDistribute +------------hashAgg[DISTINCT_LOCAL] +--------------hashAgg[GLOBAL] +----------------hashAgg[LOCAL] +------------------PhysicalProject +--------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF4 ws_order_number->[ws_order_number] ----------------------PhysicalDistribute ------------------------PhysicalProject ---------------------------PhysicalOlapScan[web_returns] apply RFs: RF3 -----------------------PhysicalDistribute -------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_sk] ---------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_ship_date_sk] -----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 +--------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 +----------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() build RFs:RF3 ws_order_number->[wr_order_number] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[web_returns] apply RFs: RF3 +------------------------PhysicalDistribute +--------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_ship_date_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------filter((customer_address.ca_state = 'OK')) +--------------------------------------PhysicalOlapScan[customer_address] ------------------------------PhysicalDistribute --------------------------------PhysicalProject -----------------------------------filter((customer_address.ca_state = 'OK')) -------------------------------------PhysicalOlapScan[customer_address] +----------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) +------------------------------------PhysicalOlapScan[date_dim] ----------------------------PhysicalDistribute ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------filter((web_site.web_company_name = 'pri')) ---------------------------------PhysicalOlapScan[web_site] +--------------------------------filter((web_site.web_company_name = 'pri')) +----------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query95.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query95.out index b176171f1a..21106e7004 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query95.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query95.out @@ -3,51 +3,52 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) +------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] --------PhysicalDistribute ----------PhysicalProject -------------PhysicalOlapScan[web_sales] +------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF6 RF7 --------PhysicalDistribute ----------PhysicalProject -------------PhysicalOlapScan[web_sales] +------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalTopN[LOCAL_SORT] ---------hashAgg[DISTINCT_GLOBAL] -----------PhysicalDistribute -------------hashAgg[DISTINCT_LOCAL] ---------------hashAgg[GLOBAL] -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() -----------------------PhysicalDistribute +--------PhysicalProject +----------hashAgg[DISTINCT_GLOBAL] +------------PhysicalDistribute +--------------hashAgg[DISTINCT_LOCAL] +----------------hashAgg[GLOBAL] +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() ------------------------PhysicalProject ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF5 ws_order_number->[wr_order_number] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF4 wr_order_number->[ws_order_number] +--------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF5 wr_order_number->[ws_order_number];RF7 wr_order_number->[ws_order_number,ws_order_number] ----------------------------PhysicalDistribute ------------------------------PhysicalProject --------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------------PhysicalDistribute ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_returns] apply RFs: RF5 -------------------------PhysicalDistribute ---------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] -----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_ship_date_sk] -------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 +--------------------------------PhysicalOlapScan[web_returns] +------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF4 ws_order_number->[ws_order_number];RF6 ws_order_number->[ws_order_number,ws_order_number] +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +--------------------------PhysicalDistribute +----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_ship_date_sk] +--------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 +----------------------------------PhysicalDistribute +------------------------------------PhysicalProject +--------------------------------------filter((customer_address.ca_state = 'NC')) +----------------------------------------PhysicalOlapScan[customer_address] --------------------------------PhysicalDistribute ----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_state = 'NC')) ---------------------------------------PhysicalOlapScan[customer_address] +------------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) +--------------------------------------PhysicalOlapScan[date_dim] ------------------------------PhysicalDistribute --------------------------------PhysicalProject -----------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) -------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------filter((web_site.web_company_name = 'pri')) -----------------------------------PhysicalOlapScan[web_site] +----------------------------------filter((web_site.web_company_name = 'pri')) +------------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query10.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query10.out index 8ddb91682f..223a7168b3 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query10.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query10.out @@ -5,53 +5,50 @@ PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalDistribute --------PhysicalTopN[LOCAL_SORT] -----------hashAgg[GLOBAL] -------------PhysicalDistribute ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] +----------hashAgg[LOCAL] +------------PhysicalProject +--------------filter(($c$1 OR $c$2)) +----------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() +------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 c_current_cdemo_sk->[cd_demo_sk] +------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF5 +------------------------PhysicalDistribute --------------------------PhysicalProject -----------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) ---------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------filter(($c$1 OR $c$2)) ---------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() -----------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF3 c_current_cdemo_sk->[cd_demo_sk] -----------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF3 -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[c_current_addr_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 -----------------------------------------PhysicalDistribute -------------------------------------------PhysicalProject ---------------------------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County')) -----------------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] ------------------------------PhysicalDistribute --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 ------------------------------------PhysicalDistribute --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) ------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +------------------------------PhysicalDistribute +--------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[c_current_addr_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 ----------------------------------PhysicalDistribute ------------------------------------PhysicalProject ---------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) -----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County')) +----------------------------------------PhysicalOlapScan[customer_address] +--------------------PhysicalDistribute +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) +--------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) +------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query16.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query16.out index f715eb2136..b0921bb9f0 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query16.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query16.out @@ -3,36 +3,37 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] -------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF4 cs_order_number->[cs_order_number] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 ---------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk] -----------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() build RFs:RF2 cs_order_number->[cr_order_number] -------------------------PhysicalDistribute ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 -------------------------PhysicalDistribute ---------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk] -----------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cs_ship_addr_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF3 -------------------------------PhysicalDistribute ---------------------------------PhysicalProject -----------------------------------filter((customer_address.ca_state = 'WV')) -------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) -----------------------------------PhysicalOlapScan[date_dim] +------PhysicalProject +--------hashAgg[DISTINCT_GLOBAL] +----------PhysicalDistribute +------------hashAgg[DISTINCT_LOCAL] +--------------hashAgg[GLOBAL] +----------------hashAgg[LOCAL] +------------------PhysicalProject +--------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF4 cs_order_number->[cs_order_number] ----------------------PhysicalDistribute ------------------------PhysicalProject ---------------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) -----------------------------PhysicalOlapScan[call_center] +--------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 +----------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk] +------------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() build RFs:RF2 cs_order_number->[cr_order_number] +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 +--------------------------PhysicalDistribute +----------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cs_ship_addr_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF3 +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------filter((customer_address.ca_state = 'WV')) +--------------------------------------PhysicalOlapScan[customer_address] +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) +------------------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) +------------------------------PhysicalOlapScan[call_center] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query31.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query31.out index bc1e0eb819..48208ce7b2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query31.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query31.out @@ -2,42 +2,44 @@ -- !ds_shape_31 -- PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) -----hashAgg[GLOBAL] -------PhysicalDistribute ---------hashAgg[LOCAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] ---------------PhysicalDistribute -----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ---------------------PhysicalProject -----------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------filter((ss.d_year = 2000) and d_qoy IN (1, 2, 3)) ---------------------------PhysicalOlapScan[date_dim] ---------------PhysicalDistribute -----------------PhysicalProject -------------------PhysicalOlapScan[customer_address] ---PhysicalCteAnchor ( cteId=CTEId#1 ) -----PhysicalCteProducer ( cteId=CTEId#1 ) +----PhysicalProject ------hashAgg[GLOBAL] --------PhysicalDistribute ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ws_bill_addr_sk] +--------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] ----------------PhysicalDistribute ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] +--------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------PhysicalProject -------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 +------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ----------------------PhysicalDistribute ------------------------PhysicalProject ---------------------------filter((ws.d_year = 2000) and d_qoy IN (1, 2, 3)) +--------------------------filter((ss.d_year = 2000) and d_qoy IN (1, 2, 3)) ----------------------------PhysicalOlapScan[date_dim] ----------------PhysicalDistribute ------------------PhysicalProject --------------------PhysicalOlapScan[customer_address] +--PhysicalCteAnchor ( cteId=CTEId#1 ) +----PhysicalCteProducer ( cteId=CTEId#1 ) +------PhysicalProject +--------hashAgg[GLOBAL] +----------PhysicalDistribute +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ws_bill_addr_sk] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------filter((ws.d_year = 2000) and d_qoy IN (1, 2, 3)) +------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------PhysicalOlapScan[customer_address] ----PhysicalResultSink ------PhysicalQuickSort[MERGE_SORT] --------PhysicalDistribute diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query35.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query35.out index 97736adff6..7cfa049bd3 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query35.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query35.out @@ -9,51 +9,50 @@ PhysicalResultSink ------------PhysicalDistribute --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ---------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------filter(($c$1 OR $c$2)) ---------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() -----------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF3 cd_demo_sk->[c_current_cdemo_sk] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[c_current_addr_sk] -----------------------------------------PhysicalDistribute -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 RF3 -----------------------------------------PhysicalDistribute -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[customer_address] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[customer_demographics] -------------------------------PhysicalDistribute ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 -------------------------------------PhysicalDistribute ---------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) -------------------------------------------PhysicalOlapScan[date_dim] +------------------filter(($c$1 OR $c$2)) +--------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() +----------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk] ----------------------------PhysicalDistribute ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +--------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] +----------------------------------PhysicalDistribute +------------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] +--------------------------------------PhysicalDistribute +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 +--------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalProject +------------------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) +--------------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------PhysicalDistribute +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5 ----------------------------------PhysicalDistribute ------------------------------------PhysicalProject ---------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) -----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------PhysicalOlapScan[customer_address] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[customer_demographics] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) +------------------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalDistribute +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) +----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query38.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query38.out index b531ce2990..d34d69ac4c 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query38.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query38.out @@ -8,55 +8,58 @@ PhysicalResultSink ----------hashAgg[LOCAL] ------------PhysicalProject --------------PhysicalIntersect -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk] ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ---------------------------------PhysicalDistribute +----------------PhysicalProject +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ---------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 ---------------------------------PhysicalDistribute +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +----------------------------------PhysicalDistribute +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) +----------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[customer] +----------------PhysicalProject +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ---------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 ---------------------------------PhysicalDistribute +------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 +----------------------------------PhysicalDistribute +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) +----------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[customer] +----------------PhysicalProject +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ---------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer] +------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 +----------------------------------PhysicalDistribute +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) +----------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query51.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query51.out index ecf279836c..0278c0a003 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query51.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query51.out @@ -1,48 +1,49 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_51 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalDistribute -------PhysicalTopN[LOCAL_SORT] ---------PhysicalProject -----------filter((web_cumulative > store_cumulative)) -------------PhysicalWindow ---------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute -------------------PhysicalProject ---------------------hashJoin[FULL_OUTER_JOIN] hashCondition=((web.d_date = store.d_date) and (web.item_sk = store.item_sk)) otherCondition=() -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalDistribute ---------------------------------PhysicalProject -----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute ---------------------------------------hashAgg[LOCAL] -----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ---------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 ---------------------------------------------PhysicalDistribute +--PhysicalProject +----PhysicalTopN[MERGE_SORT] +------PhysicalDistribute +--------PhysicalTopN[LOCAL_SORT] +----------PhysicalProject +------------filter((web_cumulative > store_cumulative)) +--------------PhysicalWindow +----------------PhysicalQuickSort[LOCAL_SORT] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------hashJoin[FULL_OUTER_JOIN] hashCondition=((web.d_date = store.d_date) and (web.item_sk = store.item_sk)) otherCondition=() +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------PhysicalWindow +------------------------------PhysicalQuickSort[LOCAL_SORT] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------hashAgg[GLOBAL] +--------------------------------------PhysicalDistribute +----------------------------------------hashAgg[LOCAL] +------------------------------------------PhysicalProject +--------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------------------------PhysicalProject -------------------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) ---------------------------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalDistribute ---------------------------------PhysicalProject -----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute ---------------------------------------hashAgg[LOCAL] -----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] ---------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 ---------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 +----------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalProject +--------------------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) +----------------------------------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------PhysicalWindow +------------------------------PhysicalQuickSort[LOCAL_SORT] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------hashAgg[GLOBAL] +--------------------------------------PhysicalDistribute +----------------------------------------hashAgg[LOCAL] +------------------------------------------PhysicalProject +--------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] ----------------------------------------------PhysicalProject -------------------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) ---------------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +----------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalProject +--------------------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) +----------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query53.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query53.out index 10bbc080f1..46542ce959 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query53.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query53.out @@ -1,35 +1,36 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_53 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalDistribute -------PhysicalTopN[LOCAL_SORT] ---------PhysicalProject -----------filter((if((avg_quarterly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_quarterly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_quarterly_sales), NULL) > 0.100000)) -------------PhysicalWindow ---------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute -------------------PhysicalProject ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------------PhysicalDistribute -----------------------------------------PhysicalProject -------------------------------------------filter((((i_category IN ('Books', 'Children', 'Electronics') AND i_class IN ('personal', 'portable', 'reference', 'self-help')) AND i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')) OR ((i_category IN ('Men', 'Music', 'Women') AND i_class IN ('accessories', 'classical', 'fragrances', 'pants')) AND i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')))) ---------------------------------------------PhysicalOlapScan[item] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------filter(d_month_seq IN (1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211)) -----------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalDistribute +--PhysicalProject +----PhysicalTopN[MERGE_SORT] +------PhysicalDistribute +--------PhysicalTopN[LOCAL_SORT] +----------PhysicalProject +------------filter((if((avg_quarterly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_quarterly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_quarterly_sales), NULL) > 0.100000)) +--------------PhysicalWindow +----------------PhysicalQuickSort[LOCAL_SORT] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------hashAgg[GLOBAL] +------------------------PhysicalDistribute +--------------------------hashAgg[LOCAL] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store] +----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------------------------PhysicalProject +--------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +----------------------------------------PhysicalDistribute +------------------------------------------PhysicalProject +--------------------------------------------filter((((i_category IN ('Books', 'Children', 'Electronics') AND i_class IN ('personal', 'portable', 'reference', 'self-help')) AND i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')) OR ((i_category IN ('Men', 'Music', 'Women') AND i_class IN ('accessories', 'classical', 'fragrances', 'pants')) AND i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')))) +----------------------------------------------PhysicalOlapScan[item] +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------filter(d_month_seq IN (1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211)) +------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query54.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query54.out index 4cdbeaaa86..87db40f47c 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query54.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query54.out @@ -14,64 +14,65 @@ PhysicalResultSink ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= (d_month_seq + 3)) -----------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= (d_month_seq + 1)) -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN] hashCondition=((my_customers.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF6 -----------------------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= (d_month_seq + 1)) +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------hashJoin[INNER_JOIN] hashCondition=((my_customers.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] ------------------------------------------PhysicalProject ---------------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_county = store.s_county) and (customer_address.ca_state = store.s_state)) otherCondition=() build RFs:RF3 s_county->[ca_county];RF4 s_state->[ca_state] -----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((my_customers.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 c_current_addr_sk->[ca_address_sk] -------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF2 RF3 RF4 +--------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF6 +------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalProject +----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_county = store.s_county) and (customer_address.ca_state = store.s_state)) otherCondition=() build RFs:RF3 s_county->[ca_county];RF4 s_state->[ca_state] +------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((my_customers.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 c_current_addr_sk->[ca_address_sk] +--------------------------------------------------PhysicalProject +----------------------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF2 RF3 RF4 +--------------------------------------------------PhysicalDistribute +----------------------------------------------------PhysicalProject +------------------------------------------------------hashAgg[GLOBAL] +--------------------------------------------------------PhysicalDistribute +----------------------------------------------------------hashAgg[LOCAL] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_customer_sk = cs_or_ws_sales.customer_sk)) otherCondition=() build RFs:RF1 customer_sk->[c_customer_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 +----------------------------------------------------------------PhysicalDistribute +------------------------------------------------------------------PhysicalProject +--------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs_or_ws_sales.sold_date_sk = date_dim.d_date_sk)) otherCondition=() +----------------------------------------------------------------------PhysicalProject +------------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs_or_ws_sales.item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk,ws_item_sk] +--------------------------------------------------------------------------PhysicalUnion +----------------------------------------------------------------------------PhysicalDistribute +------------------------------------------------------------------------------PhysicalProject +--------------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +----------------------------------------------------------------------------PhysicalDistribute +------------------------------------------------------------------------------PhysicalProject +--------------------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +--------------------------------------------------------------------------PhysicalDistribute +----------------------------------------------------------------------------PhysicalProject +------------------------------------------------------------------------------filter((item.i_category = 'Women') and (item.i_class = 'maternity')) +--------------------------------------------------------------------------------PhysicalOlapScan[item] +----------------------------------------------------------------------PhysicalDistribute +------------------------------------------------------------------------PhysicalProject +--------------------------------------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) +----------------------------------------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------------------PhysicalDistribute --------------------------------------------------PhysicalProject -----------------------------------------------------hashAgg[GLOBAL] -------------------------------------------------------PhysicalDistribute ---------------------------------------------------------hashAgg[LOCAL] -----------------------------------------------------------PhysicalProject -------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_customer_sk = cs_or_ws_sales.customer_sk)) otherCondition=() build RFs:RF1 customer_sk->[c_customer_sk] ---------------------------------------------------------------PhysicalProject -----------------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 ---------------------------------------------------------------PhysicalDistribute -----------------------------------------------------------------PhysicalProject -------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs_or_ws_sales.sold_date_sk = date_dim.d_date_sk)) otherCondition=() ---------------------------------------------------------------------PhysicalProject -----------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs_or_ws_sales.item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk,ws_item_sk] -------------------------------------------------------------------------PhysicalUnion ---------------------------------------------------------------------------PhysicalDistribute -----------------------------------------------------------------------------PhysicalProject -------------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 ---------------------------------------------------------------------------PhysicalDistribute -----------------------------------------------------------------------------PhysicalProject -------------------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 -------------------------------------------------------------------------PhysicalDistribute ---------------------------------------------------------------------------PhysicalProject -----------------------------------------------------------------------------filter((item.i_category = 'Women') and (item.i_class = 'maternity')) -------------------------------------------------------------------------------PhysicalOlapScan[item] ---------------------------------------------------------------------PhysicalDistribute -----------------------------------------------------------------------PhysicalProject -------------------------------------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) ---------------------------------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------------------PhysicalDistribute -------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[store] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalDistribute ---------------------------------PhysicalAssertNumRows -----------------------------------PhysicalDistribute -------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute -----------------------------------------hashAgg[LOCAL] -------------------------------------------PhysicalProject ---------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) -----------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------PhysicalOlapScan[store] +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalDistribute +----------------------------------PhysicalAssertNumRows +------------------------------------PhysicalDistribute +--------------------------------------hashAgg[GLOBAL] +----------------------------------------PhysicalDistribute +------------------------------------------hashAgg[LOCAL] +--------------------------------------------PhysicalProject +----------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) +------------------------------------------------PhysicalOlapScan[date_dim] ----------------------------PhysicalDistribute ------------------------------PhysicalAssertNumRows --------------------------------PhysicalDistribute diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query59.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query59.out index c11b49da57..ad908e5b8c 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query59.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query59.out @@ -2,16 +2,17 @@ -- !ds_shape_59 -- PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) -----hashAgg[GLOBAL] -------PhysicalDistribute ---------hashAgg[LOCAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ---------------PhysicalProject -----------------PhysicalOlapScan[store_sales] apply RFs: RF0 ---------------PhysicalDistribute +----PhysicalProject +------hashAgg[GLOBAL] +--------PhysicalDistribute +----------hashAgg[LOCAL] +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------PhysicalProject -------------------PhysicalOlapScan[date_dim] +------------------PhysicalOlapScan[store_sales] apply RFs: RF0 +----------------PhysicalDistribute +------------------PhysicalProject +--------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalProject ------PhysicalTopN[MERGE_SORT] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query87.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query87.out index 9fa8657ef4..d2b4fed520 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query87.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query87.out @@ -6,55 +6,58 @@ PhysicalResultSink ------hashAgg[LOCAL] --------PhysicalProject ----------PhysicalExcept -------------hashAgg[GLOBAL] ---------------PhysicalDistribute -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------------PhysicalDistribute +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) -----------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------PhysicalOlapScan[customer] -------------hashAgg[GLOBAL] ---------------PhysicalDistribute -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 -----------------------------PhysicalDistribute +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) +------------------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[customer] +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) -----------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------PhysicalOlapScan[customer] -------------hashAgg[GLOBAL] ---------------PhysicalDistribute -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 -----------------------------PhysicalDistribute +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) +------------------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[customer] +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) -----------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------PhysicalOlapScan[customer] +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) +------------------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query94.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query94.out index 4c4f311c28..4fb347a2c7 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query94.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query94.out @@ -3,36 +3,37 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] -------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF4 ws_order_number->[ws_order_number] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 ---------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() build RFs:RF3 ws_order_number->[wr_order_number] +------PhysicalProject +--------hashAgg[DISTINCT_GLOBAL] +----------PhysicalDistribute +------------hashAgg[DISTINCT_LOCAL] +--------------hashAgg[GLOBAL] +----------------hashAgg[LOCAL] +------------------PhysicalProject +--------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF4 ws_order_number->[ws_order_number] ----------------------PhysicalDistribute ------------------------PhysicalProject ---------------------------PhysicalOlapScan[web_returns] apply RFs: RF3 -----------------------PhysicalDistribute -------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_sk] ---------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_ship_date_sk] -----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 +--------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 +----------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() build RFs:RF3 ws_order_number->[wr_order_number] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[web_returns] apply RFs: RF3 +------------------------PhysicalDistribute +--------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_ship_date_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------filter((customer_address.ca_state = 'OK')) +--------------------------------------PhysicalOlapScan[customer_address] ------------------------------PhysicalDistribute --------------------------------PhysicalProject -----------------------------------filter((customer_address.ca_state = 'OK')) -------------------------------------PhysicalOlapScan[customer_address] +----------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) +------------------------------------PhysicalOlapScan[date_dim] ----------------------------PhysicalDistribute ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------filter((web_site.web_company_name = 'pri')) ---------------------------------PhysicalOlapScan[web_site] +--------------------------------filter((web_site.web_company_name = 'pri')) +----------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query95.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query95.out index 473e1adb85..21106e7004 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query95.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query95.out @@ -6,48 +6,49 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] --------PhysicalDistribute ----------PhysicalProject -------------PhysicalOlapScan[web_sales] apply RFs: RF0 +------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF6 RF7 --------PhysicalDistribute ----------PhysicalProject -------------PhysicalOlapScan[web_sales] +------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalTopN[LOCAL_SORT] ---------hashAgg[DISTINCT_GLOBAL] -----------PhysicalDistribute -------------hashAgg[DISTINCT_LOCAL] ---------------hashAgg[GLOBAL] -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() -----------------------PhysicalDistribute +--------PhysicalProject +----------hashAgg[DISTINCT_GLOBAL] +------------PhysicalDistribute +--------------hashAgg[DISTINCT_LOCAL] +----------------hashAgg[GLOBAL] +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() ------------------------PhysicalProject ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF5 ws_order_number->[wr_order_number] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF4 wr_order_number->[ws_order_number] +--------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF5 wr_order_number->[ws_order_number];RF7 wr_order_number->[ws_order_number,ws_order_number] ----------------------------PhysicalDistribute ------------------------------PhysicalProject --------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------------PhysicalDistribute ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_returns] apply RFs: RF5 -------------------------PhysicalDistribute ---------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] -----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_ship_date_sk] -------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 +--------------------------------PhysicalOlapScan[web_returns] +------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF4 ws_order_number->[ws_order_number];RF6 ws_order_number->[ws_order_number,ws_order_number] +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +--------------------------PhysicalDistribute +----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_ship_date_sk] +--------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 +----------------------------------PhysicalDistribute +------------------------------------PhysicalProject +--------------------------------------filter((customer_address.ca_state = 'NC')) +----------------------------------------PhysicalOlapScan[customer_address] --------------------------------PhysicalDistribute ----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_state = 'NC')) ---------------------------------------PhysicalOlapScan[customer_address] +------------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) +--------------------------------------PhysicalOlapScan[date_dim] ------------------------------PhysicalDistribute --------------------------------PhysicalProject -----------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) -------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------filter((web_site.web_company_name = 'pri')) -----------------------------------PhysicalOlapScan[web_site] +----------------------------------filter((web_site.web_company_name = 'pri')) +------------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q10.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q10.out index 3e758dba97..d050117d9d 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q10.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q10.out @@ -4,27 +4,28 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute ------PhysicalTopN[LOCAL_SORT] ---------hashAgg[GLOBAL] -----------PhysicalDistribute -------------hashAgg[LOCAL] ---------------PhysicalProject -----------------hashJoin[INNER_JOIN] hashCondition=((customer.c_nationkey = nation.n_nationkey)) otherCondition=() -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey] -----------------------PhysicalProject -------------------------filter((lineitem.l_returnflag = 'R')) ---------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------filter((orders.o_orderdate < '1994-01-01') and (orders.o_orderdate >= '1993-10-01')) -----------------------------------PhysicalOlapScan[orders] -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[customer] -------------------PhysicalDistribute +--------PhysicalProject +----------hashAgg[GLOBAL] +------------PhysicalDistribute +--------------hashAgg[LOCAL] +----------------PhysicalProject +------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_nationkey = nation.n_nationkey)) otherCondition=() --------------------PhysicalProject -----------------------PhysicalOlapScan[nation] +----------------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey] +------------------------PhysicalProject +--------------------------filter((lineitem.l_returnflag = 'R')) +----------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------filter((orders.o_orderdate < '1994-01-01') and (orders.o_orderdate >= '1993-10-01')) +------------------------------------PhysicalOlapScan[orders] +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[customer] +--------------------PhysicalDistribute +----------------------PhysicalProject +------------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q3.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q3.out index b772e8ff62..c9e0acbfeb 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q3.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q3.out @@ -4,21 +4,22 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute ------PhysicalTopN[LOCAL_SORT] ---------hashAgg[LOCAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey] ---------------PhysicalProject -----------------filter((lineitem.l_shipdate > '1995-03-15')) -------------------PhysicalOlapScan[lineitem] apply RFs: RF1 ---------------PhysicalDistribute +--------PhysicalProject +----------hashAgg[LOCAL] +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------filter((orders.o_orderdate < '1995-03-15')) ---------------------------PhysicalOlapScan[orders] apply RFs: RF0 ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------filter((customer.c_mktsegment = 'BUILDING')) ---------------------------PhysicalOlapScan[customer] +------------------filter((lineitem.l_shipdate > '1995-03-15')) +--------------------PhysicalOlapScan[lineitem] apply RFs: RF1 +----------------PhysicalDistribute +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] +----------------------PhysicalDistribute +------------------------PhysicalProject +--------------------------filter((orders.o_orderdate < '1995-03-15')) +----------------------------PhysicalOlapScan[orders] apply RFs: RF0 +----------------------PhysicalDistribute +------------------------PhysicalProject +--------------------------filter((customer.c_mktsegment = 'BUILDING')) +----------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q10.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q10.out index 2edacf27e0..d36a117655 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q10.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q10.out @@ -4,25 +4,26 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute ------PhysicalTopN[LOCAL_SORT] ---------hashAgg[GLOBAL] -----------PhysicalDistribute -------------hashAgg[LOCAL] ---------------PhysicalProject -----------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF2 o_orderkey->[l_orderkey] -------------------PhysicalProject ---------------------filter((lineitem.l_returnflag = 'R')) -----------------------PhysicalOlapScan[lineitem] apply RFs: RF2 -------------------PhysicalDistribute ---------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_nationkey = nation.n_nationkey)) otherCondition=() -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 o_custkey->[c_custkey] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] apply RFs: RF0 ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------filter((orders.o_orderdate < '1994-01-01') and (orders.o_orderdate >= '1993-10-01')) ---------------------------------PhysicalOlapScan[orders] -----------------------PhysicalDistribute +--------PhysicalProject +----------hashAgg[GLOBAL] +------------PhysicalDistribute +--------------hashAgg[LOCAL] +----------------PhysicalProject +------------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF2 o_orderkey->[l_orderkey] +--------------------PhysicalProject +----------------------filter((lineitem.l_returnflag = 'R')) +------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 +--------------------PhysicalDistribute +----------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_nationkey = nation.n_nationkey)) otherCondition=() ------------------------PhysicalProject ---------------------------PhysicalOlapScan[nation] +--------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 o_custkey->[c_custkey] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[customer] apply RFs: RF0 +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------filter((orders.o_orderdate < '1994-01-01') and (orders.o_orderdate >= '1993-10-01')) +----------------------------------PhysicalOlapScan[orders] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q3.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q3.out index b772e8ff62..c9e0acbfeb 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q3.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q3.out @@ -4,21 +4,22 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute ------PhysicalTopN[LOCAL_SORT] ---------hashAgg[LOCAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey] ---------------PhysicalProject -----------------filter((lineitem.l_shipdate > '1995-03-15')) -------------------PhysicalOlapScan[lineitem] apply RFs: RF1 ---------------PhysicalDistribute +--------PhysicalProject +----------hashAgg[LOCAL] +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------filter((orders.o_orderdate < '1995-03-15')) ---------------------------PhysicalOlapScan[orders] apply RFs: RF0 ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------filter((customer.c_mktsegment = 'BUILDING')) ---------------------------PhysicalOlapScan[customer] +------------------filter((lineitem.l_shipdate > '1995-03-15')) +--------------------PhysicalOlapScan[lineitem] apply RFs: RF1 +----------------PhysicalDistribute +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] +----------------------PhysicalDistribute +------------------------PhysicalProject +--------------------------filter((orders.o_orderdate < '1995-03-15')) +----------------------------PhysicalOlapScan[orders] apply RFs: RF0 +----------------------PhysicalDistribute +------------------------PhysicalProject +--------------------------filter((customer.c_mktsegment = 'BUILDING')) +----------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q10.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q10.out index 3f3c7d9b23..a9c20f5294 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q10.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q10.out @@ -4,25 +4,26 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute ------PhysicalTopN[LOCAL_SORT] ---------hashAgg[GLOBAL] -----------PhysicalDistribute -------------hashAgg[LOCAL] ---------------PhysicalProject -----------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF2 o_orderkey->[l_orderkey] -------------------PhysicalProject ---------------------filter((lineitem.l_returnflag = 'R')) -----------------------PhysicalOlapScan[lineitem] apply RFs: RF2 -------------------PhysicalDistribute ---------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF1 n_nationkey->[c_nationkey] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 o_custkey->[c_custkey] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF1 ---------------------------PhysicalDistribute -----------------------------PhysicalProject -------------------------------filter((orders.o_orderdate < '1994-01-01') and (orders.o_orderdate >= '1993-10-01')) ---------------------------------PhysicalOlapScan[orders] -----------------------PhysicalDistribute +--------PhysicalProject +----------hashAgg[GLOBAL] +------------PhysicalDistribute +--------------hashAgg[LOCAL] +----------------PhysicalProject +------------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF2 o_orderkey->[l_orderkey] +--------------------PhysicalProject +----------------------filter((lineitem.l_returnflag = 'R')) +------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 +--------------------PhysicalDistribute +----------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF1 n_nationkey->[c_nationkey] ------------------------PhysicalProject ---------------------------PhysicalOlapScan[nation] +--------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 o_custkey->[c_custkey] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF1 +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------filter((orders.o_orderdate < '1994-01-01') and (orders.o_orderdate >= '1993-10-01')) +----------------------------------PhysicalOlapScan[orders] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q3.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q3.out index b772e8ff62..c9e0acbfeb 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q3.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q3.out @@ -4,21 +4,22 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute ------PhysicalTopN[LOCAL_SORT] ---------hashAgg[LOCAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey] ---------------PhysicalProject -----------------filter((lineitem.l_shipdate > '1995-03-15')) -------------------PhysicalOlapScan[lineitem] apply RFs: RF1 ---------------PhysicalDistribute +--------PhysicalProject +----------hashAgg[LOCAL] +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------filter((orders.o_orderdate < '1995-03-15')) ---------------------------PhysicalOlapScan[orders] apply RFs: RF0 ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------filter((customer.c_mktsegment = 'BUILDING')) ---------------------------PhysicalOlapScan[customer] +------------------filter((lineitem.l_shipdate > '1995-03-15')) +--------------------PhysicalOlapScan[lineitem] apply RFs: RF1 +----------------PhysicalDistribute +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] +----------------------PhysicalDistribute +------------------------PhysicalProject +--------------------------filter((orders.o_orderdate < '1995-03-15')) +----------------------------PhysicalOlapScan[orders] apply RFs: RF0 +----------------------PhysicalDistribute +------------------------PhysicalProject +--------------------------filter((customer.c_mktsegment = 'BUILDING')) +----------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q10.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q10.out index c1e2b1a917..c62aa046d7 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q10.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q10.out @@ -4,27 +4,28 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute ------PhysicalTopN[LOCAL_SORT] ---------hashAgg[GLOBAL] -----------PhysicalDistribute -------------hashAgg[LOCAL] ---------------PhysicalProject -----------------hashJoin[INNER_JOIN] hashCondition=((customer.c_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF2 n_nationkey->[c_nationkey] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey] -----------------------PhysicalProject -------------------------filter((lineitem.l_returnflag = 'R')) ---------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------filter((orders.o_orderdate < '1994-01-01') and (orders.o_orderdate >= '1993-10-01')) -----------------------------------PhysicalOlapScan[orders] apply RFs: RF0 -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[customer] apply RFs: RF2 -------------------PhysicalDistribute +--------PhysicalProject +----------hashAgg[GLOBAL] +------------PhysicalDistribute +--------------hashAgg[LOCAL] +----------------PhysicalProject +------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF2 n_nationkey->[c_nationkey] --------------------PhysicalProject -----------------------PhysicalOlapScan[nation] +----------------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey] +------------------------PhysicalProject +--------------------------filter((lineitem.l_returnflag = 'R')) +----------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------filter((orders.o_orderdate < '1994-01-01') and (orders.o_orderdate >= '1993-10-01')) +------------------------------------PhysicalOlapScan[orders] apply RFs: RF0 +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[customer] apply RFs: RF2 +--------------------PhysicalDistribute +----------------------PhysicalProject +------------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q3.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q3.out index b772e8ff62..c9e0acbfeb 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q3.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q3.out @@ -4,21 +4,22 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute ------PhysicalTopN[LOCAL_SORT] ---------hashAgg[LOCAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey] ---------------PhysicalProject -----------------filter((lineitem.l_shipdate > '1995-03-15')) -------------------PhysicalOlapScan[lineitem] apply RFs: RF1 ---------------PhysicalDistribute +--------PhysicalProject +----------hashAgg[LOCAL] +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------filter((orders.o_orderdate < '1995-03-15')) ---------------------------PhysicalOlapScan[orders] apply RFs: RF0 ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------filter((customer.c_mktsegment = 'BUILDING')) ---------------------------PhysicalOlapScan[customer] +------------------filter((lineitem.l_shipdate > '1995-03-15')) +--------------------PhysicalOlapScan[lineitem] apply RFs: RF1 +----------------PhysicalDistribute +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] +----------------------PhysicalDistribute +------------------------PhysicalProject +--------------------------filter((orders.o_orderdate < '1995-03-15')) +----------------------------PhysicalOlapScan[orders] apply RFs: RF0 +----------------------PhysicalDistribute +------------------------PhysicalProject +--------------------------filter((customer.c_mktsegment = 'BUILDING')) +----------------------------PhysicalOlapScan[customer] diff --git a/regression-test/suites/nereids_rules_p0/eager_aggregate/basic.groovy b/regression-test/suites/nereids_rules_p0/eager_aggregate/basic.groovy index c81509e95a..4380e7f0d5 100644 --- a/regression-test/suites/nereids_rules_p0/eager_aggregate/basic.groovy +++ b/regression-test/suites/nereids_rules_p0/eager_aggregate/basic.groovy @@ -18,6 +18,7 @@ suite("eager_aggregate_basic") { sql "SET enable_nereids_planner=true" sql "SET enable_fallback_to_original_planner=false" + sql "SET ignore_shape_nodes='PhysicalDistribute,PhysicalProject'" sql "SET ENABLE_NEREIDS_RULES=push_down_min_max_through_join" sql "SET ENABLE_NEREIDS_RULES=push_down_sum_through_join" diff --git a/regression-test/suites/nereids_rules_p0/eager_aggregate/basic_one_side.groovy b/regression-test/suites/nereids_rules_p0/eager_aggregate/basic_one_side.groovy index fe98ce57bf..653919e322 100644 --- a/regression-test/suites/nereids_rules_p0/eager_aggregate/basic_one_side.groovy +++ b/regression-test/suites/nereids_rules_p0/eager_aggregate/basic_one_side.groovy @@ -18,6 +18,7 @@ suite("eager_aggregate_basic_one_side") { sql "SET enable_nereids_planner=true" sql "SET enable_fallback_to_original_planner=false" + sql "SET ignore_shape_nodes='PhysicalDistribute,PhysicalProject'" sql "SET ENABLE_NEREIDS_RULES=push_down_min_max_through_join_one_side" sql "SET ENABLE_NEREIDS_RULES=push_down_sum_through_join_one_side" diff --git a/regression-test/suites/nereids_rules_p0/filter_push_down/push_down_filter_other_condition.groovy b/regression-test/suites/nereids_rules_p0/filter_push_down/push_down_filter_other_condition.groovy index 9798faeaa5..42c0003ffe 100644 --- a/regression-test/suites/nereids_rules_p0/filter_push_down/push_down_filter_other_condition.groovy +++ b/regression-test/suites/nereids_rules_p0/filter_push_down/push_down_filter_other_condition.groovy @@ -18,6 +18,7 @@ suite("push_down_filter_other_condition") { sql "SET enable_nereids_planner=true" sql "SET enable_fallback_to_original_planner=false" + sql "SET ignore_shape_nodes='PhysicalDistribute,PhysicalProject'" sql "use regression_test_nereids_rules_p0" sql "set disable_join_reorder=true" sql 'set be_number_for_test=3' diff --git a/regression-test/suites/nereids_rules_p0/predicate_infer/infer_predicate.groovy b/regression-test/suites/nereids_rules_p0/predicate_infer/infer_predicate.groovy index 358bd82a03..e2550d73b9 100644 --- a/regression-test/suites/nereids_rules_p0/predicate_infer/infer_predicate.groovy +++ b/regression-test/suites/nereids_rules_p0/predicate_infer/infer_predicate.groovy @@ -18,6 +18,8 @@ suite("infer_predicate") { sql "SET enable_nereids_planner=true" sql "SET enable_fallback_to_original_planner=false" + sql "SET disable_join_reorder=true" + sql "SET ignore_shape_nodes='PhysicalDistribute,PhysicalProject'" sql """ DROP TABLE IF EXISTS t