diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/executor/Rewriter.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/executor/Rewriter.java index 6dee5ef18f..9dfb92a3f2 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/executor/Rewriter.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/executor/Rewriter.java @@ -69,7 +69,6 @@ import org.apache.doris.nereids.rules.rewrite.EliminateSemiJoin; import org.apache.doris.nereids.rules.rewrite.EliminateSort; import org.apache.doris.nereids.rules.rewrite.EliminateSortUnderSubqueryOrView; import org.apache.doris.nereids.rules.rewrite.EliminateUnnecessaryProject; -import org.apache.doris.nereids.rules.rewrite.EnsureProjectOnTopJoin; import org.apache.doris.nereids.rules.rewrite.ExtractAndNormalizeWindowExpression; import org.apache.doris.nereids.rules.rewrite.ExtractFilterFromCrossJoin; import org.apache.doris.nereids.rules.rewrite.ExtractSingleTableExpressionFromDisjunction; @@ -393,7 +392,6 @@ public class Rewriter extends AbstractBatchJobExecutor { // this rule batch must keep at the end of rewrite to do some plan check topic("Final rewrite and check", custom(RuleType.CHECK_DATA_TYPES, CheckDataTypes::new), - custom(RuleType.ENSURE_PROJECT_ON_TOP_JOIN, EnsureProjectOnTopJoin::new), topDown(new PushDownFilterThroughProject(), new MergeProjects()), custom(RuleType.ADJUST_CONJUNCTS_RETURN_TYPE, AdjustConjunctsReturnType::new), bottomUp( diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/EnsureProjectOnTopJoin.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/EnsureProjectOnTopJoin.java deleted file mode 100644 index 1671284790..0000000000 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/EnsureProjectOnTopJoin.java +++ /dev/null @@ -1,60 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -package org.apache.doris.nereids.rules.rewrite; - -import org.apache.doris.nereids.jobs.JobContext; -import org.apache.doris.nereids.trees.expressions.NamedExpression; -import org.apache.doris.nereids.trees.plans.Plan; -import org.apache.doris.nereids.trees.plans.logical.LogicalAggregate; -import org.apache.doris.nereids.trees.plans.logical.LogicalJoin; -import org.apache.doris.nereids.trees.plans.logical.LogicalProject; -import org.apache.doris.nereids.trees.plans.visitor.CustomRewriter; -import org.apache.doris.nereids.trees.plans.visitor.DefaultPlanRewriter; - -import java.util.List; -import java.util.stream.Collectors; - -/** - * The rule add an explicit project at the top join to ensure the output of whole plan is stable - * and avoid generate circle in memo. - */ -public class EnsureProjectOnTopJoin extends DefaultPlanRewriter implements CustomRewriter { - - @Override - public Plan rewriteRoot(Plan plan, JobContext jobContext) { - return plan.accept(this, null); - } - - @Override - public Plan visitLogicalAggregate(LogicalAggregate aggregate, Void context) { - return aggregate; - } - - @Override - public Plan visitLogicalProject(LogicalProject project, Void context) { - return project; - } - - @Override - public Plan visitLogicalJoin(LogicalJoin join, Void context) { - List projects = join.getOutput().stream() - .map(NamedExpression.class::cast) - .collect(Collectors.toList()); - return new LogicalProject<>(projects, join); - } -} diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/postprocess/TopNRuntimeFilterTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/postprocess/TopNRuntimeFilterTest.java index 57c6c04514..53edb72642 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/postprocess/TopNRuntimeFilterTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/postprocess/TopNRuntimeFilterTest.java @@ -58,11 +58,11 @@ public class TopNRuntimeFilterTest extends SSBTestBase implements MemoPatternMat .implement(); PhysicalPlan plan = checker.getPhysicalPlan(); plan = new PlanPostProcessors(checker.getCascadesContext()).process(plan); - Assertions.assertInstanceOf(PhysicalTopN.class, plan.child(0).child(0).child(1).child(0)); + Assertions.assertInstanceOf(PhysicalTopN.class, plan.child(0).child(1).child(0)); Assertions.assertEquals(SortPhase.LOCAL_SORT, ((PhysicalTopN) plan - .child(0).child(0).child(1).child(0)).getSortPhase()); + .child(0).child(1).child(0)).getSortPhase()); PhysicalTopN localTopN = (PhysicalTopN) plan - .child(0).child(0).child(1).child(0); + .child(0).child(1).child(0); Assertions.assertTrue(checker.getCascadesContext().getTopnFilterContext().isTopnFilterSource(localTopN)); } diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/analysis/BindRelationTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/analysis/BindRelationTest.java index e23c67ed56..d719f3a8f8 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/analysis/BindRelationTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/analysis/BindRelationTest.java @@ -116,12 +116,10 @@ class BindRelationTest extends TestWithFeService implements GeneratedPlanPattern .customAnalyzer(Optional.of(customTableResolver)) // analyze internal relation .rewrite() .matches( - logicalProject( logicalJoin( logicalOlapScan().when(r -> r.getTable() == externalOlapTable), logicalOlapScan().when(r -> r.getTable().getName().equals("t")) ) - ) ); } diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/InferPredicatesTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/InferPredicatesTest.java index 0708ea3f17..e3c9e7208e 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/InferPredicatesTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/InferPredicatesTest.java @@ -84,7 +84,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS .analyze(sql) .rewrite() .matches( - logicalProject( logicalJoin( logicalFilter( logicalOlapScan() @@ -95,7 +94,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS ).when(filter -> ExpressionUtils.isInferred(filter.getPredicate()) & filter.getPredicate().toSql().contains("sid > 1")) ) - ) ); } @@ -107,12 +105,10 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS .analyze(sql) .rewrite() .matches( - logicalProject( logicalJoin( logicalOlapScan(), logicalOlapScan() ) - ) ); } @@ -124,14 +120,12 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS .analyze(sql) .rewrite() .matches( - logicalProject( logicalJoin( logicalFilter(logicalOlapScan()).when(filter -> !ExpressionUtils.isInferred(filter.getPredicate()) & filter.getPredicate().toSql().contains("id IN (1, 2, 3)")), logicalFilter(logicalOlapScan()).when(filter -> ExpressionUtils.isInferred(filter.getPredicate()) & filter.getPredicate().toSql().contains("sid IN (1, 2, 3)")) ) - ) ); } @@ -143,14 +137,12 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS .analyze(sql) .rewrite() .matches( - logicalProject( logicalJoin( logicalFilter(logicalOlapScan()).when(filter -> !ExpressionUtils.isInferred(filter.getPredicate()) & filter.getPredicate().toSql().contains("id IN (1, 2, 3)")), logicalFilter(logicalOlapScan()).when(filter -> ExpressionUtils.isInferred(filter.getPredicate()) & filter.getPredicate().toSql().contains("sid IN (1, 2, 3)")) ) - ) ); } @@ -162,7 +154,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS .analyze(sql) .rewrite() .matches( - logicalProject( logicalJoin( logicalJoin( logicalFilter( @@ -178,7 +169,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS logicalOlapScan() ).when(filter -> filter.getPredicate().toSql().contains("id > 1")) ) - ) ); } @@ -190,7 +180,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS .analyze(sql) .rewrite() .matches( - logicalProject( logicalJoin( logicalJoin( logicalFilter( @@ -206,7 +195,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS logicalOlapScan() ).when(filter -> filter.getPredicate().toSql().contains("id > 1")) ) - ) ); } @@ -218,7 +206,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS .analyze(sql) .rewrite() .matches( - logicalProject( logicalJoin( logicalFilter( logicalOlapScan() @@ -229,7 +216,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS ).when(filter -> ExpressionUtils.isInferred(filter.getPredicate()) & filter.getPredicate().toSql().contains("sid > 1")) ) - ) ); } @@ -241,7 +227,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS .analyze(sql) .rewrite() .matches( - logicalProject( logicalJoin( logicalOlapScan(), logicalFilter( @@ -249,7 +234,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS ).when(filter -> ExpressionUtils.isInferred(filter.getPredicate()) & filter.getPredicate().toSql().contains("sid > 1")) ) - ) ); } @@ -262,7 +246,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS .analyze(sql) .rewrite() .matches( - logicalProject( logicalJoin( logicalFilter( logicalOlapScan() @@ -273,7 +256,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS ).when(filter -> !ExpressionUtils.isInferred(filter.getPredicate()) & filter.getPredicate().toSql().contains("sid > 1")) ) - ) ); } @@ -285,7 +267,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS .analyze(sql) .rewrite() .matches( - logicalProject( logicalJoin( logicalProject( logicalFilter( @@ -298,7 +279,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS ).when(filter -> ExpressionUtils.isInferred(filter.getPredicate()) & filter.getPredicate().toSql().contains("sid > 1")) ) - ) ); } @@ -310,7 +290,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS .analyze(sql) .rewrite() .matches( - logicalProject( logicalJoin( logicalProject( logicalOlapScan() @@ -320,7 +299,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS ).when(filter -> ExpressionUtils.isInferred(filter.getPredicate()) & filter.getPredicate().toSql().contains("sid > 1")) ) - ) ); } @@ -332,7 +310,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS .analyze(sql) .rewrite() .matches( - logicalProject( logicalJoin( logicalFilter( logicalOlapScan() @@ -349,7 +326,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS ) ) ) - ) ); } @@ -361,7 +337,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS .analyze(sql) .rewrite() .matches( - logicalProject( logicalJoin( logicalProject( logicalFilter( @@ -374,7 +349,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS ).when(filter -> ExpressionUtils.isInferred(filter.getPredicate()) & filter.getPredicate().toSql().contains("sid = 1")) ) - ) ); } @@ -386,7 +360,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS .analyze(sql) .rewrite() .matches( - logicalProject( logicalJoin( logicalFilter( logicalOlapScan() @@ -399,7 +372,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS & filter.getPredicate().toSql().contains("sid > 1")) ) ) - ) ); } @@ -411,7 +383,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS .analyze(sql) .rewrite() .matches( - logicalProject( logicalJoin( logicalFilter( logicalOlapScan() @@ -424,7 +395,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS & filter.getPredicate().toSql().contains("sid > 1")) ) ) - ) ); } @@ -436,7 +406,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS .analyze(sql) .rewrite() .matches( - logicalProject( logicalJoin( logicalOlapScan(), logicalProject( @@ -446,7 +415,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS & filter.getPredicate().toSql().contains("sid > 1")) ) ) - ) ); } @@ -458,7 +426,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS .analyze(sql) .rewrite() .matches( - logicalProject( logicalJoin( logicalOlapScan(), logicalProject( @@ -468,7 +435,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS & filter.getPredicate().toSql().contains("sid > 1")) ) ) - ) ); } @@ -480,7 +446,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS .analyze(sql) .rewrite() .matches( - logicalProject( logicalJoin( logicalFilter( logicalOlapScan() @@ -493,7 +458,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS & filter.getPredicate().toSql().contains("sid > 1")) ) ) - ) ); } @@ -527,7 +491,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS .analyze(sql) .rewrite() .matches( - logicalProject( logicalJoin( logicalFilter( logicalOlapScan() @@ -557,7 +520,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS ) ) ) - ) ); } @@ -569,7 +531,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS .analyze(sql) .rewrite() .matches( - logicalProject( innerLogicalJoin( innerLogicalJoin( logicalFilter( @@ -585,7 +546,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS logicalOlapScan() ).when(filter -> filter.getPredicate().toSql().contains("id > 1")) ) - ) ); } @@ -597,7 +557,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS .analyze(sql) .rewrite() .matches( - logicalProject( logicalJoin( logicalJoin( logicalFilter( @@ -613,7 +572,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS logicalOlapScan() ).when(filter -> filter.getPredicate().toSql().contains("id > 1")) ) - ) ); } @@ -628,7 +586,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS .analyze(sql) .rewrite() .matches( - logicalProject( logicalJoin( logicalFilter( logicalOlapScan() @@ -641,7 +598,6 @@ class InferPredicatesTest extends TestWithFeService implements MemoPatternMatchS & filter.getPredicate().toSql().contains("sid > 1")) ) ) - ) ); } diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownTopNThroughJoinTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownTopNThroughJoinTest.java index 017f2446ff..532dec33fa 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownTopNThroughJoinTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownTopNThroughJoinTest.java @@ -121,11 +121,9 @@ class PushDownTopNThroughJoinTest extends TestWithFeService implements MemoPatte .rewrite() .matches( logicalTopN( - logicalProject( - logicalJoin( - logicalTopN().when(l -> l.getLimit() == 10 && l.getOffset() == 0), - logicalOlapScan() - ) + logicalJoin( + logicalTopN().when(l -> l.getLimit() == 10 && l.getOffset() == 0), + logicalOlapScan() ) ) ); diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/ReorderJoinTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/ReorderJoinTest.java index 770181c7ac..b4b72b637a 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/ReorderJoinTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/ReorderJoinTest.java @@ -96,12 +96,10 @@ class ReorderJoinTest implements MemoPatternMatchSupported { PlanChecker.from(MemoTestUtils.createConnectContext(), plan2) .rewrite() .matchesFromRoot( - logicalProject( logicalJoin( logicalJoin().whenNot(join -> join.getJoinType().isCrossJoin()), logicalOlapScan() ).whenNot(join -> join.getJoinType().isCrossJoin()) - ) ); } @@ -127,12 +125,10 @@ class ReorderJoinTest implements MemoPatternMatchSupported { .applyBottomUp(new SemiJoinCommute()) .rewrite() .matchesFromRoot( - logicalProject( innerLogicalJoin( leftSemiLogicalJoin(), logicalOlapScan() ) - ) ); } @@ -188,12 +184,10 @@ class ReorderJoinTest implements MemoPatternMatchSupported { .rewrite() .printlnTree() .matchesFromRoot( - logicalProject( logicalJoin( logicalJoin().whenNot(join -> join.getJoinType().isCrossJoin()), leafPlan() ).whenNot(join -> join.getJoinType().isCrossJoin()) - ) ); } } diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/sqltest/InferTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/sqltest/InferTest.java index 26f6c81079..1f6ab496eb 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/sqltest/InferTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/sqltest/InferTest.java @@ -30,12 +30,10 @@ public class InferTest extends SqlTestBase { .analyze(sql) .rewrite() .matches( - logicalProject( innerLogicalJoin( logicalFilter().when(f -> f.getPredicate().toString().equals("(id#0 = 4)")), logicalFilter().when(f -> f.getPredicate().toString().equals("(id#2 = 4)")) ) - ) ); } @@ -66,7 +64,6 @@ public class InferTest extends SqlTestBase { .analyze(sql) .rewrite() .matches( - logicalProject( logicalFilter( leftOuterLogicalJoin( logicalFilter().when( @@ -75,7 +72,6 @@ public class InferTest extends SqlTestBase { ) ).when(f -> f.getPredicate().toString() .equals("((id#0 = 4) OR ((id#0 > 4) AND score#3 IS NULL))")) - ) ); } diff --git a/regression-test/data/nereids_p0/hint/fix_leading.out b/regression-test/data/nereids_p0/hint/fix_leading.out index 5f33c6e668..2a83ff6eaf 100644 --- a/regression-test/data/nereids_p0/hint/fix_leading.out +++ b/regression-test/data/nereids_p0/hint/fix_leading.out @@ -2,18 +2,17 @@ -- !select1 -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t3.c3) and (t1.c1 = t4.c4)) otherCondition=() ---------NestedLoopJoin[CROSS_JOIN] -----------PhysicalOlapScan[t1] -----------PhysicalDistribute[DistributionSpecReplicated] -------------filter((t2.c2 = t2.c2)) ---------------PhysicalOlapScan[t2] ---------PhysicalDistribute[DistributionSpecHash] -----------hashJoin[INNER_JOIN] hashCondition=((t3.c3 = t4.c4)) otherCondition=() -------------PhysicalOlapScan[t3] -------------PhysicalDistribute[DistributionSpecHash] ---------------PhysicalOlapScan[t4] +----hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t3.c3) and (t1.c1 = t4.c4)) otherCondition=() +------NestedLoopJoin[CROSS_JOIN] +--------PhysicalOlapScan[t1] +--------PhysicalDistribute[DistributionSpecReplicated] +----------filter((t2.c2 = t2.c2)) +------------PhysicalOlapScan[t2] +------PhysicalDistribute[DistributionSpecHash] +--------hashJoin[INNER_JOIN] hashCondition=((t3.c3 = t4.c4)) otherCondition=() +----------PhysicalOlapScan[t3] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t4] Hint log: Used: leading({ t1 t2 } { t3 t4 } ) diff --git a/regression-test/data/nereids_rules_p0/eliminate_outer_join/eliminate_outer_join.out b/regression-test/data/nereids_rules_p0/eliminate_outer_join/eliminate_outer_join.out index b714f8594f..f35ff586ce 100644 --- a/regression-test/data/nereids_rules_p0/eliminate_outer_join/eliminate_outer_join.out +++ b/regression-test/data/nereids_rules_p0/eliminate_outer_join/eliminate_outer_join.out @@ -2,11 +2,10 @@ -- !left_outer -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------PhysicalOlapScan[t] +------filter((t2.score > 10)) --------PhysicalOlapScan[t] ---------filter((t2.score > 10)) -----------PhysicalOlapScan[t] -- !right_outer -- PhysicalResultSink @@ -20,62 +19,56 @@ PhysicalResultSink -- !full_outer_join -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] -----PhysicalProject -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------PhysicalOlapScan[t] +------filter((t1.score > 10)) --------PhysicalOlapScan[t] ---------filter((t1.score > 10)) -----------PhysicalOlapScan[t] -- !full_outer_join -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] -----PhysicalProject -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------PhysicalOlapScan[t] +------filter((t2.score > 10)) --------PhysicalOlapScan[t] ---------filter((t2.score > 10)) -----------PhysicalOlapScan[t] -- !full_outer_join -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------filter((t1.score > 10)) -----------PhysicalOlapScan[t] ---------filter((t2.score > 10)) -----------PhysicalOlapScan[t] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------filter((t1.score > 10)) +--------PhysicalOlapScan[t] +------filter((t2.score > 10)) +--------PhysicalOlapScan[t] -- !left_outer -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------filter((t1.score > 10)) -----------PhysicalOlapScan[t] ---------filter((t2.score > 10)) -----------PhysicalOlapScan[t] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------filter((t1.score > 10)) +--------PhysicalOlapScan[t] +------filter((t2.score > 10)) +--------PhysicalOlapScan[t] -- !multiple_left_outer_1 -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] -----PhysicalProject -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() ---------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[t] -----------filter((t1.score > 10)) -------------PhysicalOlapScan[t] +----hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() +------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() --------PhysicalOlapScan[t] +--------filter((t1.score > 10)) +----------PhysicalOlapScan[t] +------PhysicalOlapScan[t] -- !multiple_left_outer_2 -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] -----PhysicalProject -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[t] -----------filter((t2.score > 10)) -------------PhysicalOlapScan[t] +----hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() +------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() --------PhysicalOlapScan[t] +--------filter((t2.score > 10)) +----------PhysicalOlapScan[t] +------PhysicalOlapScan[t] -- !multiple_right_outer_1 -- PhysicalResultSink @@ -102,34 +95,31 @@ PhysicalResultSink -- !multiple_full_outer_1 -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] -----PhysicalProject -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() ---------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[t] -----------filter((t1.score > 10)) -------------PhysicalOlapScan[t] +----hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() +------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() --------PhysicalOlapScan[t] +--------filter((t1.score > 10)) +----------PhysicalOlapScan[t] +------PhysicalOlapScan[t] -- !multiple_full_outer_2 -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] -----PhysicalProject -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() ---------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[t] -----------filter((t2.score > 10)) -------------PhysicalOlapScan[t] ---------PhysicalDistribute[DistributionSpecReplicated] +----hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() +------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------PhysicalOlapScan[t] +--------filter((t2.score > 10)) ----------PhysicalOlapScan[t] +------PhysicalDistribute[DistributionSpecReplicated] +--------PhysicalOlapScan[t] -- !left_outer_join_non_null_assertion -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] -----PhysicalProject -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------PhysicalOlapScan[t] +------filter(( not id IS NULL) and (t1.score > 5)) --------PhysicalOlapScan[t] ---------filter(( not id IS NULL) and (t1.score > 5)) -----------PhysicalOlapScan[t] -- !right_outer_join_non_null_assertion -- PhysicalResultSink @@ -143,23 +133,21 @@ PhysicalResultSink -- !full_outer_join_compound_conditions -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] -----PhysicalProject -------filter(((t1.score > 5) OR (t2.score > 5))) ---------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[t] -----------PhysicalOlapScan[t] +----filter(((t1.score > 5) OR (t2.score > 5))) +------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------PhysicalOlapScan[t] +--------PhysicalOlapScan[t] -- !multiple_joins_complex_conditions -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[t] -----------filter((t1.score > 5)) -------------PhysicalOlapScan[t] ---------filter(( not score IS NULL)) +----hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() +------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------PhysicalOlapScan[t] +--------filter((t1.score > 5)) ----------PhysicalOlapScan[t] +------filter(( not score IS NULL)) +--------PhysicalOlapScan[t] -- !using_non_equijoin_conditions -- PhysicalResultSink @@ -198,12 +186,11 @@ PhysicalResultSink -- !left_outer -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------filter(( not name IS NULL)) -----------PhysicalOlapScan[t] ---------filter((t1.score > 10)) -----------PhysicalOlapScan[t] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------filter(( not name IS NULL)) +--------PhysicalOlapScan[t] +------filter((t1.score > 10)) +--------PhysicalOlapScan[t] -- !right_outer -- PhysicalResultSink @@ -218,21 +205,19 @@ PhysicalResultSink -- !full_outer -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------filter(( not name IS NULL)) -----------PhysicalOlapScan[t] ---------filter((t1.score > 10)) -----------PhysicalOlapScan[t] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------filter(( not name IS NULL)) +--------PhysicalOlapScan[t] +------filter((t1.score > 10)) +--------PhysicalOlapScan[t] -- !self_left_outer -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t1_alias.id)) otherCondition=() +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t1_alias.id)) otherCondition=() +------PhysicalOlapScan[t] +------filter((t1_alias.name > '2023-01-01')) --------PhysicalOlapScan[t] ---------filter((t1_alias.name > '2023-01-01')) -----------PhysicalOlapScan[t] -- !right_outer_aggregate -- PhysicalResultSink @@ -248,25 +233,23 @@ PhysicalResultSink -- !full_outer_multiple_tables -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] -----PhysicalProject -------filter(name IS NULL) ---------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() -----------PhysicalDistribute[DistributionSpecHash] -------------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------------PhysicalOlapScan[t] ---------------PhysicalOlapScan[t] -----------PhysicalDistribute[DistributionSpecHash] +----filter(name IS NULL) +------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() +--------PhysicalDistribute[DistributionSpecHash] +----------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ------------PhysicalOlapScan[t] +------------PhysicalOlapScan[t] +--------PhysicalDistribute[DistributionSpecHash] +----------PhysicalOlapScan[t] -- !left_outer_with_subquery -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[t] ---------PhysicalProject -----------filter((t2.score > 20)) -------------PhysicalOlapScan[t] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------PhysicalOlapScan[t] +------PhysicalProject +--------filter((t2.score > 20)) +----------PhysicalOlapScan[t] -- !complex_join_conditions -- PhysicalResultSink @@ -295,9 +278,8 @@ PhysicalResultSink -- !join_different_tables_non_null -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------PhysicalOlapScan[t] +------filter(( not name IS NULL)) --------PhysicalOlapScan[t] ---------filter(( not name IS NULL)) -----------PhysicalOlapScan[t] diff --git a/regression-test/data/nereids_rules_p0/filter_push_down/push_down_alias_through_join.out b/regression-test/data/nereids_rules_p0/filter_push_down/push_down_alias_through_join.out index b0c3f55fbc..e99770d7c7 100644 --- a/regression-test/data/nereids_rules_p0/filter_push_down/push_down_alias_through_join.out +++ b/regression-test/data/nereids_rules_p0/filter_push_down/push_down_alias_through_join.out @@ -56,25 +56,23 @@ PhysicalResultSink -- !pushdown_right_semi_join -- PhysicalResultSink ---PhysicalProject -----NestedLoopJoin[RIGHT_SEMI_JOIN](t1.id > id2) -------PhysicalDistribute[DistributionSpecGather] ---------PhysicalProject -----------PhysicalOlapScan[t1] -------PhysicalDistribute[DistributionSpecGather] ---------PhysicalProject -----------PhysicalOlapScan[t2] +--NestedLoopJoin[RIGHT_SEMI_JOIN](t1.id > id2) +----PhysicalDistribute[DistributionSpecGather] +------PhysicalProject +--------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalProject +--------PhysicalOlapScan[t2] -- !pushdown_right_anti_join -- PhysicalResultSink ---PhysicalProject -----NestedLoopJoin[RIGHT_ANTI_JOIN](t1.id > id2) -------PhysicalDistribute[DistributionSpecGather] ---------PhysicalProject -----------PhysicalOlapScan[t1] -------PhysicalDistribute[DistributionSpecGather] ---------PhysicalProject -----------PhysicalOlapScan[t2] +--NestedLoopJoin[RIGHT_ANTI_JOIN](t1.id > id2) +----PhysicalDistribute[DistributionSpecGather] +------PhysicalProject +--------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalProject +--------PhysicalOlapScan[t2] -- !pushdown_left_anti_join -- PhysicalResultSink @@ -101,35 +99,33 @@ PhysicalResultSink -- !pushdown_multiple_joins -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((id2 = id3)) otherCondition=((id2 < id3)) ---------hashJoin[INNER_JOIN] hashCondition=((id1 = id2)) otherCondition=((id1 > id2)) -----------PhysicalProject -------------PhysicalOlapScan[t1] -----------PhysicalDistribute[DistributionSpecHash] -------------PhysicalProject ---------------PhysicalOlapScan[t2] +----hashJoin[INNER_JOIN] hashCondition=((id2 = id3)) otherCondition=((id2 < id3)) +------hashJoin[INNER_JOIN] hashCondition=((id1 = id2)) otherCondition=((id1 > id2)) +--------PhysicalProject +----------PhysicalOlapScan[t1] --------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject -------------PhysicalOlapScan[t3] +------------PhysicalOlapScan[t2] +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalProject +----------PhysicalOlapScan[t3] -- !pushdown_multiple_joins -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] -----PhysicalProject -------hashJoin[LEFT_SEMI_JOIN] hashCondition=((id3 = t4.id)) otherCondition=() ---------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((id2 = id3)) otherCondition=() -----------PhysicalDistribute[DistributionSpecHash] -------------hashJoin[INNER_JOIN] hashCondition=((id1 = id2)) otherCondition=() ---------------PhysicalProject -----------------PhysicalOlapScan[t1] ---------------PhysicalDistribute[DistributionSpecHash] -----------------PhysicalProject -------------------PhysicalOlapScan[t2] -----------PhysicalDistribute[DistributionSpecHash] +----hashJoin[LEFT_SEMI_JOIN] hashCondition=((id3 = t4.id)) otherCondition=() +------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((id2 = id3)) otherCondition=() +--------PhysicalDistribute[DistributionSpecHash] +----------hashJoin[INNER_JOIN] hashCondition=((id1 = id2)) otherCondition=() ------------PhysicalProject ---------------PhysicalOlapScan[t3] +--------------PhysicalOlapScan[t1] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t2] --------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject -------------PhysicalOlapScan[t4] +------------PhysicalOlapScan[t3] +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalProject +----------PhysicalOlapScan[t4] diff --git a/regression-test/data/nereids_shape_check/load.out b/regression-test/data/nereids_shape_check/load.out index da0b0c9646..f495424d72 100644 --- a/regression-test/data/nereids_shape_check/load.out +++ b/regression-test/data/nereids_shape_check/load.out @@ -2,36 +2,32 @@ -- !bc1 -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.code = t2.ACCEPT_ORG_CODE)) otherCondition=() build RFs:RF0 code->[ACCEPT_ORG_CODE] ---------PhysicalOlapScan[t2] apply RFs: RF0 ---------PhysicalDistribute[DistributionSpecReplicated] -----------PhysicalOlapScan[t1] +----hashJoin[INNER_JOIN] hashCondition=((t1.code = t2.ACCEPT_ORG_CODE)) otherCondition=() build RFs:RF0 code->[ACCEPT_ORG_CODE] +------PhysicalOlapScan[t2] apply RFs: RF0 +------PhysicalDistribute[DistributionSpecReplicated] +--------PhysicalOlapScan[t1] -- !bc2 -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] -----PhysicalProject -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.code = t2.ACCEPT_ORG_CODE)) otherCondition=() ---------PhysicalOlapScan[t2] ---------PhysicalDistribute[DistributionSpecReplicated] -----------PhysicalOlapScan[t1] +----hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.code = t2.ACCEPT_ORG_CODE)) otherCondition=() +------PhysicalOlapScan[t2] +------PhysicalDistribute[DistributionSpecReplicated] +--------PhysicalOlapScan[t1] -- !bc3 -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] -----PhysicalProject -------hashJoin[INNER_JOIN] hashCondition=((t1.code = t2.ACCEPT_ORG_CODE)) otherCondition=() build RFs:RF0 code->[ACCEPT_ORG_CODE] ---------PhysicalOlapScan[t2] apply RFs: RF0 ---------PhysicalDistribute[DistributionSpecReplicated] -----------PhysicalOlapScan[t1] +----hashJoin[INNER_JOIN] hashCondition=((t1.code = t2.ACCEPT_ORG_CODE)) otherCondition=() build RFs:RF0 code->[ACCEPT_ORG_CODE] +------PhysicalOlapScan[t2] apply RFs: RF0 +------PhysicalDistribute[DistributionSpecReplicated] +--------PhysicalOlapScan[t1] -- !bc4 -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] -----PhysicalProject -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.code = t2.ACCEPT_ORG_CODE)) otherCondition=() ---------PhysicalOlapScan[t2] ---------PhysicalDistribute[DistributionSpecReplicated] -----------PhysicalOlapScan[t1] +----hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.code = t2.ACCEPT_ORG_CODE)) otherCondition=() +------PhysicalOlapScan[t2] +------PhysicalDistribute[DistributionSpecReplicated] +--------PhysicalOlapScan[t1] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query28.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query28.out index 5651a8010a..ce14eda73b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query28.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query28.out @@ -3,61 +3,60 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] -------PhysicalProject ---------NestedLoopJoin[CROSS_JOIN] -----------PhysicalLimit[LOCAL] -------------NestedLoopJoin[CROSS_JOIN] ---------------PhysicalLimit[LOCAL] -----------------NestedLoopJoin[CROSS_JOIN] -------------------PhysicalLimit[LOCAL] ---------------------NestedLoopJoin[CROSS_JOIN] -----------------------PhysicalLimit[LOCAL] -------------------------NestedLoopJoin[CROSS_JOIN] ---------------------------PhysicalLimit[LOCAL] -----------------------------hashAgg[GLOBAL] -------------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------------hashAgg[LOCAL] -----------------------------------PhysicalProject -------------------------------------filter(((((store_sales.ss_list_price >= 107.00) AND (store_sales.ss_list_price <= 117.00)) OR ((store_sales.ss_coupon_amt >= 1319.00) AND (store_sales.ss_coupon_amt <= 2319.00))) OR ((store_sales.ss_wholesale_cost >= 60.00) AND (store_sales.ss_wholesale_cost <= 80.00))) and (store_sales.ss_quantity <= 5) and (store_sales.ss_quantity >= 0)) ---------------------------------------PhysicalOlapScan[store_sales] ---------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------PhysicalLimit[LOCAL] -------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute[DistributionSpecGather] -----------------------------------hashAgg[LOCAL] -------------------------------------PhysicalProject ---------------------------------------filter(((((store_sales.ss_list_price >= 23.00) AND (store_sales.ss_list_price <= 33.00)) OR ((store_sales.ss_coupon_amt >= 825.00) AND (store_sales.ss_coupon_amt <= 1825.00))) OR ((store_sales.ss_wholesale_cost >= 43.00) AND (store_sales.ss_wholesale_cost <= 63.00))) and (store_sales.ss_quantity <= 10) and (store_sales.ss_quantity >= 6)) -----------------------------------------PhysicalOlapScan[store_sales] -----------------------PhysicalDistribute[DistributionSpecReplicated] +------NestedLoopJoin[CROSS_JOIN] +--------PhysicalLimit[LOCAL] +----------NestedLoopJoin[CROSS_JOIN] +------------PhysicalLimit[LOCAL] +--------------NestedLoopJoin[CROSS_JOIN] +----------------PhysicalLimit[LOCAL] +------------------NestedLoopJoin[CROSS_JOIN] +--------------------PhysicalLimit[LOCAL] +----------------------NestedLoopJoin[CROSS_JOIN] ------------------------PhysicalLimit[LOCAL] --------------------------hashAgg[GLOBAL] ----------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject -----------------------------------filter(((((store_sales.ss_list_price >= 74.00) AND (store_sales.ss_list_price <= 84.00)) OR ((store_sales.ss_coupon_amt >= 4381.00) AND (store_sales.ss_coupon_amt <= 5381.00))) OR ((store_sales.ss_wholesale_cost >= 57.00) AND (store_sales.ss_wholesale_cost <= 77.00))) and (store_sales.ss_quantity <= 15) and (store_sales.ss_quantity >= 11)) +----------------------------------filter(((((store_sales.ss_list_price >= 107.00) AND (store_sales.ss_list_price <= 117.00)) OR ((store_sales.ss_coupon_amt >= 1319.00) AND (store_sales.ss_coupon_amt <= 2319.00))) OR ((store_sales.ss_wholesale_cost >= 60.00) AND (store_sales.ss_wholesale_cost <= 80.00))) and (store_sales.ss_quantity <= 5) and (store_sales.ss_quantity >= 0)) ------------------------------------PhysicalOlapScan[store_sales] -------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------PhysicalLimit[LOCAL] -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------filter(((((store_sales.ss_list_price >= 89.00) AND (store_sales.ss_list_price <= 99.00)) OR ((store_sales.ss_coupon_amt >= 3117.00) AND (store_sales.ss_coupon_amt <= 4117.00))) OR ((store_sales.ss_wholesale_cost >= 68.00) AND (store_sales.ss_wholesale_cost <= 88.00))) and (store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 16)) ---------------------------------PhysicalOlapScan[store_sales] ---------------PhysicalDistribute[DistributionSpecReplicated] -----------------PhysicalLimit[LOCAL] -------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute[DistributionSpecGather] -----------------------hashAgg[LOCAL] -------------------------PhysicalProject ---------------------------filter(((((store_sales.ss_list_price >= 58.00) AND (store_sales.ss_list_price <= 68.00)) OR ((store_sales.ss_coupon_amt >= 9402.00) AND (store_sales.ss_coupon_amt <= 10402.00))) OR ((store_sales.ss_wholesale_cost >= 38.00) AND (store_sales.ss_wholesale_cost <= 58.00))) and (store_sales.ss_quantity <= 25) and (store_sales.ss_quantity >= 21)) -----------------------------PhysicalOlapScan[store_sales] -----------PhysicalDistribute[DistributionSpecReplicated] -------------PhysicalLimit[LOCAL] ---------------hashAgg[GLOBAL] -----------------PhysicalDistribute[DistributionSpecGather] -------------------hashAgg[LOCAL] ---------------------PhysicalProject -----------------------filter(((((store_sales.ss_list_price >= 64.00) AND (store_sales.ss_list_price <= 74.00)) OR ((store_sales.ss_coupon_amt >= 5792.00) AND (store_sales.ss_coupon_amt <= 6792.00))) OR ((store_sales.ss_wholesale_cost >= 73.00) AND (store_sales.ss_wholesale_cost <= 93.00))) and (store_sales.ss_quantity <= 30) and (store_sales.ss_quantity >= 26)) -------------------------PhysicalOlapScan[store_sales] +------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------PhysicalLimit[LOCAL] +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalDistribute[DistributionSpecGather] +--------------------------------hashAgg[LOCAL] +----------------------------------PhysicalProject +------------------------------------filter(((((store_sales.ss_list_price >= 23.00) AND (store_sales.ss_list_price <= 33.00)) OR ((store_sales.ss_coupon_amt >= 825.00) AND (store_sales.ss_coupon_amt <= 1825.00))) OR ((store_sales.ss_wholesale_cost >= 43.00) AND (store_sales.ss_wholesale_cost <= 63.00))) and (store_sales.ss_quantity <= 10) and (store_sales.ss_quantity >= 6)) +--------------------------------------PhysicalOlapScan[store_sales] +--------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------PhysicalLimit[LOCAL] +------------------------hashAgg[GLOBAL] +--------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------hashAgg[LOCAL] +------------------------------PhysicalProject +--------------------------------filter(((((store_sales.ss_list_price >= 74.00) AND (store_sales.ss_list_price <= 84.00)) OR ((store_sales.ss_coupon_amt >= 4381.00) AND (store_sales.ss_coupon_amt <= 5381.00))) OR ((store_sales.ss_wholesale_cost >= 57.00) AND (store_sales.ss_wholesale_cost <= 77.00))) and (store_sales.ss_quantity <= 15) and (store_sales.ss_quantity >= 11)) +----------------------------------PhysicalOlapScan[store_sales] +----------------PhysicalDistribute[DistributionSpecReplicated] +------------------PhysicalLimit[LOCAL] +--------------------hashAgg[GLOBAL] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------hashAgg[LOCAL] +--------------------------PhysicalProject +----------------------------filter(((((store_sales.ss_list_price >= 89.00) AND (store_sales.ss_list_price <= 99.00)) OR ((store_sales.ss_coupon_amt >= 3117.00) AND (store_sales.ss_coupon_amt <= 4117.00))) OR ((store_sales.ss_wholesale_cost >= 68.00) AND (store_sales.ss_wholesale_cost <= 88.00))) and (store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 16)) +------------------------------PhysicalOlapScan[store_sales] +------------PhysicalDistribute[DistributionSpecReplicated] +--------------PhysicalLimit[LOCAL] +----------------hashAgg[GLOBAL] +------------------PhysicalDistribute[DistributionSpecGather] +--------------------hashAgg[LOCAL] +----------------------PhysicalProject +------------------------filter(((((store_sales.ss_list_price >= 58.00) AND (store_sales.ss_list_price <= 68.00)) OR ((store_sales.ss_coupon_amt >= 9402.00) AND (store_sales.ss_coupon_amt <= 10402.00))) OR ((store_sales.ss_wholesale_cost >= 38.00) AND (store_sales.ss_wholesale_cost <= 58.00))) and (store_sales.ss_quantity <= 25) and (store_sales.ss_quantity >= 21)) +--------------------------PhysicalOlapScan[store_sales] +--------PhysicalDistribute[DistributionSpecReplicated] +----------PhysicalLimit[LOCAL] +------------hashAgg[GLOBAL] +--------------PhysicalDistribute[DistributionSpecGather] +----------------hashAgg[LOCAL] +------------------PhysicalProject +--------------------filter(((((store_sales.ss_list_price >= 64.00) AND (store_sales.ss_list_price <= 74.00)) OR ((store_sales.ss_coupon_amt >= 5792.00) AND (store_sales.ss_coupon_amt <= 6792.00))) OR ((store_sales.ss_wholesale_cost >= 73.00) AND (store_sales.ss_wholesale_cost <= 93.00))) and (store_sales.ss_quantity <= 30) and (store_sales.ss_quantity >= 26)) +----------------------PhysicalOlapScan[store_sales] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query39.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query39.out index 63d3831c99..2fb33f5848 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query39.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query39.out @@ -27,14 +27,13 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalQuickSort[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] --------PhysicalQuickSort[LOCAL_SORT] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((inv1.i_item_sk = inv2.i_item_sk) and (inv1.w_warehouse_sk = inv2.w_warehouse_sk)) otherCondition=() ---------------PhysicalDistribute[DistributionSpecHash] -----------------PhysicalProject -------------------filter((inv1.d_moy = 1)) ---------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalDistribute[DistributionSpecHash] -----------------PhysicalProject -------------------filter((inv2.d_moy = 2)) ---------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------hashJoin[INNER_JOIN] hashCondition=((inv1.i_item_sk = inv2.i_item_sk) and (inv1.w_warehouse_sk = inv2.w_warehouse_sk)) otherCondition=() +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------filter((inv1.d_moy = 1)) +------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------filter((inv2.d_moy = 2)) +------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query88.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query88.out index da83a96f51..e3ca438319 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query88.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query88.out @@ -1,73 +1,49 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_88 -- PhysicalResultSink ---PhysicalProject +--NestedLoopJoin[CROSS_JOIN] ----NestedLoopJoin[CROSS_JOIN] ------NestedLoopJoin[CROSS_JOIN] --------NestedLoopJoin[CROSS_JOIN] ----------NestedLoopJoin[CROSS_JOIN] ------------NestedLoopJoin[CROSS_JOIN] --------------NestedLoopJoin[CROSS_JOIN] -----------------NestedLoopJoin[CROSS_JOIN] -------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute[DistributionSpecGather] -----------------------hashAgg[LOCAL] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF23 s_store_sk->[ss_store_sk] -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF22 hd_demo_sk->[ss_hdemo_sk] ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF21 t_time_sk->[ss_sold_time_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF21 RF22 RF23 -----------------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------------PhysicalProject ---------------------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) -----------------------------------------PhysicalOlapScan[time_dim] +----------------hashAgg[GLOBAL] +------------------PhysicalDistribute[DistributionSpecGather] +--------------------hashAgg[LOCAL] +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF23 s_store_sk->[ss_store_sk] +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF22 hd_demo_sk->[ss_hdemo_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF21 t_time_sk->[ss_sold_time_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF21 RF22 RF23 --------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject -------------------------------------filter(((((household_demographics.hd_dep_count = 0) AND (household_demographics.hd_vehicle_count <= 2)) OR ((household_demographics.hd_dep_count = -1) AND (household_demographics.hd_vehicle_count <= 1))) OR ((household_demographics.hd_dep_count = 3) AND (household_demographics.hd_vehicle_count <= 5)))) ---------------------------------------PhysicalOlapScan[household_demographics] -----------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------PhysicalProject ---------------------------------filter((store.s_store_name = 'ese')) -----------------------------------PhysicalOlapScan[store] -------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute[DistributionSpecGather] -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF20 s_store_sk->[ss_store_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF19 hd_demo_sk->[ss_hdemo_sk] -----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF18 t_time_sk->[ss_sold_time_sk] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF18 RF19 RF20 -------------------------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------------------------PhysicalProject -----------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute < 30)) -------------------------------------------PhysicalOlapScan[time_dim] -----------------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------------PhysicalProject ---------------------------------------filter(((((household_demographics.hd_dep_count = 0) AND (household_demographics.hd_vehicle_count <= 2)) OR ((household_demographics.hd_dep_count = -1) AND (household_demographics.hd_vehicle_count <= 1))) OR ((household_demographics.hd_dep_count = 3) AND (household_demographics.hd_vehicle_count <= 5)))) -----------------------------------------PhysicalOlapScan[household_demographics] +------------------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) +--------------------------------------PhysicalOlapScan[time_dim] ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject -----------------------------------filter((store.s_store_name = 'ese')) -------------------------------------PhysicalOlapScan[store] +----------------------------------filter(((((household_demographics.hd_dep_count = 0) AND (household_demographics.hd_vehicle_count <= 2)) OR ((household_demographics.hd_dep_count = -1) AND (household_demographics.hd_vehicle_count <= 1))) OR ((household_demographics.hd_dep_count = 3) AND (household_demographics.hd_vehicle_count <= 5)))) +------------------------------------PhysicalOlapScan[household_demographics] +--------------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------------PhysicalProject +------------------------------filter((store.s_store_name = 'ese')) +--------------------------------PhysicalOlapScan[store] ----------------PhysicalDistribute[DistributionSpecReplicated] ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecGather] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF17 s_store_sk->[ss_store_sk] +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF20 s_store_sk->[ss_store_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF16 hd_demo_sk->[ss_hdemo_sk] ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF15 t_time_sk->[ss_sold_time_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF19 hd_demo_sk->[ss_hdemo_sk] +--------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF18 t_time_sk->[ss_sold_time_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF15 RF16 RF17 +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF18 RF19 RF20 ----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject ---------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute >= 30)) +--------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute < 30)) ----------------------------------------PhysicalOlapScan[time_dim] --------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject @@ -82,15 +58,15 @@ PhysicalResultSink ------------------PhysicalDistribute[DistributionSpecGather] --------------------hashAgg[LOCAL] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF14 s_store_sk->[ss_store_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF17 s_store_sk->[ss_store_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF13 hd_demo_sk->[ss_hdemo_sk] -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF12 t_time_sk->[ss_sold_time_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF16 hd_demo_sk->[ss_hdemo_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF15 t_time_sk->[ss_sold_time_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF12 RF13 RF14 +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF15 RF16 RF17 --------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject -------------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute < 30)) +------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute >= 30)) --------------------------------------PhysicalOlapScan[time_dim] ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject @@ -105,15 +81,15 @@ PhysicalResultSink ----------------PhysicalDistribute[DistributionSpecGather] ------------------hashAgg[LOCAL] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF11 s_store_sk->[ss_store_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF14 s_store_sk->[ss_store_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF10 hd_demo_sk->[ss_hdemo_sk] -----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF9 t_time_sk->[ss_sold_time_sk] +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF13 hd_demo_sk->[ss_hdemo_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF12 t_time_sk->[ss_sold_time_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF9 RF10 RF11 +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF12 RF13 RF14 ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject -----------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute >= 30)) +----------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute < 30)) ------------------------------------PhysicalOlapScan[time_dim] ----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject @@ -128,15 +104,15 @@ PhysicalResultSink --------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF8 s_store_sk->[ss_store_sk] +--------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF11 s_store_sk->[ss_store_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF7 hd_demo_sk->[ss_hdemo_sk] ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF6 t_time_sk->[ss_sold_time_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF10 hd_demo_sk->[ss_hdemo_sk] +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF9 t_time_sk->[ss_sold_time_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8 +------------------------------PhysicalOlapScan[store_sales] apply RFs: RF9 RF10 RF11 ----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject ---------------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute < 30)) +--------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute >= 30)) ----------------------------------PhysicalOlapScan[time_dim] --------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject @@ -151,15 +127,15 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] +------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF8 s_store_sk->[ss_store_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ss_hdemo_sk] -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ss_sold_time_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF7 hd_demo_sk->[ss_hdemo_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF6 t_time_sk->[ss_sold_time_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 RF5 +----------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8 --------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject -------------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute >= 30)) +------------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute < 30)) --------------------------------PhysicalOlapScan[time_dim] ------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject @@ -174,15 +150,15 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecGather] ------------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] +----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] -----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ss_sold_time_sk] +--------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ss_hdemo_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ss_sold_time_sk] ------------------------PhysicalProject ---------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +--------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 RF5 ------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject -----------------------------filter((time_dim.t_hour = 12) and (time_dim.t_minute < 30)) +----------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute >= 30)) ------------------------------PhysicalOlapScan[time_dim] ----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject @@ -192,4 +168,27 @@ PhysicalResultSink --------------------PhysicalProject ----------------------filter((store.s_store_name = 'ese')) ------------------------PhysicalOlapScan[store] +----PhysicalDistribute[DistributionSpecReplicated] +------hashAgg[GLOBAL] +--------PhysicalDistribute[DistributionSpecGather] +----------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_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +--------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ss_sold_time_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +----------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------PhysicalProject +--------------------------filter((time_dim.t_hour = 12) and (time_dim.t_minute < 30)) +----------------------------PhysicalOlapScan[time_dim] +--------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------PhysicalProject +------------------------filter(((((household_demographics.hd_dep_count = 0) AND (household_demographics.hd_vehicle_count <= 2)) OR ((household_demographics.hd_dep_count = -1) AND (household_demographics.hd_vehicle_count <= 1))) OR ((household_demographics.hd_dep_count = 3) AND (household_demographics.hd_vehicle_count <= 5)))) +--------------------------PhysicalOlapScan[household_demographics] +----------------PhysicalDistribute[DistributionSpecReplicated] +------------------PhysicalProject +--------------------filter((store.s_store_name = 'ese')) +----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query28.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query28.out index 08f72b84ba..72124f34ee 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query28.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query28.out @@ -3,61 +3,60 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] -------PhysicalProject ---------NestedLoopJoin[CROSS_JOIN] -----------PhysicalLimit[LOCAL] -------------NestedLoopJoin[CROSS_JOIN] ---------------PhysicalLimit[LOCAL] -----------------NestedLoopJoin[CROSS_JOIN] -------------------PhysicalLimit[LOCAL] ---------------------NestedLoopJoin[CROSS_JOIN] -----------------------PhysicalLimit[LOCAL] -------------------------NestedLoopJoin[CROSS_JOIN] ---------------------------PhysicalLimit[LOCAL] -----------------------------hashAgg[GLOBAL] -------------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------------hashAgg[LOCAL] -----------------------------------PhysicalProject -------------------------------------filter(((((store_sales.ss_list_price >= 131.00) AND (store_sales.ss_list_price <= 141.00)) OR ((store_sales.ss_coupon_amt >= 16798.00) AND (store_sales.ss_coupon_amt <= 17798.00))) OR ((store_sales.ss_wholesale_cost >= 25.00) AND (store_sales.ss_wholesale_cost <= 45.00))) and (store_sales.ss_quantity <= 5) and (store_sales.ss_quantity >= 0)) ---------------------------------------PhysicalOlapScan[store_sales] ---------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------PhysicalLimit[LOCAL] -------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute[DistributionSpecGather] -----------------------------------hashAgg[LOCAL] -------------------------------------PhysicalProject ---------------------------------------filter(((((store_sales.ss_list_price >= 145.00) AND (store_sales.ss_list_price <= 155.00)) OR ((store_sales.ss_coupon_amt >= 14792.00) AND (store_sales.ss_coupon_amt <= 15792.00))) OR ((store_sales.ss_wholesale_cost >= 46.00) AND (store_sales.ss_wholesale_cost <= 66.00))) and (store_sales.ss_quantity <= 10) and (store_sales.ss_quantity >= 6)) -----------------------------------------PhysicalOlapScan[store_sales] -----------------------PhysicalDistribute[DistributionSpecReplicated] +------NestedLoopJoin[CROSS_JOIN] +--------PhysicalLimit[LOCAL] +----------NestedLoopJoin[CROSS_JOIN] +------------PhysicalLimit[LOCAL] +--------------NestedLoopJoin[CROSS_JOIN] +----------------PhysicalLimit[LOCAL] +------------------NestedLoopJoin[CROSS_JOIN] +--------------------PhysicalLimit[LOCAL] +----------------------NestedLoopJoin[CROSS_JOIN] ------------------------PhysicalLimit[LOCAL] --------------------------hashAgg[GLOBAL] ----------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject -----------------------------------filter(((((store_sales.ss_list_price >= 150.00) AND (store_sales.ss_list_price <= 1.6E+2)) OR ((store_sales.ss_coupon_amt >= 6600.00) AND (store_sales.ss_coupon_amt <= 7.6E+3))) OR ((store_sales.ss_wholesale_cost >= 9.00) AND (store_sales.ss_wholesale_cost <= 29.00))) and (store_sales.ss_quantity <= 15) and (store_sales.ss_quantity >= 11)) +----------------------------------filter(((((store_sales.ss_list_price >= 131.00) AND (store_sales.ss_list_price <= 141.00)) OR ((store_sales.ss_coupon_amt >= 16798.00) AND (store_sales.ss_coupon_amt <= 17798.00))) OR ((store_sales.ss_wholesale_cost >= 25.00) AND (store_sales.ss_wholesale_cost <= 45.00))) and (store_sales.ss_quantity <= 5) and (store_sales.ss_quantity >= 0)) ------------------------------------PhysicalOlapScan[store_sales] -------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------PhysicalLimit[LOCAL] -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------filter(((((store_sales.ss_list_price >= 91.00) AND (store_sales.ss_list_price <= 101.00)) OR ((store_sales.ss_coupon_amt >= 13493.00) AND (store_sales.ss_coupon_amt <= 14493.00))) OR ((store_sales.ss_wholesale_cost >= 36.00) AND (store_sales.ss_wholesale_cost <= 56.00))) and (store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 16)) ---------------------------------PhysicalOlapScan[store_sales] ---------------PhysicalDistribute[DistributionSpecReplicated] -----------------PhysicalLimit[LOCAL] -------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute[DistributionSpecGather] -----------------------hashAgg[LOCAL] -------------------------PhysicalProject ---------------------------filter(((((store_sales.ss_list_price >= 0.00) AND (store_sales.ss_list_price <= 10.00)) OR ((store_sales.ss_coupon_amt >= 7629.00) AND (store_sales.ss_coupon_amt <= 8629.00))) OR ((store_sales.ss_wholesale_cost >= 6.00) AND (store_sales.ss_wholesale_cost <= 26.00))) and (store_sales.ss_quantity <= 25) and (store_sales.ss_quantity >= 21)) -----------------------------PhysicalOlapScan[store_sales] -----------PhysicalDistribute[DistributionSpecReplicated] -------------PhysicalLimit[LOCAL] ---------------hashAgg[GLOBAL] -----------------PhysicalDistribute[DistributionSpecGather] -------------------hashAgg[LOCAL] ---------------------PhysicalProject -----------------------filter(((((store_sales.ss_list_price >= 89.00) AND (store_sales.ss_list_price <= 99.00)) OR ((store_sales.ss_coupon_amt >= 15257.00) AND (store_sales.ss_coupon_amt <= 16257.00))) OR ((store_sales.ss_wholesale_cost >= 31.00) AND (store_sales.ss_wholesale_cost <= 51.00))) and (store_sales.ss_quantity <= 30) and (store_sales.ss_quantity >= 26)) -------------------------PhysicalOlapScan[store_sales] +------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------PhysicalLimit[LOCAL] +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalDistribute[DistributionSpecGather] +--------------------------------hashAgg[LOCAL] +----------------------------------PhysicalProject +------------------------------------filter(((((store_sales.ss_list_price >= 145.00) AND (store_sales.ss_list_price <= 155.00)) OR ((store_sales.ss_coupon_amt >= 14792.00) AND (store_sales.ss_coupon_amt <= 15792.00))) OR ((store_sales.ss_wholesale_cost >= 46.00) AND (store_sales.ss_wholesale_cost <= 66.00))) and (store_sales.ss_quantity <= 10) and (store_sales.ss_quantity >= 6)) +--------------------------------------PhysicalOlapScan[store_sales] +--------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------PhysicalLimit[LOCAL] +------------------------hashAgg[GLOBAL] +--------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------hashAgg[LOCAL] +------------------------------PhysicalProject +--------------------------------filter(((((store_sales.ss_list_price >= 150.00) AND (store_sales.ss_list_price <= 1.6E+2)) OR ((store_sales.ss_coupon_amt >= 6600.00) AND (store_sales.ss_coupon_amt <= 7.6E+3))) OR ((store_sales.ss_wholesale_cost >= 9.00) AND (store_sales.ss_wholesale_cost <= 29.00))) and (store_sales.ss_quantity <= 15) and (store_sales.ss_quantity >= 11)) +----------------------------------PhysicalOlapScan[store_sales] +----------------PhysicalDistribute[DistributionSpecReplicated] +------------------PhysicalLimit[LOCAL] +--------------------hashAgg[GLOBAL] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------hashAgg[LOCAL] +--------------------------PhysicalProject +----------------------------filter(((((store_sales.ss_list_price >= 91.00) AND (store_sales.ss_list_price <= 101.00)) OR ((store_sales.ss_coupon_amt >= 13493.00) AND (store_sales.ss_coupon_amt <= 14493.00))) OR ((store_sales.ss_wholesale_cost >= 36.00) AND (store_sales.ss_wholesale_cost <= 56.00))) and (store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 16)) +------------------------------PhysicalOlapScan[store_sales] +------------PhysicalDistribute[DistributionSpecReplicated] +--------------PhysicalLimit[LOCAL] +----------------hashAgg[GLOBAL] +------------------PhysicalDistribute[DistributionSpecGather] +--------------------hashAgg[LOCAL] +----------------------PhysicalProject +------------------------filter(((((store_sales.ss_list_price >= 0.00) AND (store_sales.ss_list_price <= 10.00)) OR ((store_sales.ss_coupon_amt >= 7629.00) AND (store_sales.ss_coupon_amt <= 8629.00))) OR ((store_sales.ss_wholesale_cost >= 6.00) AND (store_sales.ss_wholesale_cost <= 26.00))) and (store_sales.ss_quantity <= 25) and (store_sales.ss_quantity >= 21)) +--------------------------PhysicalOlapScan[store_sales] +--------PhysicalDistribute[DistributionSpecReplicated] +----------PhysicalLimit[LOCAL] +------------hashAgg[GLOBAL] +--------------PhysicalDistribute[DistributionSpecGather] +----------------hashAgg[LOCAL] +------------------PhysicalProject +--------------------filter(((((store_sales.ss_list_price >= 89.00) AND (store_sales.ss_list_price <= 99.00)) OR ((store_sales.ss_coupon_amt >= 15257.00) AND (store_sales.ss_coupon_amt <= 16257.00))) OR ((store_sales.ss_wholesale_cost >= 31.00) AND (store_sales.ss_wholesale_cost <= 51.00))) and (store_sales.ss_quantity <= 30) and (store_sales.ss_quantity >= 26)) +----------------------PhysicalOlapScan[store_sales] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query39.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query39.out index cb37792486..9ffc6dc5e0 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query39.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query39.out @@ -26,14 +26,13 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalQuickSort[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] --------PhysicalQuickSort[LOCAL_SORT] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((inv1.i_item_sk = inv2.i_item_sk) and (inv1.w_warehouse_sk = inv2.w_warehouse_sk)) otherCondition=() ---------------PhysicalDistribute[DistributionSpecHash] -----------------PhysicalProject -------------------filter((inv1.d_moy = 1)) ---------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalDistribute[DistributionSpecHash] -----------------PhysicalProject -------------------filter((inv2.d_moy = 2)) ---------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------hashJoin[INNER_JOIN] hashCondition=((inv1.i_item_sk = inv2.i_item_sk) and (inv1.w_warehouse_sk = inv2.w_warehouse_sk)) otherCondition=() +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------filter((inv1.d_moy = 1)) +------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------filter((inv2.d_moy = 2)) +------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query88.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query88.out index 9225360005..fe1b8c4090 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query88.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query88.out @@ -1,73 +1,49 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_88 -- PhysicalResultSink ---PhysicalProject +--NestedLoopJoin[CROSS_JOIN] ----NestedLoopJoin[CROSS_JOIN] ------NestedLoopJoin[CROSS_JOIN] --------NestedLoopJoin[CROSS_JOIN] ----------NestedLoopJoin[CROSS_JOIN] ------------NestedLoopJoin[CROSS_JOIN] --------------NestedLoopJoin[CROSS_JOIN] -----------------NestedLoopJoin[CROSS_JOIN] -------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute[DistributionSpecGather] -----------------------hashAgg[LOCAL] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF23 s_store_sk->[ss_store_sk] -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF22 hd_demo_sk->[ss_hdemo_sk] ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF21 t_time_sk->[ss_sold_time_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF21 RF22 RF23 -----------------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------------PhysicalProject ---------------------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) -----------------------------------------PhysicalOlapScan[time_dim] +----------------hashAgg[GLOBAL] +------------------PhysicalDistribute[DistributionSpecGather] +--------------------hashAgg[LOCAL] +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF23 s_store_sk->[ss_store_sk] +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF22 hd_demo_sk->[ss_hdemo_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF21 t_time_sk->[ss_sold_time_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF21 RF22 RF23 --------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject -------------------------------------filter(((((household_demographics.hd_dep_count = -1) AND (household_demographics.hd_vehicle_count <= 1)) OR ((household_demographics.hd_dep_count = 4) AND (household_demographics.hd_vehicle_count <= 6))) OR ((household_demographics.hd_dep_count = 3) AND (household_demographics.hd_vehicle_count <= 5)))) ---------------------------------------PhysicalOlapScan[household_demographics] -----------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------PhysicalProject ---------------------------------filter((store.s_store_name = 'ese')) -----------------------------------PhysicalOlapScan[store] -------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute[DistributionSpecGather] -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF20 s_store_sk->[ss_store_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF19 hd_demo_sk->[ss_hdemo_sk] -----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF18 t_time_sk->[ss_sold_time_sk] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF18 RF19 RF20 -------------------------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------------------------PhysicalProject -----------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute < 30)) -------------------------------------------PhysicalOlapScan[time_dim] -----------------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------------PhysicalProject ---------------------------------------filter(((((household_demographics.hd_dep_count = -1) AND (household_demographics.hd_vehicle_count <= 1)) OR ((household_demographics.hd_dep_count = 4) AND (household_demographics.hd_vehicle_count <= 6))) OR ((household_demographics.hd_dep_count = 3) AND (household_demographics.hd_vehicle_count <= 5)))) -----------------------------------------PhysicalOlapScan[household_demographics] +------------------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) +--------------------------------------PhysicalOlapScan[time_dim] ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject -----------------------------------filter((store.s_store_name = 'ese')) -------------------------------------PhysicalOlapScan[store] +----------------------------------filter(((((household_demographics.hd_dep_count = -1) AND (household_demographics.hd_vehicle_count <= 1)) OR ((household_demographics.hd_dep_count = 4) AND (household_demographics.hd_vehicle_count <= 6))) OR ((household_demographics.hd_dep_count = 3) AND (household_demographics.hd_vehicle_count <= 5)))) +------------------------------------PhysicalOlapScan[household_demographics] +--------------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------------PhysicalProject +------------------------------filter((store.s_store_name = 'ese')) +--------------------------------PhysicalOlapScan[store] ----------------PhysicalDistribute[DistributionSpecReplicated] ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecGather] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF17 s_store_sk->[ss_store_sk] +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF20 s_store_sk->[ss_store_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF16 hd_demo_sk->[ss_hdemo_sk] ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF15 t_time_sk->[ss_sold_time_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF19 hd_demo_sk->[ss_hdemo_sk] +--------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF18 t_time_sk->[ss_sold_time_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF15 RF16 RF17 +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF18 RF19 RF20 ----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject ---------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute >= 30)) +--------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute < 30)) ----------------------------------------PhysicalOlapScan[time_dim] --------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject @@ -82,15 +58,15 @@ PhysicalResultSink ------------------PhysicalDistribute[DistributionSpecGather] --------------------hashAgg[LOCAL] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF14 s_store_sk->[ss_store_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF17 s_store_sk->[ss_store_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF13 hd_demo_sk->[ss_hdemo_sk] -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF12 t_time_sk->[ss_sold_time_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF16 hd_demo_sk->[ss_hdemo_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF15 t_time_sk->[ss_sold_time_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF12 RF13 RF14 +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF15 RF16 RF17 --------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject -------------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute < 30)) +------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute >= 30)) --------------------------------------PhysicalOlapScan[time_dim] ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject @@ -105,15 +81,15 @@ PhysicalResultSink ----------------PhysicalDistribute[DistributionSpecGather] ------------------hashAgg[LOCAL] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF11 s_store_sk->[ss_store_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF14 s_store_sk->[ss_store_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF10 hd_demo_sk->[ss_hdemo_sk] -----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF9 t_time_sk->[ss_sold_time_sk] +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF13 hd_demo_sk->[ss_hdemo_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF12 t_time_sk->[ss_sold_time_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF9 RF10 RF11 +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF12 RF13 RF14 ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject -----------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute >= 30)) +----------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute < 30)) ------------------------------------PhysicalOlapScan[time_dim] ----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject @@ -128,15 +104,15 @@ PhysicalResultSink --------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF8 s_store_sk->[ss_store_sk] +--------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF11 s_store_sk->[ss_store_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF7 hd_demo_sk->[ss_hdemo_sk] ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF6 t_time_sk->[ss_sold_time_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF10 hd_demo_sk->[ss_hdemo_sk] +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF9 t_time_sk->[ss_sold_time_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8 +------------------------------PhysicalOlapScan[store_sales] apply RFs: RF9 RF10 RF11 ----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject ---------------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute < 30)) +--------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute >= 30)) ----------------------------------PhysicalOlapScan[time_dim] --------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject @@ -151,15 +127,15 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] +------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF8 s_store_sk->[ss_store_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ss_hdemo_sk] -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ss_sold_time_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF7 hd_demo_sk->[ss_hdemo_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF6 t_time_sk->[ss_sold_time_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 RF5 +----------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8 --------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject -------------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute >= 30)) +------------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute < 30)) --------------------------------PhysicalOlapScan[time_dim] ------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject @@ -174,15 +150,15 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecGather] ------------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] +----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] -----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ss_sold_time_sk] +--------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ss_hdemo_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ss_sold_time_sk] ------------------------PhysicalProject ---------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +--------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 RF5 ------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject -----------------------------filter((time_dim.t_hour = 12) and (time_dim.t_minute < 30)) +----------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute >= 30)) ------------------------------PhysicalOlapScan[time_dim] ----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject @@ -192,4 +168,27 @@ PhysicalResultSink --------------------PhysicalProject ----------------------filter((store.s_store_name = 'ese')) ------------------------PhysicalOlapScan[store] +----PhysicalDistribute[DistributionSpecReplicated] +------hashAgg[GLOBAL] +--------PhysicalDistribute[DistributionSpecGather] +----------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_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +--------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ss_sold_time_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +----------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------PhysicalProject +--------------------------filter((time_dim.t_hour = 12) and (time_dim.t_minute < 30)) +----------------------------PhysicalOlapScan[time_dim] +--------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------PhysicalProject +------------------------filter(((((household_demographics.hd_dep_count = -1) AND (household_demographics.hd_vehicle_count <= 1)) OR ((household_demographics.hd_dep_count = 4) AND (household_demographics.hd_vehicle_count <= 6))) OR ((household_demographics.hd_dep_count = 3) AND (household_demographics.hd_vehicle_count <= 5)))) +--------------------------PhysicalOlapScan[household_demographics] +----------------PhysicalDistribute[DistributionSpecReplicated] +------------------PhysicalProject +--------------------filter((store.s_store_name = 'ese')) +----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query28.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query28.out index 08f72b84ba..72124f34ee 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query28.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query28.out @@ -3,61 +3,60 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] -------PhysicalProject ---------NestedLoopJoin[CROSS_JOIN] -----------PhysicalLimit[LOCAL] -------------NestedLoopJoin[CROSS_JOIN] ---------------PhysicalLimit[LOCAL] -----------------NestedLoopJoin[CROSS_JOIN] -------------------PhysicalLimit[LOCAL] ---------------------NestedLoopJoin[CROSS_JOIN] -----------------------PhysicalLimit[LOCAL] -------------------------NestedLoopJoin[CROSS_JOIN] ---------------------------PhysicalLimit[LOCAL] -----------------------------hashAgg[GLOBAL] -------------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------------hashAgg[LOCAL] -----------------------------------PhysicalProject -------------------------------------filter(((((store_sales.ss_list_price >= 131.00) AND (store_sales.ss_list_price <= 141.00)) OR ((store_sales.ss_coupon_amt >= 16798.00) AND (store_sales.ss_coupon_amt <= 17798.00))) OR ((store_sales.ss_wholesale_cost >= 25.00) AND (store_sales.ss_wholesale_cost <= 45.00))) and (store_sales.ss_quantity <= 5) and (store_sales.ss_quantity >= 0)) ---------------------------------------PhysicalOlapScan[store_sales] ---------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------PhysicalLimit[LOCAL] -------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute[DistributionSpecGather] -----------------------------------hashAgg[LOCAL] -------------------------------------PhysicalProject ---------------------------------------filter(((((store_sales.ss_list_price >= 145.00) AND (store_sales.ss_list_price <= 155.00)) OR ((store_sales.ss_coupon_amt >= 14792.00) AND (store_sales.ss_coupon_amt <= 15792.00))) OR ((store_sales.ss_wholesale_cost >= 46.00) AND (store_sales.ss_wholesale_cost <= 66.00))) and (store_sales.ss_quantity <= 10) and (store_sales.ss_quantity >= 6)) -----------------------------------------PhysicalOlapScan[store_sales] -----------------------PhysicalDistribute[DistributionSpecReplicated] +------NestedLoopJoin[CROSS_JOIN] +--------PhysicalLimit[LOCAL] +----------NestedLoopJoin[CROSS_JOIN] +------------PhysicalLimit[LOCAL] +--------------NestedLoopJoin[CROSS_JOIN] +----------------PhysicalLimit[LOCAL] +------------------NestedLoopJoin[CROSS_JOIN] +--------------------PhysicalLimit[LOCAL] +----------------------NestedLoopJoin[CROSS_JOIN] ------------------------PhysicalLimit[LOCAL] --------------------------hashAgg[GLOBAL] ----------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject -----------------------------------filter(((((store_sales.ss_list_price >= 150.00) AND (store_sales.ss_list_price <= 1.6E+2)) OR ((store_sales.ss_coupon_amt >= 6600.00) AND (store_sales.ss_coupon_amt <= 7.6E+3))) OR ((store_sales.ss_wholesale_cost >= 9.00) AND (store_sales.ss_wholesale_cost <= 29.00))) and (store_sales.ss_quantity <= 15) and (store_sales.ss_quantity >= 11)) +----------------------------------filter(((((store_sales.ss_list_price >= 131.00) AND (store_sales.ss_list_price <= 141.00)) OR ((store_sales.ss_coupon_amt >= 16798.00) AND (store_sales.ss_coupon_amt <= 17798.00))) OR ((store_sales.ss_wholesale_cost >= 25.00) AND (store_sales.ss_wholesale_cost <= 45.00))) and (store_sales.ss_quantity <= 5) and (store_sales.ss_quantity >= 0)) ------------------------------------PhysicalOlapScan[store_sales] -------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------PhysicalLimit[LOCAL] -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------filter(((((store_sales.ss_list_price >= 91.00) AND (store_sales.ss_list_price <= 101.00)) OR ((store_sales.ss_coupon_amt >= 13493.00) AND (store_sales.ss_coupon_amt <= 14493.00))) OR ((store_sales.ss_wholesale_cost >= 36.00) AND (store_sales.ss_wholesale_cost <= 56.00))) and (store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 16)) ---------------------------------PhysicalOlapScan[store_sales] ---------------PhysicalDistribute[DistributionSpecReplicated] -----------------PhysicalLimit[LOCAL] -------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute[DistributionSpecGather] -----------------------hashAgg[LOCAL] -------------------------PhysicalProject ---------------------------filter(((((store_sales.ss_list_price >= 0.00) AND (store_sales.ss_list_price <= 10.00)) OR ((store_sales.ss_coupon_amt >= 7629.00) AND (store_sales.ss_coupon_amt <= 8629.00))) OR ((store_sales.ss_wholesale_cost >= 6.00) AND (store_sales.ss_wholesale_cost <= 26.00))) and (store_sales.ss_quantity <= 25) and (store_sales.ss_quantity >= 21)) -----------------------------PhysicalOlapScan[store_sales] -----------PhysicalDistribute[DistributionSpecReplicated] -------------PhysicalLimit[LOCAL] ---------------hashAgg[GLOBAL] -----------------PhysicalDistribute[DistributionSpecGather] -------------------hashAgg[LOCAL] ---------------------PhysicalProject -----------------------filter(((((store_sales.ss_list_price >= 89.00) AND (store_sales.ss_list_price <= 99.00)) OR ((store_sales.ss_coupon_amt >= 15257.00) AND (store_sales.ss_coupon_amt <= 16257.00))) OR ((store_sales.ss_wholesale_cost >= 31.00) AND (store_sales.ss_wholesale_cost <= 51.00))) and (store_sales.ss_quantity <= 30) and (store_sales.ss_quantity >= 26)) -------------------------PhysicalOlapScan[store_sales] +------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------PhysicalLimit[LOCAL] +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalDistribute[DistributionSpecGather] +--------------------------------hashAgg[LOCAL] +----------------------------------PhysicalProject +------------------------------------filter(((((store_sales.ss_list_price >= 145.00) AND (store_sales.ss_list_price <= 155.00)) OR ((store_sales.ss_coupon_amt >= 14792.00) AND (store_sales.ss_coupon_amt <= 15792.00))) OR ((store_sales.ss_wholesale_cost >= 46.00) AND (store_sales.ss_wholesale_cost <= 66.00))) and (store_sales.ss_quantity <= 10) and (store_sales.ss_quantity >= 6)) +--------------------------------------PhysicalOlapScan[store_sales] +--------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------PhysicalLimit[LOCAL] +------------------------hashAgg[GLOBAL] +--------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------hashAgg[LOCAL] +------------------------------PhysicalProject +--------------------------------filter(((((store_sales.ss_list_price >= 150.00) AND (store_sales.ss_list_price <= 1.6E+2)) OR ((store_sales.ss_coupon_amt >= 6600.00) AND (store_sales.ss_coupon_amt <= 7.6E+3))) OR ((store_sales.ss_wholesale_cost >= 9.00) AND (store_sales.ss_wholesale_cost <= 29.00))) and (store_sales.ss_quantity <= 15) and (store_sales.ss_quantity >= 11)) +----------------------------------PhysicalOlapScan[store_sales] +----------------PhysicalDistribute[DistributionSpecReplicated] +------------------PhysicalLimit[LOCAL] +--------------------hashAgg[GLOBAL] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------hashAgg[LOCAL] +--------------------------PhysicalProject +----------------------------filter(((((store_sales.ss_list_price >= 91.00) AND (store_sales.ss_list_price <= 101.00)) OR ((store_sales.ss_coupon_amt >= 13493.00) AND (store_sales.ss_coupon_amt <= 14493.00))) OR ((store_sales.ss_wholesale_cost >= 36.00) AND (store_sales.ss_wholesale_cost <= 56.00))) and (store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 16)) +------------------------------PhysicalOlapScan[store_sales] +------------PhysicalDistribute[DistributionSpecReplicated] +--------------PhysicalLimit[LOCAL] +----------------hashAgg[GLOBAL] +------------------PhysicalDistribute[DistributionSpecGather] +--------------------hashAgg[LOCAL] +----------------------PhysicalProject +------------------------filter(((((store_sales.ss_list_price >= 0.00) AND (store_sales.ss_list_price <= 10.00)) OR ((store_sales.ss_coupon_amt >= 7629.00) AND (store_sales.ss_coupon_amt <= 8629.00))) OR ((store_sales.ss_wholesale_cost >= 6.00) AND (store_sales.ss_wholesale_cost <= 26.00))) and (store_sales.ss_quantity <= 25) and (store_sales.ss_quantity >= 21)) +--------------------------PhysicalOlapScan[store_sales] +--------PhysicalDistribute[DistributionSpecReplicated] +----------PhysicalLimit[LOCAL] +------------hashAgg[GLOBAL] +--------------PhysicalDistribute[DistributionSpecGather] +----------------hashAgg[LOCAL] +------------------PhysicalProject +--------------------filter(((((store_sales.ss_list_price >= 89.00) AND (store_sales.ss_list_price <= 99.00)) OR ((store_sales.ss_coupon_amt >= 15257.00) AND (store_sales.ss_coupon_amt <= 16257.00))) OR ((store_sales.ss_wholesale_cost >= 31.00) AND (store_sales.ss_wholesale_cost <= 51.00))) and (store_sales.ss_quantity <= 30) and (store_sales.ss_quantity >= 26)) +----------------------PhysicalOlapScan[store_sales] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query39.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query39.out index e90d430844..40f877acac 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query39.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query39.out @@ -26,14 +26,13 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalQuickSort[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] --------PhysicalQuickSort[LOCAL_SORT] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((inv1.i_item_sk = inv2.i_item_sk) and (inv1.w_warehouse_sk = inv2.w_warehouse_sk)) otherCondition=() ---------------PhysicalDistribute[DistributionSpecHash] -----------------PhysicalProject -------------------filter((inv1.d_moy = 1)) ---------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalDistribute[DistributionSpecHash] -----------------PhysicalProject -------------------filter((inv2.d_moy = 2)) ---------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------hashJoin[INNER_JOIN] hashCondition=((inv1.i_item_sk = inv2.i_item_sk) and (inv1.w_warehouse_sk = inv2.w_warehouse_sk)) otherCondition=() +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------filter((inv1.d_moy = 1)) +------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------filter((inv2.d_moy = 2)) +------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query88.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query88.out index 9225360005..fe1b8c4090 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query88.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query88.out @@ -1,73 +1,49 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_88 -- PhysicalResultSink ---PhysicalProject +--NestedLoopJoin[CROSS_JOIN] ----NestedLoopJoin[CROSS_JOIN] ------NestedLoopJoin[CROSS_JOIN] --------NestedLoopJoin[CROSS_JOIN] ----------NestedLoopJoin[CROSS_JOIN] ------------NestedLoopJoin[CROSS_JOIN] --------------NestedLoopJoin[CROSS_JOIN] -----------------NestedLoopJoin[CROSS_JOIN] -------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute[DistributionSpecGather] -----------------------hashAgg[LOCAL] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF23 s_store_sk->[ss_store_sk] -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF22 hd_demo_sk->[ss_hdemo_sk] ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF21 t_time_sk->[ss_sold_time_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF21 RF22 RF23 -----------------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------------PhysicalProject ---------------------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) -----------------------------------------PhysicalOlapScan[time_dim] +----------------hashAgg[GLOBAL] +------------------PhysicalDistribute[DistributionSpecGather] +--------------------hashAgg[LOCAL] +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF23 s_store_sk->[ss_store_sk] +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF22 hd_demo_sk->[ss_hdemo_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF21 t_time_sk->[ss_sold_time_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF21 RF22 RF23 --------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject -------------------------------------filter(((((household_demographics.hd_dep_count = -1) AND (household_demographics.hd_vehicle_count <= 1)) OR ((household_demographics.hd_dep_count = 4) AND (household_demographics.hd_vehicle_count <= 6))) OR ((household_demographics.hd_dep_count = 3) AND (household_demographics.hd_vehicle_count <= 5)))) ---------------------------------------PhysicalOlapScan[household_demographics] -----------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------PhysicalProject ---------------------------------filter((store.s_store_name = 'ese')) -----------------------------------PhysicalOlapScan[store] -------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute[DistributionSpecGather] -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF20 s_store_sk->[ss_store_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF19 hd_demo_sk->[ss_hdemo_sk] -----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF18 t_time_sk->[ss_sold_time_sk] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF18 RF19 RF20 -------------------------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------------------------PhysicalProject -----------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute < 30)) -------------------------------------------PhysicalOlapScan[time_dim] -----------------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------------PhysicalProject ---------------------------------------filter(((((household_demographics.hd_dep_count = -1) AND (household_demographics.hd_vehicle_count <= 1)) OR ((household_demographics.hd_dep_count = 4) AND (household_demographics.hd_vehicle_count <= 6))) OR ((household_demographics.hd_dep_count = 3) AND (household_demographics.hd_vehicle_count <= 5)))) -----------------------------------------PhysicalOlapScan[household_demographics] +------------------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) +--------------------------------------PhysicalOlapScan[time_dim] ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject -----------------------------------filter((store.s_store_name = 'ese')) -------------------------------------PhysicalOlapScan[store] +----------------------------------filter(((((household_demographics.hd_dep_count = -1) AND (household_demographics.hd_vehicle_count <= 1)) OR ((household_demographics.hd_dep_count = 4) AND (household_demographics.hd_vehicle_count <= 6))) OR ((household_demographics.hd_dep_count = 3) AND (household_demographics.hd_vehicle_count <= 5)))) +------------------------------------PhysicalOlapScan[household_demographics] +--------------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------------PhysicalProject +------------------------------filter((store.s_store_name = 'ese')) +--------------------------------PhysicalOlapScan[store] ----------------PhysicalDistribute[DistributionSpecReplicated] ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecGather] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF17 s_store_sk->[ss_store_sk] +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF20 s_store_sk->[ss_store_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF16 hd_demo_sk->[ss_hdemo_sk] ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF15 t_time_sk->[ss_sold_time_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF19 hd_demo_sk->[ss_hdemo_sk] +--------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF18 t_time_sk->[ss_sold_time_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF15 RF16 RF17 +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF18 RF19 RF20 ----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject ---------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute >= 30)) +--------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute < 30)) ----------------------------------------PhysicalOlapScan[time_dim] --------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject @@ -82,15 +58,15 @@ PhysicalResultSink ------------------PhysicalDistribute[DistributionSpecGather] --------------------hashAgg[LOCAL] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF14 s_store_sk->[ss_store_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF17 s_store_sk->[ss_store_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF13 hd_demo_sk->[ss_hdemo_sk] -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF12 t_time_sk->[ss_sold_time_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF16 hd_demo_sk->[ss_hdemo_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF15 t_time_sk->[ss_sold_time_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF12 RF13 RF14 +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF15 RF16 RF17 --------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject -------------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute < 30)) +------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute >= 30)) --------------------------------------PhysicalOlapScan[time_dim] ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject @@ -105,15 +81,15 @@ PhysicalResultSink ----------------PhysicalDistribute[DistributionSpecGather] ------------------hashAgg[LOCAL] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF11 s_store_sk->[ss_store_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF14 s_store_sk->[ss_store_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF10 hd_demo_sk->[ss_hdemo_sk] -----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF9 t_time_sk->[ss_sold_time_sk] +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF13 hd_demo_sk->[ss_hdemo_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF12 t_time_sk->[ss_sold_time_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF9 RF10 RF11 +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF12 RF13 RF14 ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject -----------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute >= 30)) +----------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute < 30)) ------------------------------------PhysicalOlapScan[time_dim] ----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject @@ -128,15 +104,15 @@ PhysicalResultSink --------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF8 s_store_sk->[ss_store_sk] +--------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF11 s_store_sk->[ss_store_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF7 hd_demo_sk->[ss_hdemo_sk] ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF6 t_time_sk->[ss_sold_time_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF10 hd_demo_sk->[ss_hdemo_sk] +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF9 t_time_sk->[ss_sold_time_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8 +------------------------------PhysicalOlapScan[store_sales] apply RFs: RF9 RF10 RF11 ----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject ---------------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute < 30)) +--------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute >= 30)) ----------------------------------PhysicalOlapScan[time_dim] --------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject @@ -151,15 +127,15 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] +------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF8 s_store_sk->[ss_store_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ss_hdemo_sk] -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ss_sold_time_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF7 hd_demo_sk->[ss_hdemo_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF6 t_time_sk->[ss_sold_time_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 RF5 +----------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8 --------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject -------------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute >= 30)) +------------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute < 30)) --------------------------------PhysicalOlapScan[time_dim] ------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject @@ -174,15 +150,15 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecGather] ------------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] +----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] -----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ss_sold_time_sk] +--------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ss_hdemo_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ss_sold_time_sk] ------------------------PhysicalProject ---------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +--------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 RF5 ------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject -----------------------------filter((time_dim.t_hour = 12) and (time_dim.t_minute < 30)) +----------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute >= 30)) ------------------------------PhysicalOlapScan[time_dim] ----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject @@ -192,4 +168,27 @@ PhysicalResultSink --------------------PhysicalProject ----------------------filter((store.s_store_name = 'ese')) ------------------------PhysicalOlapScan[store] +----PhysicalDistribute[DistributionSpecReplicated] +------hashAgg[GLOBAL] +--------PhysicalDistribute[DistributionSpecGather] +----------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_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +--------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ss_sold_time_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +----------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------PhysicalProject +--------------------------filter((time_dim.t_hour = 12) and (time_dim.t_minute < 30)) +----------------------------PhysicalOlapScan[time_dim] +--------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------PhysicalProject +------------------------filter(((((household_demographics.hd_dep_count = -1) AND (household_demographics.hd_vehicle_count <= 1)) OR ((household_demographics.hd_dep_count = 4) AND (household_demographics.hd_vehicle_count <= 6))) OR ((household_demographics.hd_dep_count = 3) AND (household_demographics.hd_vehicle_count <= 5)))) +--------------------------PhysicalOlapScan[household_demographics] +----------------PhysicalDistribute[DistributionSpecReplicated] +------------------PhysicalProject +--------------------filter((store.s_store_name = 'ese')) +----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query28.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query28.out index 08f72b84ba..72124f34ee 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query28.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query28.out @@ -3,61 +3,60 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] -------PhysicalProject ---------NestedLoopJoin[CROSS_JOIN] -----------PhysicalLimit[LOCAL] -------------NestedLoopJoin[CROSS_JOIN] ---------------PhysicalLimit[LOCAL] -----------------NestedLoopJoin[CROSS_JOIN] -------------------PhysicalLimit[LOCAL] ---------------------NestedLoopJoin[CROSS_JOIN] -----------------------PhysicalLimit[LOCAL] -------------------------NestedLoopJoin[CROSS_JOIN] ---------------------------PhysicalLimit[LOCAL] -----------------------------hashAgg[GLOBAL] -------------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------------hashAgg[LOCAL] -----------------------------------PhysicalProject -------------------------------------filter(((((store_sales.ss_list_price >= 131.00) AND (store_sales.ss_list_price <= 141.00)) OR ((store_sales.ss_coupon_amt >= 16798.00) AND (store_sales.ss_coupon_amt <= 17798.00))) OR ((store_sales.ss_wholesale_cost >= 25.00) AND (store_sales.ss_wholesale_cost <= 45.00))) and (store_sales.ss_quantity <= 5) and (store_sales.ss_quantity >= 0)) ---------------------------------------PhysicalOlapScan[store_sales] ---------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------PhysicalLimit[LOCAL] -------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute[DistributionSpecGather] -----------------------------------hashAgg[LOCAL] -------------------------------------PhysicalProject ---------------------------------------filter(((((store_sales.ss_list_price >= 145.00) AND (store_sales.ss_list_price <= 155.00)) OR ((store_sales.ss_coupon_amt >= 14792.00) AND (store_sales.ss_coupon_amt <= 15792.00))) OR ((store_sales.ss_wholesale_cost >= 46.00) AND (store_sales.ss_wholesale_cost <= 66.00))) and (store_sales.ss_quantity <= 10) and (store_sales.ss_quantity >= 6)) -----------------------------------------PhysicalOlapScan[store_sales] -----------------------PhysicalDistribute[DistributionSpecReplicated] +------NestedLoopJoin[CROSS_JOIN] +--------PhysicalLimit[LOCAL] +----------NestedLoopJoin[CROSS_JOIN] +------------PhysicalLimit[LOCAL] +--------------NestedLoopJoin[CROSS_JOIN] +----------------PhysicalLimit[LOCAL] +------------------NestedLoopJoin[CROSS_JOIN] +--------------------PhysicalLimit[LOCAL] +----------------------NestedLoopJoin[CROSS_JOIN] ------------------------PhysicalLimit[LOCAL] --------------------------hashAgg[GLOBAL] ----------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject -----------------------------------filter(((((store_sales.ss_list_price >= 150.00) AND (store_sales.ss_list_price <= 1.6E+2)) OR ((store_sales.ss_coupon_amt >= 6600.00) AND (store_sales.ss_coupon_amt <= 7.6E+3))) OR ((store_sales.ss_wholesale_cost >= 9.00) AND (store_sales.ss_wholesale_cost <= 29.00))) and (store_sales.ss_quantity <= 15) and (store_sales.ss_quantity >= 11)) +----------------------------------filter(((((store_sales.ss_list_price >= 131.00) AND (store_sales.ss_list_price <= 141.00)) OR ((store_sales.ss_coupon_amt >= 16798.00) AND (store_sales.ss_coupon_amt <= 17798.00))) OR ((store_sales.ss_wholesale_cost >= 25.00) AND (store_sales.ss_wholesale_cost <= 45.00))) and (store_sales.ss_quantity <= 5) and (store_sales.ss_quantity >= 0)) ------------------------------------PhysicalOlapScan[store_sales] -------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------PhysicalLimit[LOCAL] -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------filter(((((store_sales.ss_list_price >= 91.00) AND (store_sales.ss_list_price <= 101.00)) OR ((store_sales.ss_coupon_amt >= 13493.00) AND (store_sales.ss_coupon_amt <= 14493.00))) OR ((store_sales.ss_wholesale_cost >= 36.00) AND (store_sales.ss_wholesale_cost <= 56.00))) and (store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 16)) ---------------------------------PhysicalOlapScan[store_sales] ---------------PhysicalDistribute[DistributionSpecReplicated] -----------------PhysicalLimit[LOCAL] -------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute[DistributionSpecGather] -----------------------hashAgg[LOCAL] -------------------------PhysicalProject ---------------------------filter(((((store_sales.ss_list_price >= 0.00) AND (store_sales.ss_list_price <= 10.00)) OR ((store_sales.ss_coupon_amt >= 7629.00) AND (store_sales.ss_coupon_amt <= 8629.00))) OR ((store_sales.ss_wholesale_cost >= 6.00) AND (store_sales.ss_wholesale_cost <= 26.00))) and (store_sales.ss_quantity <= 25) and (store_sales.ss_quantity >= 21)) -----------------------------PhysicalOlapScan[store_sales] -----------PhysicalDistribute[DistributionSpecReplicated] -------------PhysicalLimit[LOCAL] ---------------hashAgg[GLOBAL] -----------------PhysicalDistribute[DistributionSpecGather] -------------------hashAgg[LOCAL] ---------------------PhysicalProject -----------------------filter(((((store_sales.ss_list_price >= 89.00) AND (store_sales.ss_list_price <= 99.00)) OR ((store_sales.ss_coupon_amt >= 15257.00) AND (store_sales.ss_coupon_amt <= 16257.00))) OR ((store_sales.ss_wholesale_cost >= 31.00) AND (store_sales.ss_wholesale_cost <= 51.00))) and (store_sales.ss_quantity <= 30) and (store_sales.ss_quantity >= 26)) -------------------------PhysicalOlapScan[store_sales] +------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------PhysicalLimit[LOCAL] +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalDistribute[DistributionSpecGather] +--------------------------------hashAgg[LOCAL] +----------------------------------PhysicalProject +------------------------------------filter(((((store_sales.ss_list_price >= 145.00) AND (store_sales.ss_list_price <= 155.00)) OR ((store_sales.ss_coupon_amt >= 14792.00) AND (store_sales.ss_coupon_amt <= 15792.00))) OR ((store_sales.ss_wholesale_cost >= 46.00) AND (store_sales.ss_wholesale_cost <= 66.00))) and (store_sales.ss_quantity <= 10) and (store_sales.ss_quantity >= 6)) +--------------------------------------PhysicalOlapScan[store_sales] +--------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------PhysicalLimit[LOCAL] +------------------------hashAgg[GLOBAL] +--------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------hashAgg[LOCAL] +------------------------------PhysicalProject +--------------------------------filter(((((store_sales.ss_list_price >= 150.00) AND (store_sales.ss_list_price <= 1.6E+2)) OR ((store_sales.ss_coupon_amt >= 6600.00) AND (store_sales.ss_coupon_amt <= 7.6E+3))) OR ((store_sales.ss_wholesale_cost >= 9.00) AND (store_sales.ss_wholesale_cost <= 29.00))) and (store_sales.ss_quantity <= 15) and (store_sales.ss_quantity >= 11)) +----------------------------------PhysicalOlapScan[store_sales] +----------------PhysicalDistribute[DistributionSpecReplicated] +------------------PhysicalLimit[LOCAL] +--------------------hashAgg[GLOBAL] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------hashAgg[LOCAL] +--------------------------PhysicalProject +----------------------------filter(((((store_sales.ss_list_price >= 91.00) AND (store_sales.ss_list_price <= 101.00)) OR ((store_sales.ss_coupon_amt >= 13493.00) AND (store_sales.ss_coupon_amt <= 14493.00))) OR ((store_sales.ss_wholesale_cost >= 36.00) AND (store_sales.ss_wholesale_cost <= 56.00))) and (store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 16)) +------------------------------PhysicalOlapScan[store_sales] +------------PhysicalDistribute[DistributionSpecReplicated] +--------------PhysicalLimit[LOCAL] +----------------hashAgg[GLOBAL] +------------------PhysicalDistribute[DistributionSpecGather] +--------------------hashAgg[LOCAL] +----------------------PhysicalProject +------------------------filter(((((store_sales.ss_list_price >= 0.00) AND (store_sales.ss_list_price <= 10.00)) OR ((store_sales.ss_coupon_amt >= 7629.00) AND (store_sales.ss_coupon_amt <= 8629.00))) OR ((store_sales.ss_wholesale_cost >= 6.00) AND (store_sales.ss_wholesale_cost <= 26.00))) and (store_sales.ss_quantity <= 25) and (store_sales.ss_quantity >= 21)) +--------------------------PhysicalOlapScan[store_sales] +--------PhysicalDistribute[DistributionSpecReplicated] +----------PhysicalLimit[LOCAL] +------------hashAgg[GLOBAL] +--------------PhysicalDistribute[DistributionSpecGather] +----------------hashAgg[LOCAL] +------------------PhysicalProject +--------------------filter(((((store_sales.ss_list_price >= 89.00) AND (store_sales.ss_list_price <= 99.00)) OR ((store_sales.ss_coupon_amt >= 15257.00) AND (store_sales.ss_coupon_amt <= 16257.00))) OR ((store_sales.ss_wholesale_cost >= 31.00) AND (store_sales.ss_wholesale_cost <= 51.00))) and (store_sales.ss_quantity <= 30) and (store_sales.ss_quantity >= 26)) +----------------------PhysicalOlapScan[store_sales] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query39.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query39.out index de3225eeb0..7a0a69965b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query39.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query39.out @@ -26,14 +26,13 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalQuickSort[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] --------PhysicalQuickSort[LOCAL_SORT] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((inv1.i_item_sk = inv2.i_item_sk) and (inv1.w_warehouse_sk = inv2.w_warehouse_sk)) otherCondition=() ---------------PhysicalDistribute[DistributionSpecHash] -----------------PhysicalProject -------------------filter((inv1.d_moy = 1)) ---------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalDistribute[DistributionSpecHash] -----------------PhysicalProject -------------------filter((inv2.d_moy = 2)) ---------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------hashJoin[INNER_JOIN] hashCondition=((inv1.i_item_sk = inv2.i_item_sk) and (inv1.w_warehouse_sk = inv2.w_warehouse_sk)) otherCondition=() +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------filter((inv1.d_moy = 1)) +------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------filter((inv2.d_moy = 2)) +------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query88.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query88.out index 9225360005..fe1b8c4090 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query88.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query88.out @@ -1,73 +1,49 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_88 -- PhysicalResultSink ---PhysicalProject +--NestedLoopJoin[CROSS_JOIN] ----NestedLoopJoin[CROSS_JOIN] ------NestedLoopJoin[CROSS_JOIN] --------NestedLoopJoin[CROSS_JOIN] ----------NestedLoopJoin[CROSS_JOIN] ------------NestedLoopJoin[CROSS_JOIN] --------------NestedLoopJoin[CROSS_JOIN] -----------------NestedLoopJoin[CROSS_JOIN] -------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute[DistributionSpecGather] -----------------------hashAgg[LOCAL] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF23 s_store_sk->[ss_store_sk] -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF22 hd_demo_sk->[ss_hdemo_sk] ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF21 t_time_sk->[ss_sold_time_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF21 RF22 RF23 -----------------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------------PhysicalProject ---------------------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) -----------------------------------------PhysicalOlapScan[time_dim] +----------------hashAgg[GLOBAL] +------------------PhysicalDistribute[DistributionSpecGather] +--------------------hashAgg[LOCAL] +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF23 s_store_sk->[ss_store_sk] +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF22 hd_demo_sk->[ss_hdemo_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF21 t_time_sk->[ss_sold_time_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF21 RF22 RF23 --------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject -------------------------------------filter(((((household_demographics.hd_dep_count = -1) AND (household_demographics.hd_vehicle_count <= 1)) OR ((household_demographics.hd_dep_count = 4) AND (household_demographics.hd_vehicle_count <= 6))) OR ((household_demographics.hd_dep_count = 3) AND (household_demographics.hd_vehicle_count <= 5)))) ---------------------------------------PhysicalOlapScan[household_demographics] -----------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------PhysicalProject ---------------------------------filter((store.s_store_name = 'ese')) -----------------------------------PhysicalOlapScan[store] -------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute[DistributionSpecGather] -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF20 s_store_sk->[ss_store_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF19 hd_demo_sk->[ss_hdemo_sk] -----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF18 t_time_sk->[ss_sold_time_sk] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF18 RF19 RF20 -------------------------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------------------------PhysicalProject -----------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute < 30)) -------------------------------------------PhysicalOlapScan[time_dim] -----------------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------------PhysicalProject ---------------------------------------filter(((((household_demographics.hd_dep_count = -1) AND (household_demographics.hd_vehicle_count <= 1)) OR ((household_demographics.hd_dep_count = 4) AND (household_demographics.hd_vehicle_count <= 6))) OR ((household_demographics.hd_dep_count = 3) AND (household_demographics.hd_vehicle_count <= 5)))) -----------------------------------------PhysicalOlapScan[household_demographics] +------------------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) +--------------------------------------PhysicalOlapScan[time_dim] ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject -----------------------------------filter((store.s_store_name = 'ese')) -------------------------------------PhysicalOlapScan[store] +----------------------------------filter(((((household_demographics.hd_dep_count = -1) AND (household_demographics.hd_vehicle_count <= 1)) OR ((household_demographics.hd_dep_count = 4) AND (household_demographics.hd_vehicle_count <= 6))) OR ((household_demographics.hd_dep_count = 3) AND (household_demographics.hd_vehicle_count <= 5)))) +------------------------------------PhysicalOlapScan[household_demographics] +--------------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------------PhysicalProject +------------------------------filter((store.s_store_name = 'ese')) +--------------------------------PhysicalOlapScan[store] ----------------PhysicalDistribute[DistributionSpecReplicated] ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecGather] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF17 s_store_sk->[ss_store_sk] +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF20 s_store_sk->[ss_store_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF16 hd_demo_sk->[ss_hdemo_sk] ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF15 t_time_sk->[ss_sold_time_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF19 hd_demo_sk->[ss_hdemo_sk] +--------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF18 t_time_sk->[ss_sold_time_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF15 RF16 RF17 +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF18 RF19 RF20 ----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject ---------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute >= 30)) +--------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute < 30)) ----------------------------------------PhysicalOlapScan[time_dim] --------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject @@ -82,15 +58,15 @@ PhysicalResultSink ------------------PhysicalDistribute[DistributionSpecGather] --------------------hashAgg[LOCAL] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF14 s_store_sk->[ss_store_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF17 s_store_sk->[ss_store_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF13 hd_demo_sk->[ss_hdemo_sk] -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF12 t_time_sk->[ss_sold_time_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF16 hd_demo_sk->[ss_hdemo_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF15 t_time_sk->[ss_sold_time_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF12 RF13 RF14 +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF15 RF16 RF17 --------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject -------------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute < 30)) +------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute >= 30)) --------------------------------------PhysicalOlapScan[time_dim] ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject @@ -105,15 +81,15 @@ PhysicalResultSink ----------------PhysicalDistribute[DistributionSpecGather] ------------------hashAgg[LOCAL] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF11 s_store_sk->[ss_store_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF14 s_store_sk->[ss_store_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF10 hd_demo_sk->[ss_hdemo_sk] -----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF9 t_time_sk->[ss_sold_time_sk] +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF13 hd_demo_sk->[ss_hdemo_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF12 t_time_sk->[ss_sold_time_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF9 RF10 RF11 +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF12 RF13 RF14 ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject -----------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute >= 30)) +----------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute < 30)) ------------------------------------PhysicalOlapScan[time_dim] ----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject @@ -128,15 +104,15 @@ PhysicalResultSink --------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF8 s_store_sk->[ss_store_sk] +--------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF11 s_store_sk->[ss_store_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF7 hd_demo_sk->[ss_hdemo_sk] ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF6 t_time_sk->[ss_sold_time_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF10 hd_demo_sk->[ss_hdemo_sk] +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF9 t_time_sk->[ss_sold_time_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8 +------------------------------PhysicalOlapScan[store_sales] apply RFs: RF9 RF10 RF11 ----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject ---------------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute < 30)) +--------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute >= 30)) ----------------------------------PhysicalOlapScan[time_dim] --------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject @@ -151,15 +127,15 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] +------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF8 s_store_sk->[ss_store_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ss_hdemo_sk] -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ss_sold_time_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF7 hd_demo_sk->[ss_hdemo_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF6 t_time_sk->[ss_sold_time_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 RF5 +----------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8 --------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject -------------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute >= 30)) +------------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute < 30)) --------------------------------PhysicalOlapScan[time_dim] ------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject @@ -174,15 +150,15 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecGather] ------------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] +----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] -----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ss_sold_time_sk] +--------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ss_hdemo_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ss_sold_time_sk] ------------------------PhysicalProject ---------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +--------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 RF5 ------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject -----------------------------filter((time_dim.t_hour = 12) and (time_dim.t_minute < 30)) +----------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute >= 30)) ------------------------------PhysicalOlapScan[time_dim] ----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject @@ -192,4 +168,27 @@ PhysicalResultSink --------------------PhysicalProject ----------------------filter((store.s_store_name = 'ese')) ------------------------PhysicalOlapScan[store] +----PhysicalDistribute[DistributionSpecReplicated] +------hashAgg[GLOBAL] +--------PhysicalDistribute[DistributionSpecGather] +----------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_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +--------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ss_sold_time_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +----------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------PhysicalProject +--------------------------filter((time_dim.t_hour = 12) and (time_dim.t_minute < 30)) +----------------------------PhysicalOlapScan[time_dim] +--------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------PhysicalProject +------------------------filter(((((household_demographics.hd_dep_count = -1) AND (household_demographics.hd_vehicle_count <= 1)) OR ((household_demographics.hd_dep_count = 4) AND (household_demographics.hd_vehicle_count <= 6))) OR ((household_demographics.hd_dep_count = 3) AND (household_demographics.hd_vehicle_count <= 5)))) +--------------------------PhysicalOlapScan[household_demographics] +----------------PhysicalDistribute[DistributionSpecReplicated] +------------------PhysicalProject +--------------------filter((store.s_store_name = 'ese')) +----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query28.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query28.out index 08f72b84ba..72124f34ee 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query28.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query28.out @@ -3,61 +3,60 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] -------PhysicalProject ---------NestedLoopJoin[CROSS_JOIN] -----------PhysicalLimit[LOCAL] -------------NestedLoopJoin[CROSS_JOIN] ---------------PhysicalLimit[LOCAL] -----------------NestedLoopJoin[CROSS_JOIN] -------------------PhysicalLimit[LOCAL] ---------------------NestedLoopJoin[CROSS_JOIN] -----------------------PhysicalLimit[LOCAL] -------------------------NestedLoopJoin[CROSS_JOIN] ---------------------------PhysicalLimit[LOCAL] -----------------------------hashAgg[GLOBAL] -------------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------------hashAgg[LOCAL] -----------------------------------PhysicalProject -------------------------------------filter(((((store_sales.ss_list_price >= 131.00) AND (store_sales.ss_list_price <= 141.00)) OR ((store_sales.ss_coupon_amt >= 16798.00) AND (store_sales.ss_coupon_amt <= 17798.00))) OR ((store_sales.ss_wholesale_cost >= 25.00) AND (store_sales.ss_wholesale_cost <= 45.00))) and (store_sales.ss_quantity <= 5) and (store_sales.ss_quantity >= 0)) ---------------------------------------PhysicalOlapScan[store_sales] ---------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------PhysicalLimit[LOCAL] -------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute[DistributionSpecGather] -----------------------------------hashAgg[LOCAL] -------------------------------------PhysicalProject ---------------------------------------filter(((((store_sales.ss_list_price >= 145.00) AND (store_sales.ss_list_price <= 155.00)) OR ((store_sales.ss_coupon_amt >= 14792.00) AND (store_sales.ss_coupon_amt <= 15792.00))) OR ((store_sales.ss_wholesale_cost >= 46.00) AND (store_sales.ss_wholesale_cost <= 66.00))) and (store_sales.ss_quantity <= 10) and (store_sales.ss_quantity >= 6)) -----------------------------------------PhysicalOlapScan[store_sales] -----------------------PhysicalDistribute[DistributionSpecReplicated] +------NestedLoopJoin[CROSS_JOIN] +--------PhysicalLimit[LOCAL] +----------NestedLoopJoin[CROSS_JOIN] +------------PhysicalLimit[LOCAL] +--------------NestedLoopJoin[CROSS_JOIN] +----------------PhysicalLimit[LOCAL] +------------------NestedLoopJoin[CROSS_JOIN] +--------------------PhysicalLimit[LOCAL] +----------------------NestedLoopJoin[CROSS_JOIN] ------------------------PhysicalLimit[LOCAL] --------------------------hashAgg[GLOBAL] ----------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject -----------------------------------filter(((((store_sales.ss_list_price >= 150.00) AND (store_sales.ss_list_price <= 1.6E+2)) OR ((store_sales.ss_coupon_amt >= 6600.00) AND (store_sales.ss_coupon_amt <= 7.6E+3))) OR ((store_sales.ss_wholesale_cost >= 9.00) AND (store_sales.ss_wholesale_cost <= 29.00))) and (store_sales.ss_quantity <= 15) and (store_sales.ss_quantity >= 11)) +----------------------------------filter(((((store_sales.ss_list_price >= 131.00) AND (store_sales.ss_list_price <= 141.00)) OR ((store_sales.ss_coupon_amt >= 16798.00) AND (store_sales.ss_coupon_amt <= 17798.00))) OR ((store_sales.ss_wholesale_cost >= 25.00) AND (store_sales.ss_wholesale_cost <= 45.00))) and (store_sales.ss_quantity <= 5) and (store_sales.ss_quantity >= 0)) ------------------------------------PhysicalOlapScan[store_sales] -------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------PhysicalLimit[LOCAL] -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------filter(((((store_sales.ss_list_price >= 91.00) AND (store_sales.ss_list_price <= 101.00)) OR ((store_sales.ss_coupon_amt >= 13493.00) AND (store_sales.ss_coupon_amt <= 14493.00))) OR ((store_sales.ss_wholesale_cost >= 36.00) AND (store_sales.ss_wholesale_cost <= 56.00))) and (store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 16)) ---------------------------------PhysicalOlapScan[store_sales] ---------------PhysicalDistribute[DistributionSpecReplicated] -----------------PhysicalLimit[LOCAL] -------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute[DistributionSpecGather] -----------------------hashAgg[LOCAL] -------------------------PhysicalProject ---------------------------filter(((((store_sales.ss_list_price >= 0.00) AND (store_sales.ss_list_price <= 10.00)) OR ((store_sales.ss_coupon_amt >= 7629.00) AND (store_sales.ss_coupon_amt <= 8629.00))) OR ((store_sales.ss_wholesale_cost >= 6.00) AND (store_sales.ss_wholesale_cost <= 26.00))) and (store_sales.ss_quantity <= 25) and (store_sales.ss_quantity >= 21)) -----------------------------PhysicalOlapScan[store_sales] -----------PhysicalDistribute[DistributionSpecReplicated] -------------PhysicalLimit[LOCAL] ---------------hashAgg[GLOBAL] -----------------PhysicalDistribute[DistributionSpecGather] -------------------hashAgg[LOCAL] ---------------------PhysicalProject -----------------------filter(((((store_sales.ss_list_price >= 89.00) AND (store_sales.ss_list_price <= 99.00)) OR ((store_sales.ss_coupon_amt >= 15257.00) AND (store_sales.ss_coupon_amt <= 16257.00))) OR ((store_sales.ss_wholesale_cost >= 31.00) AND (store_sales.ss_wholesale_cost <= 51.00))) and (store_sales.ss_quantity <= 30) and (store_sales.ss_quantity >= 26)) -------------------------PhysicalOlapScan[store_sales] +------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------PhysicalLimit[LOCAL] +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalDistribute[DistributionSpecGather] +--------------------------------hashAgg[LOCAL] +----------------------------------PhysicalProject +------------------------------------filter(((((store_sales.ss_list_price >= 145.00) AND (store_sales.ss_list_price <= 155.00)) OR ((store_sales.ss_coupon_amt >= 14792.00) AND (store_sales.ss_coupon_amt <= 15792.00))) OR ((store_sales.ss_wholesale_cost >= 46.00) AND (store_sales.ss_wholesale_cost <= 66.00))) and (store_sales.ss_quantity <= 10) and (store_sales.ss_quantity >= 6)) +--------------------------------------PhysicalOlapScan[store_sales] +--------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------PhysicalLimit[LOCAL] +------------------------hashAgg[GLOBAL] +--------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------hashAgg[LOCAL] +------------------------------PhysicalProject +--------------------------------filter(((((store_sales.ss_list_price >= 150.00) AND (store_sales.ss_list_price <= 1.6E+2)) OR ((store_sales.ss_coupon_amt >= 6600.00) AND (store_sales.ss_coupon_amt <= 7.6E+3))) OR ((store_sales.ss_wholesale_cost >= 9.00) AND (store_sales.ss_wholesale_cost <= 29.00))) and (store_sales.ss_quantity <= 15) and (store_sales.ss_quantity >= 11)) +----------------------------------PhysicalOlapScan[store_sales] +----------------PhysicalDistribute[DistributionSpecReplicated] +------------------PhysicalLimit[LOCAL] +--------------------hashAgg[GLOBAL] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------hashAgg[LOCAL] +--------------------------PhysicalProject +----------------------------filter(((((store_sales.ss_list_price >= 91.00) AND (store_sales.ss_list_price <= 101.00)) OR ((store_sales.ss_coupon_amt >= 13493.00) AND (store_sales.ss_coupon_amt <= 14493.00))) OR ((store_sales.ss_wholesale_cost >= 36.00) AND (store_sales.ss_wholesale_cost <= 56.00))) and (store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 16)) +------------------------------PhysicalOlapScan[store_sales] +------------PhysicalDistribute[DistributionSpecReplicated] +--------------PhysicalLimit[LOCAL] +----------------hashAgg[GLOBAL] +------------------PhysicalDistribute[DistributionSpecGather] +--------------------hashAgg[LOCAL] +----------------------PhysicalProject +------------------------filter(((((store_sales.ss_list_price >= 0.00) AND (store_sales.ss_list_price <= 10.00)) OR ((store_sales.ss_coupon_amt >= 7629.00) AND (store_sales.ss_coupon_amt <= 8629.00))) OR ((store_sales.ss_wholesale_cost >= 6.00) AND (store_sales.ss_wholesale_cost <= 26.00))) and (store_sales.ss_quantity <= 25) and (store_sales.ss_quantity >= 21)) +--------------------------PhysicalOlapScan[store_sales] +--------PhysicalDistribute[DistributionSpecReplicated] +----------PhysicalLimit[LOCAL] +------------hashAgg[GLOBAL] +--------------PhysicalDistribute[DistributionSpecGather] +----------------hashAgg[LOCAL] +------------------PhysicalProject +--------------------filter(((((store_sales.ss_list_price >= 89.00) AND (store_sales.ss_list_price <= 99.00)) OR ((store_sales.ss_coupon_amt >= 15257.00) AND (store_sales.ss_coupon_amt <= 16257.00))) OR ((store_sales.ss_wholesale_cost >= 31.00) AND (store_sales.ss_wholesale_cost <= 51.00))) and (store_sales.ss_quantity <= 30) and (store_sales.ss_quantity >= 26)) +----------------------PhysicalOlapScan[store_sales] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query39.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query39.out index 90ca5d5902..4ccedd3140 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query39.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query39.out @@ -26,14 +26,13 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalQuickSort[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] --------PhysicalQuickSort[LOCAL_SORT] -----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((inv1.i_item_sk = inv2.i_item_sk) and (inv1.w_warehouse_sk = inv2.w_warehouse_sk)) otherCondition=() ---------------PhysicalDistribute[DistributionSpecHash] -----------------PhysicalProject -------------------filter((inv1.d_moy = 1)) ---------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalDistribute[DistributionSpecHash] -----------------PhysicalProject -------------------filter((inv2.d_moy = 2)) ---------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------hashJoin[INNER_JOIN] hashCondition=((inv1.i_item_sk = inv2.i_item_sk) and (inv1.w_warehouse_sk = inv2.w_warehouse_sk)) otherCondition=() +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------filter((inv1.d_moy = 1)) +------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------filter((inv2.d_moy = 2)) +------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query88.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query88.out index 9225360005..fe1b8c4090 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query88.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query88.out @@ -1,73 +1,49 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_88 -- PhysicalResultSink ---PhysicalProject +--NestedLoopJoin[CROSS_JOIN] ----NestedLoopJoin[CROSS_JOIN] ------NestedLoopJoin[CROSS_JOIN] --------NestedLoopJoin[CROSS_JOIN] ----------NestedLoopJoin[CROSS_JOIN] ------------NestedLoopJoin[CROSS_JOIN] --------------NestedLoopJoin[CROSS_JOIN] -----------------NestedLoopJoin[CROSS_JOIN] -------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute[DistributionSpecGather] -----------------------hashAgg[LOCAL] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF23 s_store_sk->[ss_store_sk] -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF22 hd_demo_sk->[ss_hdemo_sk] ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF21 t_time_sk->[ss_sold_time_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF21 RF22 RF23 -----------------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------------PhysicalProject ---------------------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) -----------------------------------------PhysicalOlapScan[time_dim] +----------------hashAgg[GLOBAL] +------------------PhysicalDistribute[DistributionSpecGather] +--------------------hashAgg[LOCAL] +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF23 s_store_sk->[ss_store_sk] +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF22 hd_demo_sk->[ss_hdemo_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF21 t_time_sk->[ss_sold_time_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF21 RF22 RF23 --------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject -------------------------------------filter(((((household_demographics.hd_dep_count = -1) AND (household_demographics.hd_vehicle_count <= 1)) OR ((household_demographics.hd_dep_count = 4) AND (household_demographics.hd_vehicle_count <= 6))) OR ((household_demographics.hd_dep_count = 3) AND (household_demographics.hd_vehicle_count <= 5)))) ---------------------------------------PhysicalOlapScan[household_demographics] -----------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------PhysicalProject ---------------------------------filter((store.s_store_name = 'ese')) -----------------------------------PhysicalOlapScan[store] -------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute[DistributionSpecGather] -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF20 s_store_sk->[ss_store_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF19 hd_demo_sk->[ss_hdemo_sk] -----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF18 t_time_sk->[ss_sold_time_sk] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF18 RF19 RF20 -------------------------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------------------------PhysicalProject -----------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute < 30)) -------------------------------------------PhysicalOlapScan[time_dim] -----------------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------------PhysicalProject ---------------------------------------filter(((((household_demographics.hd_dep_count = -1) AND (household_demographics.hd_vehicle_count <= 1)) OR ((household_demographics.hd_dep_count = 4) AND (household_demographics.hd_vehicle_count <= 6))) OR ((household_demographics.hd_dep_count = 3) AND (household_demographics.hd_vehicle_count <= 5)))) -----------------------------------------PhysicalOlapScan[household_demographics] +------------------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) +--------------------------------------PhysicalOlapScan[time_dim] ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject -----------------------------------filter((store.s_store_name = 'ese')) -------------------------------------PhysicalOlapScan[store] +----------------------------------filter(((((household_demographics.hd_dep_count = -1) AND (household_demographics.hd_vehicle_count <= 1)) OR ((household_demographics.hd_dep_count = 4) AND (household_demographics.hd_vehicle_count <= 6))) OR ((household_demographics.hd_dep_count = 3) AND (household_demographics.hd_vehicle_count <= 5)))) +------------------------------------PhysicalOlapScan[household_demographics] +--------------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------------PhysicalProject +------------------------------filter((store.s_store_name = 'ese')) +--------------------------------PhysicalOlapScan[store] ----------------PhysicalDistribute[DistributionSpecReplicated] ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecGather] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF17 s_store_sk->[ss_store_sk] +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF20 s_store_sk->[ss_store_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF16 hd_demo_sk->[ss_hdemo_sk] ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF15 t_time_sk->[ss_sold_time_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF19 hd_demo_sk->[ss_hdemo_sk] +--------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF18 t_time_sk->[ss_sold_time_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF15 RF16 RF17 +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF18 RF19 RF20 ----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject ---------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute >= 30)) +--------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute < 30)) ----------------------------------------PhysicalOlapScan[time_dim] --------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject @@ -82,15 +58,15 @@ PhysicalResultSink ------------------PhysicalDistribute[DistributionSpecGather] --------------------hashAgg[LOCAL] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF14 s_store_sk->[ss_store_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF17 s_store_sk->[ss_store_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF13 hd_demo_sk->[ss_hdemo_sk] -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF12 t_time_sk->[ss_sold_time_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF16 hd_demo_sk->[ss_hdemo_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF15 t_time_sk->[ss_sold_time_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF12 RF13 RF14 +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF15 RF16 RF17 --------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject -------------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute < 30)) +------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute >= 30)) --------------------------------------PhysicalOlapScan[time_dim] ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject @@ -105,15 +81,15 @@ PhysicalResultSink ----------------PhysicalDistribute[DistributionSpecGather] ------------------hashAgg[LOCAL] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF11 s_store_sk->[ss_store_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF14 s_store_sk->[ss_store_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF10 hd_demo_sk->[ss_hdemo_sk] -----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF9 t_time_sk->[ss_sold_time_sk] +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF13 hd_demo_sk->[ss_hdemo_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF12 t_time_sk->[ss_sold_time_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF9 RF10 RF11 +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF12 RF13 RF14 ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject -----------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute >= 30)) +----------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute < 30)) ------------------------------------PhysicalOlapScan[time_dim] ----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject @@ -128,15 +104,15 @@ PhysicalResultSink --------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF8 s_store_sk->[ss_store_sk] +--------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF11 s_store_sk->[ss_store_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF7 hd_demo_sk->[ss_hdemo_sk] ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF6 t_time_sk->[ss_sold_time_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF10 hd_demo_sk->[ss_hdemo_sk] +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF9 t_time_sk->[ss_sold_time_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8 +------------------------------PhysicalOlapScan[store_sales] apply RFs: RF9 RF10 RF11 ----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject ---------------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute < 30)) +--------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute >= 30)) ----------------------------------PhysicalOlapScan[time_dim] --------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject @@ -151,15 +127,15 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] +------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF8 s_store_sk->[ss_store_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ss_hdemo_sk] -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ss_sold_time_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF7 hd_demo_sk->[ss_hdemo_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF6 t_time_sk->[ss_sold_time_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 RF5 +----------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8 --------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject -------------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute >= 30)) +------------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute < 30)) --------------------------------PhysicalOlapScan[time_dim] ------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject @@ -174,15 +150,15 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecGather] ------------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] +----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] -----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ss_sold_time_sk] +--------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ss_hdemo_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ss_sold_time_sk] ------------------------PhysicalProject ---------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +--------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 RF5 ------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject -----------------------------filter((time_dim.t_hour = 12) and (time_dim.t_minute < 30)) +----------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute >= 30)) ------------------------------PhysicalOlapScan[time_dim] ----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject @@ -192,4 +168,27 @@ PhysicalResultSink --------------------PhysicalProject ----------------------filter((store.s_store_name = 'ese')) ------------------------PhysicalOlapScan[store] +----PhysicalDistribute[DistributionSpecReplicated] +------hashAgg[GLOBAL] +--------PhysicalDistribute[DistributionSpecGather] +----------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_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +--------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ss_sold_time_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +----------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------PhysicalProject +--------------------------filter((time_dim.t_hour = 12) and (time_dim.t_minute < 30)) +----------------------------PhysicalOlapScan[time_dim] +--------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------PhysicalProject +------------------------filter(((((household_demographics.hd_dep_count = -1) AND (household_demographics.hd_vehicle_count <= 1)) OR ((household_demographics.hd_dep_count = 4) AND (household_demographics.hd_vehicle_count <= 6))) OR ((household_demographics.hd_dep_count = 3) AND (household_demographics.hd_vehicle_count <= 5)))) +--------------------------PhysicalOlapScan[household_demographics] +----------------PhysicalDistribute[DistributionSpecReplicated] +------------------PhysicalProject +--------------------filter((store.s_store_name = 'ese')) +----------------------PhysicalOlapScan[store]