diff --git a/be/src/pipeline/exec/table_function_operator.cpp b/be/src/pipeline/exec/table_function_operator.cpp index ff9dfe632faec6..38e69f7cb0e897 100644 --- a/be/src/pipeline/exec/table_function_operator.cpp +++ b/be/src/pipeline/exec/table_function_operator.cpp @@ -232,9 +232,6 @@ TableFunctionOperatorX::TableFunctionOperatorX(ObjectPool* pool, const TPlanNode Status TableFunctionOperatorX::_prepare_output_slot_ids(const TPlanNode& tnode) { // Prepare output slot ids - if (tnode.table_function_node.outputSlotIds.empty()) { - return Status::InternalError("Output slots of table function node is empty"); - } SlotId max_id = -1; for (auto slot_id : tnode.table_function_node.outputSlotIds) { if (slot_id > max_id) { diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalProject.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalProject.java index 9174e4a40fb2bf..171a355d8452d8 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalProject.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalProject.java @@ -29,6 +29,7 @@ import org.apache.doris.nereids.trees.expressions.Slot; import org.apache.doris.nereids.trees.expressions.functions.NoneMovableFunction; import org.apache.doris.nereids.trees.expressions.functions.scalar.Uuid; +import org.apache.doris.nereids.trees.expressions.literal.TinyIntLiteral; import org.apache.doris.nereids.trees.plans.Plan; import org.apache.doris.nereids.trees.plans.PlanType; import org.apache.doris.nereids.trees.plans.algebra.Project; @@ -85,7 +86,7 @@ private LogicalProject(List projects, boolean isDistinct, Preconditions.checkArgument(!projects.isEmpty() || !(child instanceof Unbound), "projects can not be empty when child plan is unbound"); this.projects = projects.isEmpty() - ? ImmutableList.of(ExpressionUtils.selectMinimumColumn(child.get(0).getOutput())) + ? ImmutableList.of(new Alias(new TinyIntLiteral((byte) 1))) : projects; this.projectsSet = Suppliers.memoize(() -> ImmutableSet.copyOf(this.projects)); this.isDistinct = isDistinct; diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/jobs/joinorder/TPCHTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/jobs/joinorder/TPCHTest.java index 9eefe62ea82815..12f16058bea793 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/jobs/joinorder/TPCHTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/jobs/joinorder/TPCHTest.java @@ -68,8 +68,8 @@ void testCountStarProject() { logicalAggregate( logicalProject().when( project -> project.getProjects().size() == 1 - && project.getProjects().get(0) instanceof SlotReference - && "o_orderdate".equals(project.getProjects().get(0).toSql())))) + && !(project.getProjects().get(0) instanceof SlotReference) + ))) ); } } diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/ColumnPruningTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/ColumnPruningTest.java index e6f2bb6838d9b4..9f18eeb851fee6 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/ColumnPruningTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/ColumnPruningTest.java @@ -18,10 +18,11 @@ package org.apache.doris.nereids.rules.rewrite; import org.apache.doris.nereids.trees.expressions.NamedExpression; +import org.apache.doris.nereids.trees.expressions.SlotReference; import org.apache.doris.nereids.trees.plans.Plan; import org.apache.doris.nereids.trees.plans.logical.LogicalProject; import org.apache.doris.nereids.types.DoubleType; -import org.apache.doris.nereids.types.IntegerType; +import org.apache.doris.nereids.types.TinyIntType; import org.apache.doris.nereids.util.MemoPatternMatchSupported; import org.apache.doris.nereids.util.PlanChecker; import org.apache.doris.utframe.TestWithFeService; @@ -188,7 +189,7 @@ public void pruneCountStarStmt() { logicalAggregate( logicalProject( logicalOlapScan() - ).when(p -> p.getProjects().get(0).getDataType().equals(IntegerType.INSTANCE) + ).when(p -> p.getProjects().get(0).getDataType().equals(TinyIntType.INSTANCE) && p.getProjects().size() == 1) ) ); @@ -203,7 +204,7 @@ public void pruneCountConstantStmt() { logicalAggregate( logicalProject( logicalOlapScan() - ).when(p -> p.getProjects().get(0).getDataType().equals(IntegerType.INSTANCE) + ).when(p -> p.getProjects().get(0).getDataType().equals(TinyIntType.INSTANCE) && p.getProjects().size() == 1) ) ); @@ -218,7 +219,7 @@ public void pruneCountConstantAndSumConstantStmt() { logicalAggregate( logicalProject( logicalOlapScan() - ).when(p -> p.getProjects().get(0).getDataType().equals(IntegerType.INSTANCE) + ).when(p -> p.getProjects().get(0).getDataType().equals(TinyIntType.INSTANCE) && p.getProjects().size() == 1) ) ); @@ -233,7 +234,7 @@ public void pruneCountStarAndSumConstantStmt() { logicalAggregate( logicalProject( logicalOlapScan() - ).when(p -> p.getProjects().get(0).getDataType().equals(IntegerType.INSTANCE) + ).when(p -> p.getProjects().get(0).getDataType().equals(TinyIntType.INSTANCE) && p.getProjects().size() == 1) ) ); @@ -283,9 +284,7 @@ public void pruneColumnForOneSideOnCrossJoin() { "internal.test.student.id", "internal.test.student.name"))), logicalProject(logicalRelation()) - .when(p -> getOutputQualifiedNames(p) - .containsAll(ImmutableList.of( - "internal.test.score.sid"))) + .when(p -> p.getProjects().stream().noneMatch(SlotReference.class::isInstance)) ) ) ); diff --git a/regression-test/data/nereids_rules_p0/eliminate_aggregate_constant/eliminate_aggregate_constant.out b/regression-test/data/nereids_rules_p0/eliminate_aggregate_constant/eliminate_aggregate_constant.out index c0d8526bc65466..3e1ee7196118a6 100644 --- a/regression-test/data/nereids_rules_p0/eliminate_aggregate_constant/eliminate_aggregate_constant.out +++ b/regression-test/data/nereids_rules_p0/eliminate_aggregate_constant/eliminate_aggregate_constant.out @@ -11,7 +11,7 @@ PhysicalResultSink --hashAgg[GLOBAL] ----hashAgg[LOCAL] ------PhysicalProject ---------PhysicalOlapScan[t1] +--------PhysicalStorageLayerAggregate[t1] -- !basic_3 -- PhysicalResultSink @@ -25,7 +25,7 @@ PhysicalResultSink --hashAgg[GLOBAL] ----hashAgg[LOCAL] ------PhysicalProject ---------PhysicalOlapScan[t1] +--------PhysicalStorageLayerAggregate[t1] -- !basic_5 -- PhysicalResultSink @@ -39,7 +39,7 @@ PhysicalResultSink --hashAgg[GLOBAL] ----hashAgg[LOCAL] ------PhysicalProject ---------PhysicalOlapScan[t1] +--------PhysicalStorageLayerAggregate[t1] -- !basic_7 -- PhysicalResultSink @@ -53,7 +53,7 @@ PhysicalResultSink --hashAgg[GLOBAL] ----hashAgg[LOCAL] ------PhysicalProject ---------PhysicalOlapScan[t1] +--------PhysicalStorageLayerAggregate[t1] -- !basic_2_1 -- PhysicalResultSink @@ -67,7 +67,7 @@ PhysicalResultSink --hashAgg[GLOBAL] ----hashAgg[LOCAL] ------PhysicalProject ---------PhysicalOlapScan[t2] +--------PhysicalStorageLayerAggregate[t2] -- !basic_2_3 -- PhysicalResultSink @@ -81,7 +81,7 @@ PhysicalResultSink --hashAgg[GLOBAL] ----hashAgg[LOCAL] ------PhysicalProject ---------PhysicalOlapScan[t2] +--------PhysicalStorageLayerAggregate[t2] -- !basic_2_5 -- PhysicalResultSink @@ -95,7 +95,7 @@ PhysicalResultSink --hashAgg[GLOBAL] ----hashAgg[LOCAL] ------PhysicalProject ---------PhysicalOlapScan[t2] +--------PhysicalStorageLayerAggregate[t2] -- !basic_2_7 -- PhysicalResultSink @@ -109,7 +109,7 @@ PhysicalResultSink --hashAgg[GLOBAL] ----hashAgg[LOCAL] ------PhysicalProject ---------PhysicalOlapScan[t2] +--------PhysicalStorageLayerAggregate[t2] -- !basic_3_1 -- PhysicalResultSink @@ -123,7 +123,7 @@ PhysicalResultSink --hashAgg[GLOBAL] ----hashAgg[LOCAL] ------PhysicalProject ---------PhysicalOlapScan[t3] +--------PhysicalStorageLayerAggregate[t3] -- !basic_3_3 -- PhysicalResultSink @@ -137,7 +137,7 @@ PhysicalResultSink --hashAgg[GLOBAL] ----hashAgg[LOCAL] ------PhysicalProject ---------PhysicalOlapScan[t3] +--------PhysicalStorageLayerAggregate[t3] -- !basic_3_5 -- PhysicalResultSink @@ -151,7 +151,7 @@ PhysicalResultSink --hashAgg[GLOBAL] ----hashAgg[LOCAL] ------PhysicalProject ---------PhysicalOlapScan[t3] +--------PhysicalStorageLayerAggregate[t3] -- !basic_3_7 -- PhysicalResultSink @@ -165,7 +165,7 @@ PhysicalResultSink --hashAgg[GLOBAL] ----hashAgg[LOCAL] ------PhysicalProject ---------PhysicalOlapScan[t3] +--------PhysicalStorageLayerAggregate[t3] -- !basic_4_1 -- PhysicalResultSink @@ -179,7 +179,7 @@ PhysicalResultSink --hashAgg[GLOBAL] ----hashAgg[LOCAL] ------PhysicalProject ---------PhysicalOlapScan[t4] +--------PhysicalStorageLayerAggregate[t4] -- !basic_4_3 -- PhysicalResultSink @@ -193,7 +193,7 @@ PhysicalResultSink --hashAgg[GLOBAL] ----hashAgg[LOCAL] ------PhysicalProject ---------PhysicalOlapScan[t4] +--------PhysicalStorageLayerAggregate[t4] -- !basic_4_5 -- PhysicalResultSink @@ -207,7 +207,7 @@ PhysicalResultSink --hashAgg[GLOBAL] ----hashAgg[LOCAL] ------PhysicalProject ---------PhysicalOlapScan[t4] +--------PhysicalStorageLayerAggregate[t4] -- !basic_4_7 -- PhysicalResultSink @@ -221,7 +221,7 @@ PhysicalResultSink --hashAgg[GLOBAL] ----hashAgg[LOCAL] ------PhysicalProject ---------PhysicalOlapScan[t4] +--------PhysicalStorageLayerAggregate[t4] -- !basic_add_1 -- PhysicalResultSink @@ -236,7 +236,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t1] +----------PhysicalStorageLayerAggregate[t1] -- !basic_add_3 -- PhysicalResultSink @@ -251,7 +251,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t1] +----------PhysicalStorageLayerAggregate[t1] -- !basic_add_5 -- PhysicalResultSink @@ -266,7 +266,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t1] +----------PhysicalStorageLayerAggregate[t1] -- !basic_add_7 -- PhysicalResultSink @@ -281,7 +281,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t1] +----------PhysicalStorageLayerAggregate[t1] -- !basic_add_2_1 -- PhysicalResultSink @@ -296,7 +296,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t2] +----------PhysicalStorageLayerAggregate[t2] -- !basic_add_2_3 -- PhysicalResultSink @@ -311,7 +311,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t2] +----------PhysicalStorageLayerAggregate[t2] -- !basic_add_2_5 -- PhysicalResultSink @@ -326,7 +326,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t2] +----------PhysicalStorageLayerAggregate[t2] -- !basic_add_2_7 -- PhysicalResultSink @@ -341,7 +341,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t2] +----------PhysicalStorageLayerAggregate[t2] -- !basic_add_3_1 -- PhysicalResultSink @@ -356,7 +356,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t3] +----------PhysicalStorageLayerAggregate[t3] -- !basic_add_3_3 -- PhysicalResultSink @@ -371,7 +371,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t3] +----------PhysicalStorageLayerAggregate[t3] -- !basic_add_3_5 -- PhysicalResultSink @@ -386,7 +386,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t3] +----------PhysicalStorageLayerAggregate[t3] -- !basic_add_3_7 -- PhysicalResultSink @@ -401,7 +401,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t3] +----------PhysicalStorageLayerAggregate[t3] -- !basic_add_4_1 -- PhysicalResultSink @@ -416,7 +416,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t4] +----------PhysicalStorageLayerAggregate[t4] -- !basic_add_4_3 -- PhysicalResultSink @@ -431,7 +431,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t4] +----------PhysicalStorageLayerAggregate[t4] -- !basic_add_4_5 -- PhysicalResultSink @@ -446,7 +446,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t4] +----------PhysicalStorageLayerAggregate[t4] -- !basic_add_4_7 -- PhysicalResultSink @@ -461,7 +461,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t4] +----------PhysicalStorageLayerAggregate[t4] -- !add_sum_1 -- PhysicalResultSink @@ -476,7 +476,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t1] +----------PhysicalStorageLayerAggregate[t1] -- !add_sum_3 -- PhysicalResultSink @@ -491,7 +491,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t1] +----------PhysicalStorageLayerAggregate[t1] -- !add_sum_5 -- PhysicalResultSink @@ -506,7 +506,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t1] +----------PhysicalStorageLayerAggregate[t1] -- !add_sum_7 -- PhysicalResultSink @@ -521,7 +521,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t1] +----------PhysicalStorageLayerAggregate[t1] -- !add_sum_2_1 -- PhysicalResultSink @@ -536,7 +536,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t2] +----------PhysicalStorageLayerAggregate[t2] -- !add_sum_2_3 -- PhysicalResultSink @@ -551,7 +551,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t2] +----------PhysicalStorageLayerAggregate[t2] -- !add_sum_2_5 -- PhysicalResultSink @@ -566,7 +566,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t2] +----------PhysicalStorageLayerAggregate[t2] -- !add_sum_2_7 -- PhysicalResultSink @@ -581,7 +581,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t2] +----------PhysicalStorageLayerAggregate[t2] -- !add_sum_3_1 -- PhysicalResultSink @@ -596,7 +596,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t3] +----------PhysicalStorageLayerAggregate[t3] -- !add_sum_3_3 -- PhysicalResultSink @@ -611,7 +611,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t3] +----------PhysicalStorageLayerAggregate[t3] -- !add_sum_3_5 -- PhysicalResultSink @@ -626,7 +626,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t3] +----------PhysicalStorageLayerAggregate[t3] -- !add_sum_3_7 -- PhysicalResultSink @@ -641,7 +641,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t3] +----------PhysicalStorageLayerAggregate[t3] -- !add_sum_4_1 -- PhysicalResultSink @@ -656,7 +656,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t4] +----------PhysicalStorageLayerAggregate[t4] -- !add_sum_4_3 -- PhysicalResultSink @@ -671,7 +671,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t4] +----------PhysicalStorageLayerAggregate[t4] -- !add_sum_4_5 -- PhysicalResultSink @@ -686,7 +686,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t4] +----------PhysicalStorageLayerAggregate[t4] -- !add_sum_4_7 -- PhysicalResultSink @@ -701,7 +701,7 @@ PhysicalResultSink ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalOlapScan[t4] +----------PhysicalStorageLayerAggregate[t4] -- !basic_1 -- 1 diff --git a/regression-test/data/nereids_rules_p0/eliminate_join_condition/eliminate_join_condition.out b/regression-test/data/nereids_rules_p0/eliminate_join_condition/eliminate_join_condition.out index 0b8b381e1f2d31..ba16949c0c2425 100644 --- a/regression-test/data/nereids_rules_p0/eliminate_join_condition/eliminate_join_condition.out +++ b/regression-test/data/nereids_rules_p0/eliminate_join_condition/eliminate_join_condition.out @@ -27,24 +27,24 @@ PhysicalResultSink PhysicalResultSink --NestedLoopJoin[LEFT_SEMI_JOIN] ----PhysicalOlapScan[t] -----PhysicalOlapScan[t] +----PhysicalStorageLayerAggregate[t] -- !left_anti_join -- PhysicalResultSink --NestedLoopJoin[LEFT_ANTI_JOIN] ----PhysicalOlapScan[t] -----PhysicalOlapScan[t] +----PhysicalStorageLayerAggregate[t] -- !right_semi_join -- PhysicalResultSink --NestedLoopJoin[RIGHT_SEMI_JOIN] -----PhysicalOlapScan[t] +----PhysicalStorageLayerAggregate[t] ----PhysicalOlapScan[t] -- !right_anti_join -- PhysicalResultSink --NestedLoopJoin[RIGHT_ANTI_JOIN] -----PhysicalOlapScan[t] +----PhysicalStorageLayerAggregate[t] ----PhysicalOlapScan[t] -- !inner_join -- diff --git a/regression-test/data/nereids_rules_p0/filter_push_down/push_down_filter_other_condition.out b/regression-test/data/nereids_rules_p0/filter_push_down/push_down_filter_other_condition.out index 65f95f83ec0f0f..afa4e4cb6ae315 100644 --- a/regression-test/data/nereids_rules_p0/filter_push_down/push_down_filter_other_condition.out +++ b/regression-test/data/nereids_rules_p0/filter_push_down/push_down_filter_other_condition.out @@ -208,7 +208,7 @@ PhysicalResultSink --NestedLoopJoin[LEFT_SEMI_JOIN] ----filter((t1.id > 1)) ------PhysicalOlapScan[t1] -----PhysicalOlapScan[t2] +----PhysicalStorageLayerAggregate[t2] -- !pushdown_inner_join_subquery_outer -- PhysicalResultSink diff --git a/regression-test/data/nereids_rules_p0/limit_push_down/limit_push_down.out b/regression-test/data/nereids_rules_p0/limit_push_down/limit_push_down.out index bb0c3e3c2a9bac..90ec76b7ae117a 100644 --- a/regression-test/data/nereids_rules_p0/limit_push_down/limit_push_down.out +++ b/regression-test/data/nereids_rules_p0/limit_push_down/limit_push_down.out @@ -85,7 +85,7 @@ PhysicalResultSink --------PhysicalLimit[LOCAL] ----------PhysicalOlapScan[t1] --------PhysicalLimit[LOCAL] -----------PhysicalOlapScan[t2] +----------PhysicalStorageLayerAggregate[t2] -- !limit_offset_join -- PhysicalResultSink @@ -120,7 +120,7 @@ PhysicalResultSink --------------PhysicalTopN[LOCAL_SORT] ----------------hashAgg[LOCAL] ------------------PhysicalOlapScan[t1] -------------PhysicalOlapScan[t2] +------------PhysicalStorageLayerAggregate[t2] -- !limit_distinct -- PhysicalResultSink @@ -133,7 +133,7 @@ PhysicalResultSink --------------PhysicalTopN[LOCAL_SORT] ----------------hashAgg[LOCAL] ------------------PhysicalOlapScan[t1] -------------PhysicalOlapScan[t2] +------------PhysicalStorageLayerAggregate[t2] -- !limit_distinct -- PhysicalResultSink @@ -535,7 +535,7 @@ PhysicalResultSink --------PhysicalLimit[LOCAL] ----------PhysicalOlapScan[t1] --------PhysicalLimit[LOCAL] -----------PhysicalOlapScan[t2] +----------PhysicalStorageLayerAggregate[t2] -- !limit_multiple_left_outer_join -- PhysicalResultSink @@ -580,9 +580,9 @@ PhysicalResultSink ------------PhysicalLimit[LOCAL] --------------PhysicalOlapScan[t1] ------------PhysicalLimit[LOCAL] ---------------PhysicalOlapScan[t2] +--------------PhysicalStorageLayerAggregate[t2] --------PhysicalLimit[LOCAL] -----------PhysicalOlapScan[t3] +----------PhysicalStorageLayerAggregate[t3] -- !limit_left_outer_join_right_outer_join -- PhysicalResultSink @@ -616,7 +616,7 @@ PhysicalResultSink --------------PhysicalOlapScan[t1] ------------PhysicalOlapScan[t2] --------PhysicalLimit[LOCAL] -----------PhysicalOlapScan[t3] +----------PhysicalStorageLayerAggregate[t3] -- !limit_right_outer_join_full_outer_join -- PhysicalResultSink @@ -639,7 +639,7 @@ PhysicalResultSink ------------PhysicalLimit[LOCAL] --------------PhysicalOlapScan[t2] --------PhysicalLimit[LOCAL] -----------PhysicalOlapScan[t3] +----------PhysicalStorageLayerAggregate[t3] -- !limit_full_outer_join_cross_join -- PhysicalResultSink @@ -651,7 +651,7 @@ PhysicalResultSink ------------PhysicalOlapScan[t1] ------------PhysicalOlapScan[t2] --------PhysicalLimit[LOCAL] -----------PhysicalOlapScan[t3] +----------PhysicalStorageLayerAggregate[t3] -- !limit_left_outer_join_right_outer_join_full_outer_join -- PhysicalResultSink @@ -678,7 +678,7 @@ PhysicalResultSink ------------PhysicalLimit[LOCAL] --------------PhysicalOlapScan[t3] --------PhysicalLimit[LOCAL] -----------PhysicalOlapScan[t4] +----------PhysicalStorageLayerAggregate[t4] -- !limit_left_outer_join_full_outer_join_cross_join -- PhysicalResultSink @@ -692,7 +692,7 @@ PhysicalResultSink --------------PhysicalOlapScan[t2] ------------PhysicalOlapScan[t3] --------PhysicalLimit[LOCAL] -----------PhysicalOlapScan[t4] +----------PhysicalStorageLayerAggregate[t4] -- !limit_right_outer_join_full_outer_join_cross_join -- PhysicalResultSink @@ -706,7 +706,7 @@ PhysicalResultSink --------------PhysicalOlapScan[t2] ------------PhysicalOlapScan[t3] --------PhysicalLimit[LOCAL] -----------PhysicalOlapScan[t4] +----------PhysicalStorageLayerAggregate[t4] -- !limit_left_outer_join_right_outer_join_full_outer_join_cross_join -- PhysicalResultSink diff --git a/regression-test/data/nereids_rules_p0/limit_push_down/order_push_down.out b/regression-test/data/nereids_rules_p0/limit_push_down/order_push_down.out index bbbadef2b73700..694e609eaeb2af 100644 --- a/regression-test/data/nereids_rules_p0/limit_push_down/order_push_down.out +++ b/regression-test/data/nereids_rules_p0/limit_push_down/order_push_down.out @@ -79,7 +79,7 @@ PhysicalResultSink ------PhysicalTopN[MERGE_SORT] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalOlapScan[t1] -------PhysicalOlapScan[t2] +------PhysicalStorageLayerAggregate[t2] -- !limit_offset_sort_join -- PhysicalResultSink @@ -122,7 +122,7 @@ PhysicalResultSink ----------------hashAgg[GLOBAL] ------------------hashAgg[LOCAL] --------------------PhysicalOlapScan[t1] -------------PhysicalOlapScan[t2] +------------PhysicalStorageLayerAggregate[t2] -- !limit_distinct -- PhysicalResultSink @@ -136,7 +136,7 @@ PhysicalResultSink ----------------hashAgg[GLOBAL] ------------------hashAgg[LOCAL] --------------------PhysicalOlapScan[t1] -------------PhysicalOlapScan[t2] +------------PhysicalStorageLayerAggregate[t2] -- !limit_distinct -- PhysicalResultSink @@ -582,7 +582,7 @@ PhysicalResultSink ------PhysicalTopN[MERGE_SORT] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalOlapScan[t1] -------PhysicalOlapScan[t2] +------PhysicalStorageLayerAggregate[t2] -- !limit_multiple_left_outer_join -- PhysicalResultSink diff --git a/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_distinct_through_join.out b/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_distinct_through_join.out index 5c3ec397a99167..ef877b24e97317 100644 --- a/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_distinct_through_join.out +++ b/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_distinct_through_join.out @@ -33,7 +33,7 @@ PhysicalResultSink --------------PhysicalTopN[LOCAL_SORT] ----------------hashAgg[LOCAL] ------------------PhysicalOlapScan[table_join] -------------PhysicalOlapScan[table_join] +------------PhysicalStorageLayerAggregate[table_join] -- !push_down_topn_through_join_data -- 0 diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query90.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query90.out index c25f20d5a2fa6e..e5f91ba2a61448 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query90.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query90.out @@ -8,40 +8,40 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecGather] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF5 hd_demo_sk->[ws_ship_hdemo_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF5 wp_web_page_sk->[ws_web_page_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF4 t_time_sk->[ws_sold_time_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ws_ship_hdemo_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF3 wp_web_page_sk->[ws_web_page_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ws_sold_time_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 --------------------------PhysicalProject -----------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) -------------------------------PhysicalOlapScan[web_page] +----------------------------filter((time_dim.t_hour <= 13) and (time_dim.t_hour >= 12)) +------------------------------PhysicalOlapScan[time_dim] ----------------------PhysicalProject -------------------------filter((time_dim.t_hour <= 13) and (time_dim.t_hour >= 12)) ---------------------------PhysicalOlapScan[time_dim] +------------------------filter((household_demographics.hd_dep_count = 6)) +--------------------------PhysicalOlapScan[household_demographics] ------------------PhysicalProject ---------------------filter((household_demographics.hd_dep_count = 6)) -----------------------PhysicalOlapScan[household_demographics] +--------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) +----------------------PhysicalOlapScan[web_page] --------hashAgg[GLOBAL] ----------PhysicalDistribute[DistributionSpecGather] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ws_ship_hdemo_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF2 wp_web_page_sk->[ws_web_page_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF1 t_time_sk->[ws_sold_time_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ws_ship_hdemo_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF0 wp_web_page_sk->[ws_web_page_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ws_sold_time_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 --------------------------PhysicalProject -----------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) -------------------------------PhysicalOlapScan[web_page] +----------------------------filter((time_dim.t_hour <= 15) and (time_dim.t_hour >= 14)) +------------------------------PhysicalOlapScan[time_dim] ----------------------PhysicalProject -------------------------filter((time_dim.t_hour <= 15) and (time_dim.t_hour >= 14)) ---------------------------PhysicalOlapScan[time_dim] +------------------------filter((household_demographics.hd_dep_count = 6)) +--------------------------PhysicalOlapScan[household_demographics] ------------------PhysicalProject ---------------------filter((household_demographics.hd_dep_count = 6)) -----------------------PhysicalOlapScan[household_demographics] +--------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) +----------------------PhysicalOlapScan[web_page] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query90.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query90.out index 0496a2911291ab..13607b4ae13f5d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query90.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query90.out @@ -8,40 +8,40 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecGather] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF5 hd_demo_sk->[ws_ship_hdemo_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF5 wp_web_page_sk->[ws_web_page_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF4 t_time_sk->[ws_sold_time_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ws_ship_hdemo_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF3 wp_web_page_sk->[ws_web_page_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ws_sold_time_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 --------------------------PhysicalProject -----------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) -------------------------------PhysicalOlapScan[web_page] +----------------------------filter((time_dim.t_hour <= 11) and (time_dim.t_hour >= 10)) +------------------------------PhysicalOlapScan[time_dim] ----------------------PhysicalProject -------------------------filter((time_dim.t_hour <= 11) and (time_dim.t_hour >= 10)) ---------------------------PhysicalOlapScan[time_dim] +------------------------filter((household_demographics.hd_dep_count = 2)) +--------------------------PhysicalOlapScan[household_demographics] ------------------PhysicalProject ---------------------filter((household_demographics.hd_dep_count = 2)) -----------------------PhysicalOlapScan[household_demographics] +--------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) +----------------------PhysicalOlapScan[web_page] --------hashAgg[GLOBAL] ----------PhysicalDistribute[DistributionSpecGather] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ws_ship_hdemo_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF2 wp_web_page_sk->[ws_web_page_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF1 t_time_sk->[ws_sold_time_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ws_ship_hdemo_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF0 wp_web_page_sk->[ws_web_page_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ws_sold_time_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 --------------------------PhysicalProject -----------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) -------------------------------PhysicalOlapScan[web_page] +----------------------------filter((time_dim.t_hour <= 17) and (time_dim.t_hour >= 16)) +------------------------------PhysicalOlapScan[time_dim] ----------------------PhysicalProject -------------------------filter((time_dim.t_hour <= 17) and (time_dim.t_hour >= 16)) ---------------------------PhysicalOlapScan[time_dim] +------------------------filter((household_demographics.hd_dep_count = 2)) +--------------------------PhysicalOlapScan[household_demographics] ------------------PhysicalProject ---------------------filter((household_demographics.hd_dep_count = 2)) -----------------------PhysicalOlapScan[household_demographics] +--------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) +----------------------PhysicalOlapScan[web_page] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query90.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query90.out index 0496a2911291ab..13607b4ae13f5d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query90.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query90.out @@ -8,40 +8,40 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecGather] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF5 hd_demo_sk->[ws_ship_hdemo_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF5 wp_web_page_sk->[ws_web_page_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF4 t_time_sk->[ws_sold_time_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ws_ship_hdemo_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF3 wp_web_page_sk->[ws_web_page_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ws_sold_time_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 --------------------------PhysicalProject -----------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) -------------------------------PhysicalOlapScan[web_page] +----------------------------filter((time_dim.t_hour <= 11) and (time_dim.t_hour >= 10)) +------------------------------PhysicalOlapScan[time_dim] ----------------------PhysicalProject -------------------------filter((time_dim.t_hour <= 11) and (time_dim.t_hour >= 10)) ---------------------------PhysicalOlapScan[time_dim] +------------------------filter((household_demographics.hd_dep_count = 2)) +--------------------------PhysicalOlapScan[household_demographics] ------------------PhysicalProject ---------------------filter((household_demographics.hd_dep_count = 2)) -----------------------PhysicalOlapScan[household_demographics] +--------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) +----------------------PhysicalOlapScan[web_page] --------hashAgg[GLOBAL] ----------PhysicalDistribute[DistributionSpecGather] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ws_ship_hdemo_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF2 wp_web_page_sk->[ws_web_page_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF1 t_time_sk->[ws_sold_time_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ws_ship_hdemo_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF0 wp_web_page_sk->[ws_web_page_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ws_sold_time_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 --------------------------PhysicalProject -----------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) -------------------------------PhysicalOlapScan[web_page] +----------------------------filter((time_dim.t_hour <= 17) and (time_dim.t_hour >= 16)) +------------------------------PhysicalOlapScan[time_dim] ----------------------PhysicalProject -------------------------filter((time_dim.t_hour <= 17) and (time_dim.t_hour >= 16)) ---------------------------PhysicalOlapScan[time_dim] +------------------------filter((household_demographics.hd_dep_count = 2)) +--------------------------PhysicalOlapScan[household_demographics] ------------------PhysicalProject ---------------------filter((household_demographics.hd_dep_count = 2)) -----------------------PhysicalOlapScan[household_demographics] +--------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) +----------------------PhysicalOlapScan[web_page] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/runtime_filter/test_pushdown_setop.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/runtime_filter/test_pushdown_setop.out index f985d4c8aa1bb4..ba4c37059cb12c 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/runtime_filter/test_pushdown_setop.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/runtime_filter/test_pushdown_setop.out @@ -5,7 +5,7 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject -----------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((T.l_linenumber = expr_cast(r_regionkey as BIGINT))) otherCondition=() build RFs:RF0 expr_cast(r_regionkey as BIGINT)->[cast(l_linenumber as BIGINT),o_orderkey] +----------hashJoin[INNER_JOIN broadcast] hashCondition=((T.l_linenumber = expr_cast(r_regionkey as BIGINT))) otherCondition=() build RFs:RF0 expr_cast(r_regionkey as BIGINT)->[cast(l_linenumber as BIGINT),o_orderkey] ------------PhysicalExcept --------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query90.out b/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query90.out index 0496a2911291ab..13607b4ae13f5d 100644 --- a/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query90.out +++ b/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query90.out @@ -8,40 +8,40 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecGather] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF5 hd_demo_sk->[ws_ship_hdemo_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF5 wp_web_page_sk->[ws_web_page_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF4 t_time_sk->[ws_sold_time_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ws_ship_hdemo_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF3 wp_web_page_sk->[ws_web_page_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ws_sold_time_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 --------------------------PhysicalProject -----------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) -------------------------------PhysicalOlapScan[web_page] +----------------------------filter((time_dim.t_hour <= 11) and (time_dim.t_hour >= 10)) +------------------------------PhysicalOlapScan[time_dim] ----------------------PhysicalProject -------------------------filter((time_dim.t_hour <= 11) and (time_dim.t_hour >= 10)) ---------------------------PhysicalOlapScan[time_dim] +------------------------filter((household_demographics.hd_dep_count = 2)) +--------------------------PhysicalOlapScan[household_demographics] ------------------PhysicalProject ---------------------filter((household_demographics.hd_dep_count = 2)) -----------------------PhysicalOlapScan[household_demographics] +--------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) +----------------------PhysicalOlapScan[web_page] --------hashAgg[GLOBAL] ----------PhysicalDistribute[DistributionSpecGather] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ws_ship_hdemo_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF2 wp_web_page_sk->[ws_web_page_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF1 t_time_sk->[ws_sold_time_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ws_ship_hdemo_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF0 wp_web_page_sk->[ws_web_page_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ws_sold_time_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 --------------------------PhysicalProject -----------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) -------------------------------PhysicalOlapScan[web_page] +----------------------------filter((time_dim.t_hour <= 17) and (time_dim.t_hour >= 16)) +------------------------------PhysicalOlapScan[time_dim] ----------------------PhysicalProject -------------------------filter((time_dim.t_hour <= 17) and (time_dim.t_hour >= 16)) ---------------------------PhysicalOlapScan[time_dim] +------------------------filter((household_demographics.hd_dep_count = 2)) +--------------------------PhysicalOlapScan[household_demographics] ------------------PhysicalProject ---------------------filter((household_demographics.hd_dep_count = 2)) -----------------------PhysicalOlapScan[household_demographics] +--------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) +----------------------PhysicalOlapScan[web_page] diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query90.out b/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query90.out index 0496a2911291ab..13607b4ae13f5d 100644 --- a/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query90.out +++ b/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query90.out @@ -8,40 +8,40 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecGather] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF5 hd_demo_sk->[ws_ship_hdemo_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF5 wp_web_page_sk->[ws_web_page_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF4 t_time_sk->[ws_sold_time_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ws_ship_hdemo_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF3 wp_web_page_sk->[ws_web_page_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ws_sold_time_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 --------------------------PhysicalProject -----------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) -------------------------------PhysicalOlapScan[web_page] +----------------------------filter((time_dim.t_hour <= 11) and (time_dim.t_hour >= 10)) +------------------------------PhysicalOlapScan[time_dim] ----------------------PhysicalProject -------------------------filter((time_dim.t_hour <= 11) and (time_dim.t_hour >= 10)) ---------------------------PhysicalOlapScan[time_dim] +------------------------filter((household_demographics.hd_dep_count = 2)) +--------------------------PhysicalOlapScan[household_demographics] ------------------PhysicalProject ---------------------filter((household_demographics.hd_dep_count = 2)) -----------------------PhysicalOlapScan[household_demographics] +--------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) +----------------------PhysicalOlapScan[web_page] --------hashAgg[GLOBAL] ----------PhysicalDistribute[DistributionSpecGather] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ws_ship_hdemo_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF2 wp_web_page_sk->[ws_web_page_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF1 t_time_sk->[ws_sold_time_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ws_ship_hdemo_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF0 wp_web_page_sk->[ws_web_page_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ws_sold_time_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 --------------------------PhysicalProject -----------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) -------------------------------PhysicalOlapScan[web_page] +----------------------------filter((time_dim.t_hour <= 17) and (time_dim.t_hour >= 16)) +------------------------------PhysicalOlapScan[time_dim] ----------------------PhysicalProject -------------------------filter((time_dim.t_hour <= 17) and (time_dim.t_hour >= 16)) ---------------------------PhysicalOlapScan[time_dim] +------------------------filter((household_demographics.hd_dep_count = 2)) +--------------------------PhysicalOlapScan[household_demographics] ------------------PhysicalProject ---------------------filter((household_demographics.hd_dep_count = 2)) -----------------------PhysicalOlapScan[household_demographics] +--------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) +----------------------PhysicalOlapScan[web_page] diff --git a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query90.out b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query90.out index c25f20d5a2fa6e..e5f91ba2a61448 100644 --- a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query90.out +++ b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query90.out @@ -8,40 +8,40 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecGather] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF5 hd_demo_sk->[ws_ship_hdemo_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF5 wp_web_page_sk->[ws_web_page_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF4 t_time_sk->[ws_sold_time_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ws_ship_hdemo_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF3 wp_web_page_sk->[ws_web_page_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ws_sold_time_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 --------------------------PhysicalProject -----------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) -------------------------------PhysicalOlapScan[web_page] +----------------------------filter((time_dim.t_hour <= 13) and (time_dim.t_hour >= 12)) +------------------------------PhysicalOlapScan[time_dim] ----------------------PhysicalProject -------------------------filter((time_dim.t_hour <= 13) and (time_dim.t_hour >= 12)) ---------------------------PhysicalOlapScan[time_dim] +------------------------filter((household_demographics.hd_dep_count = 6)) +--------------------------PhysicalOlapScan[household_demographics] ------------------PhysicalProject ---------------------filter((household_demographics.hd_dep_count = 6)) -----------------------PhysicalOlapScan[household_demographics] +--------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) +----------------------PhysicalOlapScan[web_page] --------hashAgg[GLOBAL] ----------PhysicalDistribute[DistributionSpecGather] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ws_ship_hdemo_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF2 wp_web_page_sk->[ws_web_page_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF1 t_time_sk->[ws_sold_time_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ws_ship_hdemo_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF0 wp_web_page_sk->[ws_web_page_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ws_sold_time_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 --------------------------PhysicalProject -----------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) -------------------------------PhysicalOlapScan[web_page] +----------------------------filter((time_dim.t_hour <= 15) and (time_dim.t_hour >= 14)) +------------------------------PhysicalOlapScan[time_dim] ----------------------PhysicalProject -------------------------filter((time_dim.t_hour <= 15) and (time_dim.t_hour >= 14)) ---------------------------PhysicalOlapScan[time_dim] +------------------------filter((household_demographics.hd_dep_count = 6)) +--------------------------PhysicalOlapScan[household_demographics] ------------------PhysicalProject ---------------------filter((household_demographics.hd_dep_count = 6)) -----------------------PhysicalOlapScan[household_demographics] +--------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) +----------------------PhysicalOlapScan[web_page] diff --git a/regression-test/data/new_shapes_p0/tpch_sf1000/runtime_filter/test_pushdown_setop.out b/regression-test/data/new_shapes_p0/tpch_sf1000/runtime_filter/test_pushdown_setop.out index f985d4c8aa1bb4..ba4c37059cb12c 100644 --- a/regression-test/data/new_shapes_p0/tpch_sf1000/runtime_filter/test_pushdown_setop.out +++ b/regression-test/data/new_shapes_p0/tpch_sf1000/runtime_filter/test_pushdown_setop.out @@ -5,7 +5,7 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject -----------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((T.l_linenumber = expr_cast(r_regionkey as BIGINT))) otherCondition=() build RFs:RF0 expr_cast(r_regionkey as BIGINT)->[cast(l_linenumber as BIGINT),o_orderkey] +----------hashJoin[INNER_JOIN broadcast] hashCondition=((T.l_linenumber = expr_cast(r_regionkey as BIGINT))) otherCondition=() build RFs:RF0 expr_cast(r_regionkey as BIGINT)->[cast(l_linenumber as BIGINT),o_orderkey] ------------PhysicalExcept --------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject