From abd9000368a431478ced1af7737c09c641b2a311 Mon Sep 17 00:00:00 2001 From: LiBinfeng <46676950+LiBinfeng-01@users.noreply.github.com> Date: Thu, 4 Jan 2024 17:51:06 +0800 Subject: [PATCH] [Feat](Nereids) add distribute hint to leading hint (#28562) add distribute hint to leading hint, we can use leading like: /*+ leading(t1 broadcase{t2 t3}) */ after this commit --- .../docs/query-acceleration/hint/joinHint.md | 64 + .../org/apache/doris/nereids/DorisLexer.g4 | 2 + .../org/apache/doris/nereids/DorisParser.g4 | 8 +- .../apache/doris/nereids/NereidsPlanner.java | 15 +- .../doris/nereids/hint/DistributeHint.java | 76 + .../org/apache/doris/nereids/hint/Hint.java | 4 + .../doris/nereids/hint/LeadingHint.java | 76 +- .../jobs/joinorder/hypergraph/HyperGraph.java | 6 +- .../hypergraph/receiver/PlanReceiver.java | 12 +- .../nereids/parser/LogicalPlanBuilder.java | 36 +- .../nereids/properties/DistributionSpec.java | 4 + .../properties/RequestPropertyDeriver.java | 12 +- .../rules/analysis/BindExpression.java | 4 +- .../analysis/EliminateLogicalSelectHint.java | 4 +- .../exploration/join/InnerJoinLAsscom.java | 2 +- .../join/InnerJoinLAsscomProject.java | 2 +- .../join/InnerJoinLeftAssociate.java | 2 +- .../join/InnerJoinLeftAssociateProject.java | 2 +- .../join/InnerJoinRightAssociate.java | 2 +- .../join/InnerJoinRightAssociateProject.java | 2 +- .../rules/exploration/join/JoinCommute.java | 2 +- .../rules/exploration/join/JoinExchange.java | 15 +- .../join/JoinExchangeBothProject.java | 16 +- .../join/JoinExchangeLeftProject.java | 16 +- .../join/JoinExchangeRightProject.java | 16 +- .../join/LogicalJoinSemiJoinTranspose.java | 4 +- .../LogicalJoinSemiJoinTransposeProject.java | 8 +- .../join/OuterJoinAssocProject.java | 2 +- .../exploration/join/OuterJoinLAsscom.java | 2 +- .../join/OuterJoinLAsscomProject.java | 2 +- .../PushDownProjectThroughInnerOuterJoin.java | 4 +- .../join/PushDownProjectThroughSemiJoin.java | 4 +- .../join/SemiJoinSemiJoinTranspose.java | 2 +- .../SemiJoinSemiJoinTransposeProject.java | 2 +- .../rules/expression/ExpressionRewrite.java | 2 +- .../implementation/LogicalJoinToHashJoin.java | 2 +- .../rules/rewrite/ExistsApplyToJoin.java | 13 +- .../rewrite/ExtractFilterFromCrossJoin.java | 2 +- .../rewrite/FindHashConditionForJoin.java | 2 +- .../nereids/rules/rewrite/InApplyToJoin.java | 9 +- .../nereids/rules/rewrite/OrExpansion.java | 6 +- .../rules/rewrite/PullUpJoinFromUnionAll.java | 7 +- .../rewrite/PushDownFilterThroughJoin.java | 2 +- .../rewrite/PushDownJoinOtherCondition.java | 2 +- .../rules/rewrite/PushFilterInsideJoin.java | 2 +- .../nereids/rules/rewrite/ReorderJoin.java | 22 +- .../rules/rewrite/ScalarApplyToJoin.java | 7 +- .../rules/rewrite/SemiJoinCommute.java | 2 +- .../rewrite/TransposeSemiJoinLogicalJoin.java | 2 +- .../TransposeSemiJoinLogicalJoinProject.java | 2 +- .../trees/copier/LogicalPlanDeepCopier.java | 2 +- .../{JoinHint.java => DistributeType.java} | 22 +- .../nereids/trees/plans/algebra/Join.java | 25 +- .../trees/plans/logical/LogicalJoin.java | 37 +- .../trees/plans/logical/UsingJoin.java | 12 +- .../plans/physical/AbstractPhysicalJoin.java | 15 +- .../plans/physical/PhysicalDistribute.java | 7 + .../plans/physical/PhysicalHashJoin.java | 8 +- .../physical/PhysicalNestedLoopJoin.java | 7 +- ...nHintTest.java => DistributeHintTest.java} | 6 +- ...nHintTest.java => DistributeHintTest.java} | 2 +- .../nereids/parser/NereidsParserTest.java | 12 +- .../ChildOutputPropertyDeriverTest.java | 27 +- .../RequestPropertyDeriverTest.java | 7 +- .../rewrite/FindHashConditionForJoinTest.java | 7 +- .../nereids/trees/plans/PlanEqualsTest.java | 7 +- .../nereids/trees/plans/PlanToStringTest.java | 1 + .../doris/nereids/util/HyperGraphBuilder.java | 9 +- .../nereids/util/LogicalPlanBuilder.java | 5 +- .../data/empty_relation/eliminate_empty.out | 10 +- .../cte/test_cte_filter_pushdown.out | 14 +- .../eliminate_outer_join.out | 224 ++- .../data/nereids_p0/hint/fix_leading.out | 10 +- .../data/nereids_p0/hint/test_leading.out | 1494 ++++++++++++++++- .../eager_aggregate/basic.out | 66 +- .../eager_aggregate/basic_one_side.out | 60 +- .../push_down_count_through_join.out | 740 ++++---- .../push_down_count_through_join_one_side.out | 744 ++++---- .../push_down_max_through_join.out | 419 +++-- .../push_down_min_through_join.out | 419 +++-- .../push_down_sum_through_join.out | 439 ++--- .../push_down_sum_through_join_one_side.out | 419 +++-- .../eliminate_join_condition.out | 43 +- .../eliminate_not_null/eliminate_not_null.out | 59 +- .../eliminate_outer_join.out | 70 +- .../push_down_alias_through_join.out | 52 +- .../push_down_expression_in_hash_join.out | 64 +- .../push_down_filter_other_condition.out | 410 +++-- .../push_filter_inside_join.out | 139 +- .../infer_set_operator_distinct.out | 200 +-- .../limit_push_down/limit_push_down.out | 1002 ++++++----- .../limit_push_down/order_push_down.out | 830 +++++---- .../predicate_infer/infer_predicate.out | 625 ++++--- .../push_down_limit_distinct.out | 24 +- ...push_down_top_n_distinct_through_union.out | 182 +- .../push_down_top_n_through_union.out | 245 +-- .../transposeJoin/transposeSemiJoinAgg.out | 132 +- .../data/nereids_shape_check/load.out | 16 +- .../nereids_ssb_shape_sf100_p0/shape/flat.out | 8 +- .../nereids_ssb_shape_sf100_p0/shape/q1.1.out | 4 +- .../nereids_ssb_shape_sf100_p0/shape/q1.2.out | 4 +- .../nereids_ssb_shape_sf100_p0/shape/q1.3.out | 4 +- .../nereids_ssb_shape_sf100_p0/shape/q2.1.out | 10 +- .../nereids_ssb_shape_sf100_p0/shape/q2.2.out | 10 +- .../nereids_ssb_shape_sf100_p0/shape/q2.3.out | 10 +- .../nereids_ssb_shape_sf100_p0/shape/q3.1.out | 12 +- .../nereids_ssb_shape_sf100_p0/shape/q3.2.out | 12 +- .../nereids_ssb_shape_sf100_p0/shape/q3.3.out | 10 +- .../nereids_ssb_shape_sf100_p0/shape/q3.4.out | 10 +- .../nereids_ssb_shape_sf100_p0/shape/q4.1.out | 16 +- .../nereids_ssb_shape_sf100_p0/shape/q4.2.out | 16 +- .../nereids_ssb_shape_sf100_p0/shape/q4.3.out | 12 +- .../push_filter_through_ptopn.out | 10 +- .../push_filter_through_window.out | 10 +- .../shape/query1.out | 20 +- .../shape/query10.out | 20 +- .../shape/query11.out | 22 +- .../shape/query12.out | 12 +- .../shape/query13.out | 16 +- .../shape/query14.out | 80 +- .../shape/query15.out | 14 +- .../shape/query16.out | 14 +- .../shape/query17.out | 20 +- .../shape/query18.out | 24 +- .../shape/query19.out | 16 +- .../shape/query2.out | 22 +- .../shape/query20.out | 10 +- .../shape/query21.out | 10 +- .../shape/query22.out | 8 +- .../shape/query23.out | 38 +- .../shape/query24.out | 30 +- .../shape/query25.out | 20 +- .../shape/query26.out | 14 +- .../shape/query27.out | 14 +- .../shape/query28.out | 22 +- .../shape/query29.out | 18 +- .../shape/query3.out | 8 +- .../shape/query30.out | 22 +- .../shape/query31.out | 30 +- .../shape/query32.out | 8 +- .../shape/query33.out | 46 +- .../shape/query34.out | 12 +- .../shape/query35.out | 26 +- .../shape/query36.out | 14 +- .../shape/query37.out | 10 +- .../shape/query38.out | 26 +- .../shape/query39.out | 14 +- .../shape/query4.out | 30 +- .../shape/query40.out | 10 +- .../shape/query41.out | 8 +- .../shape/query42.out | 8 +- .../shape/query43.out | 8 +- .../shape/query44.out | 30 +- .../shape/query45.out | 20 +- .../shape/query46.out | 20 +- .../shape/query47.out | 18 +- .../shape/query48.out | 12 +- .../shape/query49.out | 28 +- .../shape/query5.out | 34 +- .../shape/query50.out | 10 +- .../shape/query51.out | 20 +- .../shape/query52.out | 8 +- .../shape/query53.out | 12 +- .../shape/query54.out | 38 +- .../shape/query55.out | 8 +- .../shape/query56.out | 38 +- .../shape/query57.out | 18 +- .../shape/query58.out | 44 +- .../shape/query59.out | 22 +- .../shape/query6.out | 26 +- .../shape/query60.out | 46 +- .../shape/query61.out | 34 +- .../shape/query62.out | 12 +- .../shape/query63.out | 12 +- .../shape/query64.out | 54 +- .../shape/query65.out | 20 +- .../shape/query66.out | 24 +- .../shape/query67.out | 12 +- .../shape/query68.out | 16 +- .../shape/query69.out | 28 +- .../shape/query7.out | 14 +- .../shape/query70.out | 20 +- .../shape/query71.out | 20 +- .../shape/query72.out | 34 +- .../shape/query73.out | 12 +- .../shape/query74.out | 22 +- .../shape/query75.out | 28 +- .../shape/query76.out | 26 +- .../shape/query77.out | 38 +- .../shape/query78.out | 14 +- .../shape/query79.out | 14 +- .../shape/query8.out | 18 +- .../shape/query80.out | 52 +- .../shape/query81.out | 24 +- .../shape/query82.out | 10 +- .../shape/query83.out | 38 +- .../shape/query84.out | 12 +- .../shape/query85.out | 18 +- .../shape/query86.out | 10 +- .../shape/query87.out | 26 +- .../shape/query88.out | 78 +- .../shape/query89.out | 12 +- .../shape/query9.out | 62 +- .../shape/query90.out | 18 +- .../shape/query91.out | 18 +- .../shape/query92.out | 8 +- .../shape/query93.out | 6 +- .../shape/query94.out | 14 +- .../shape/query95.out | 20 +- .../shape/query96.out | 8 +- .../shape/query97.out | 10 +- .../shape/query98.out | 10 +- .../shape/query99.out | 12 +- .../noStatsRfPrune/query1.out | 18 +- .../noStatsRfPrune/query10.out | 24 +- .../noStatsRfPrune/query11.out | 22 +- .../noStatsRfPrune/query12.out | 10 +- .../noStatsRfPrune/query13.out | 14 +- .../noStatsRfPrune/query14.out | 80 +- .../noStatsRfPrune/query15.out | 14 +- .../noStatsRfPrune/query16.out | 14 +- .../noStatsRfPrune/query17.out | 18 +- .../noStatsRfPrune/query18.out | 20 +- .../noStatsRfPrune/query19.out | 16 +- .../noStatsRfPrune/query2.out | 20 +- .../noStatsRfPrune/query20.out | 10 +- .../noStatsRfPrune/query21.out | 10 +- .../noStatsRfPrune/query22.out | 8 +- .../noStatsRfPrune/query23.out | 38 +- .../noStatsRfPrune/query24.out | 24 +- .../noStatsRfPrune/query25.out | 18 +- .../noStatsRfPrune/query26.out | 12 +- .../noStatsRfPrune/query27.out | 12 +- .../noStatsRfPrune/query28.out | 22 +- .../noStatsRfPrune/query29.out | 18 +- .../noStatsRfPrune/query3.out | 8 +- .../noStatsRfPrune/query30.out | 22 +- .../noStatsRfPrune/query31.out | 28 +- .../noStatsRfPrune/query32.out | 8 +- .../noStatsRfPrune/query33.out | 40 +- .../noStatsRfPrune/query34.out | 12 +- .../noStatsRfPrune/query35.out | 26 +- .../noStatsRfPrune/query36.out | 12 +- .../noStatsRfPrune/query37.out | 12 +- .../noStatsRfPrune/query38.out | 26 +- .../noStatsRfPrune/query39.out | 14 +- .../noStatsRfPrune/query4.out | 30 +- .../noStatsRfPrune/query40.out | 10 +- .../noStatsRfPrune/query41.out | 8 +- .../noStatsRfPrune/query42.out | 8 +- .../noStatsRfPrune/query43.out | 8 +- .../noStatsRfPrune/query44.out | 34 +- .../noStatsRfPrune/query45.out | 18 +- .../noStatsRfPrune/query46.out | 20 +- .../noStatsRfPrune/query47.out | 18 +- .../noStatsRfPrune/query48.out | 12 +- .../noStatsRfPrune/query49.out | 28 +- .../noStatsRfPrune/query5.out | 34 +- .../noStatsRfPrune/query50.out | 10 +- .../noStatsRfPrune/query51.out | 20 +- .../noStatsRfPrune/query52.out | 8 +- .../noStatsRfPrune/query53.out | 12 +- .../noStatsRfPrune/query54.out | 36 +- .../noStatsRfPrune/query55.out | 8 +- .../noStatsRfPrune/query56.out | 34 +- .../noStatsRfPrune/query57.out | 18 +- .../noStatsRfPrune/query58.out | 50 +- .../noStatsRfPrune/query59.out | 18 +- .../noStatsRfPrune/query6.out | 26 +- .../noStatsRfPrune/query60.out | 40 +- .../noStatsRfPrune/query61.out | 32 +- .../noStatsRfPrune/query62.out | 12 +- .../noStatsRfPrune/query63.out | 12 +- .../noStatsRfPrune/query64.out | 48 +- .../noStatsRfPrune/query65.out | 18 +- .../noStatsRfPrune/query66.out | 24 +- .../noStatsRfPrune/query67.out | 12 +- .../noStatsRfPrune/query68.out | 20 +- .../noStatsRfPrune/query69.out | 24 +- .../noStatsRfPrune/query7.out | 12 +- .../noStatsRfPrune/query70.out | 22 +- .../noStatsRfPrune/query71.out | 20 +- .../noStatsRfPrune/query72.out | 24 +- .../noStatsRfPrune/query73.out | 12 +- .../noStatsRfPrune/query74.out | 22 +- .../noStatsRfPrune/query75.out | 28 +- .../noStatsRfPrune/query76.out | 22 +- .../noStatsRfPrune/query77.out | 42 +- .../noStatsRfPrune/query78.out | 14 +- .../noStatsRfPrune/query79.out | 14 +- .../noStatsRfPrune/query8.out | 18 +- .../noStatsRfPrune/query80.out | 34 +- .../noStatsRfPrune/query81.out | 24 +- .../noStatsRfPrune/query82.out | 12 +- .../noStatsRfPrune/query83.out | 38 +- .../noStatsRfPrune/query84.out | 14 +- .../noStatsRfPrune/query85.out | 20 +- .../noStatsRfPrune/query86.out | 10 +- .../noStatsRfPrune/query87.out | 26 +- .../noStatsRfPrune/query88.out | 78 +- .../noStatsRfPrune/query89.out | 12 +- .../noStatsRfPrune/query9.out | 62 +- .../noStatsRfPrune/query90.out | 18 +- .../noStatsRfPrune/query91.out | 20 +- .../noStatsRfPrune/query92.out | 8 +- .../noStatsRfPrune/query93.out | 6 +- .../noStatsRfPrune/query94.out | 14 +- .../noStatsRfPrune/query95.out | 20 +- .../noStatsRfPrune/query96.out | 8 +- .../noStatsRfPrune/query97.out | 10 +- .../noStatsRfPrune/query98.out | 10 +- .../noStatsRfPrune/query99.out | 12 +- .../no_stats_shape/query1.out | 18 +- .../no_stats_shape/query10.out | 24 +- .../no_stats_shape/query11.out | 22 +- .../no_stats_shape/query12.out | 10 +- .../no_stats_shape/query13.out | 14 +- .../no_stats_shape/query14.out | 80 +- .../no_stats_shape/query15.out | 14 +- .../no_stats_shape/query16.out | 14 +- .../no_stats_shape/query17.out | 18 +- .../no_stats_shape/query18.out | 20 +- .../no_stats_shape/query19.out | 16 +- .../no_stats_shape/query2.out | 20 +- .../no_stats_shape/query20.out | 10 +- .../no_stats_shape/query21.out | 10 +- .../no_stats_shape/query22.out | 8 +- .../no_stats_shape/query23.out | 38 +- .../no_stats_shape/query24.out | 24 +- .../no_stats_shape/query25.out | 18 +- .../no_stats_shape/query26.out | 12 +- .../no_stats_shape/query27.out | 12 +- .../no_stats_shape/query28.out | 22 +- .../no_stats_shape/query29.out | 18 +- .../no_stats_shape/query3.out | 8 +- .../no_stats_shape/query30.out | 22 +- .../no_stats_shape/query31.out | 28 +- .../no_stats_shape/query32.out | 8 +- .../no_stats_shape/query33.out | 40 +- .../no_stats_shape/query34.out | 12 +- .../no_stats_shape/query35.out | 26 +- .../no_stats_shape/query36.out | 12 +- .../no_stats_shape/query37.out | 12 +- .../no_stats_shape/query38.out | 26 +- .../no_stats_shape/query39.out | 14 +- .../no_stats_shape/query4.out | 30 +- .../no_stats_shape/query40.out | 10 +- .../no_stats_shape/query41.out | 8 +- .../no_stats_shape/query42.out | 8 +- .../no_stats_shape/query43.out | 8 +- .../no_stats_shape/query44.out | 34 +- .../no_stats_shape/query45.out | 18 +- .../no_stats_shape/query46.out | 20 +- .../no_stats_shape/query47.out | 18 +- .../no_stats_shape/query48.out | 12 +- .../no_stats_shape/query49.out | 28 +- .../no_stats_shape/query5.out | 34 +- .../no_stats_shape/query50.out | 10 +- .../no_stats_shape/query51.out | 20 +- .../no_stats_shape/query52.out | 8 +- .../no_stats_shape/query53.out | 12 +- .../no_stats_shape/query54.out | 36 +- .../no_stats_shape/query55.out | 8 +- .../no_stats_shape/query56.out | 34 +- .../no_stats_shape/query57.out | 18 +- .../no_stats_shape/query58.out | 50 +- .../no_stats_shape/query59.out | 18 +- .../no_stats_shape/query6.out | 26 +- .../no_stats_shape/query60.out | 40 +- .../no_stats_shape/query61.out | 32 +- .../no_stats_shape/query62.out | 12 +- .../no_stats_shape/query63.out | 12 +- .../no_stats_shape/query64.out | 48 +- .../no_stats_shape/query65.out | 18 +- .../no_stats_shape/query66.out | 24 +- .../no_stats_shape/query67.out | 12 +- .../no_stats_shape/query68.out | 20 +- .../no_stats_shape/query69.out | 24 +- .../no_stats_shape/query7.out | 12 +- .../no_stats_shape/query70.out | 22 +- .../no_stats_shape/query71.out | 20 +- .../no_stats_shape/query72.out | 24 +- .../no_stats_shape/query73.out | 12 +- .../no_stats_shape/query74.out | 22 +- .../no_stats_shape/query75.out | 28 +- .../no_stats_shape/query76.out | 22 +- .../no_stats_shape/query77.out | 42 +- .../no_stats_shape/query78.out | 14 +- .../no_stats_shape/query79.out | 14 +- .../no_stats_shape/query8.out | 18 +- .../no_stats_shape/query80.out | 34 +- .../no_stats_shape/query81.out | 24 +- .../no_stats_shape/query82.out | 12 +- .../no_stats_shape/query83.out | 38 +- .../no_stats_shape/query84.out | 14 +- .../no_stats_shape/query85.out | 20 +- .../no_stats_shape/query86.out | 10 +- .../no_stats_shape/query87.out | 26 +- .../no_stats_shape/query88.out | 78 +- .../no_stats_shape/query89.out | 12 +- .../no_stats_shape/query9.out | 62 +- .../no_stats_shape/query90.out | 18 +- .../no_stats_shape/query91.out | 20 +- .../no_stats_shape/query92.out | 8 +- .../no_stats_shape/query93.out | 6 +- .../no_stats_shape/query94.out | 14 +- .../no_stats_shape/query95.out | 20 +- .../no_stats_shape/query96.out | 8 +- .../no_stats_shape/query97.out | 10 +- .../no_stats_shape/query98.out | 10 +- .../no_stats_shape/query99.out | 12 +- .../rf_prune/query1.out | 20 +- .../rf_prune/query10.out | 20 +- .../rf_prune/query11.out | 22 +- .../rf_prune/query12.out | 12 +- .../rf_prune/query13.out | 14 +- .../rf_prune/query14.out | 82 +- .../rf_prune/query15.out | 14 +- .../rf_prune/query16.out | 14 +- .../rf_prune/query17.out | 20 +- .../rf_prune/query18.out | 22 +- .../rf_prune/query19.out | 16 +- .../rf_prune/query2.out | 22 +- .../rf_prune/query20.out | 12 +- .../rf_prune/query21.out | 10 +- .../rf_prune/query22.out | 8 +- .../rf_prune/query23.out | 38 +- .../rf_prune/query24.out | 30 +- .../rf_prune/query25.out | 20 +- .../rf_prune/query26.out | 14 +- .../rf_prune/query27.out | 14 +- .../rf_prune/query28.out | 22 +- .../rf_prune/query29.out | 18 +- .../rf_prune/query3.out | 8 +- .../rf_prune/query30.out | 22 +- .../rf_prune/query31.out | 30 +- .../rf_prune/query32.out | 8 +- .../rf_prune/query33.out | 44 +- .../rf_prune/query34.out | 12 +- .../rf_prune/query35.out | 26 +- .../rf_prune/query36.out | 12 +- .../rf_prune/query37.out | 10 +- .../rf_prune/query38.out | 26 +- .../rf_prune/query39.out | 14 +- .../rf_prune/query4.out | 30 +- .../rf_prune/query40.out | 10 +- .../rf_prune/query41.out | 8 +- .../rf_prune/query42.out | 8 +- .../rf_prune/query43.out | 8 +- .../rf_prune/query44.out | 28 +- .../rf_prune/query45.out | 20 +- .../rf_prune/query46.out | 20 +- .../rf_prune/query47.out | 18 +- .../rf_prune/query48.out | 12 +- .../rf_prune/query49.out | 28 +- .../rf_prune/query5.out | 34 +- .../rf_prune/query50.out | 10 +- .../rf_prune/query51.out | 20 +- .../rf_prune/query52.out | 8 +- .../rf_prune/query53.out | 12 +- .../rf_prune/query54.out | 40 +- .../rf_prune/query55.out | 8 +- .../rf_prune/query56.out | 36 +- .../rf_prune/query57.out | 20 +- .../rf_prune/query58.out | 44 +- .../rf_prune/query59.out | 22 +- .../rf_prune/query6.out | 28 +- .../rf_prune/query60.out | 40 +- .../rf_prune/query61.out | 28 +- .../rf_prune/query62.out | 12 +- .../rf_prune/query63.out | 12 +- .../rf_prune/query64.out | 52 +- .../rf_prune/query65.out | 20 +- .../rf_prune/query66.out | 24 +- .../rf_prune/query67.out | 12 +- .../rf_prune/query68.out | 16 +- .../rf_prune/query69.out | 26 +- .../rf_prune/query7.out | 14 +- .../rf_prune/query70.out | 20 +- .../rf_prune/query71.out | 22 +- .../rf_prune/query72.out | 32 +- .../rf_prune/query73.out | 12 +- .../rf_prune/query74.out | 22 +- .../rf_prune/query75.out | 28 +- .../rf_prune/query76.out | 22 +- .../rf_prune/query77.out | 38 +- .../rf_prune/query78.out | 14 +- .../rf_prune/query79.out | 14 +- .../rf_prune/query8.out | 18 +- .../rf_prune/query80.out | 34 +- .../rf_prune/query81.out | 24 +- .../rf_prune/query82.out | 10 +- .../rf_prune/query83.out | 34 +- .../rf_prune/query84.out | 12 +- .../rf_prune/query85.out | 16 +- .../rf_prune/query86.out | 12 +- .../rf_prune/query87.out | 26 +- .../rf_prune/query88.out | 78 +- .../rf_prune/query89.out | 12 +- .../rf_prune/query9.out | 62 +- .../rf_prune/query90.out | 18 +- .../rf_prune/query91.out | 20 +- .../rf_prune/query92.out | 8 +- .../rf_prune/query93.out | 6 +- .../rf_prune/query94.out | 14 +- .../rf_prune/query95.out | 20 +- .../rf_prune/query96.out | 8 +- .../rf_prune/query97.out | 10 +- .../rf_prune/query98.out | 12 +- .../rf_prune/query99.out | 12 +- .../shape/query1.out | 20 +- .../shape/query10.out | 20 +- .../shape/query11.out | 22 +- .../shape/query12.out | 12 +- .../shape/query13.out | 14 +- .../shape/query14.out | 82 +- .../shape/query15.out | 14 +- .../shape/query16.out | 14 +- .../shape/query17.out | 20 +- .../shape/query18.out | 22 +- .../shape/query19.out | 16 +- .../shape/query2.out | 22 +- .../shape/query20.out | 12 +- .../shape/query21.out | 10 +- .../shape/query22.out | 8 +- .../shape/query23.out | 38 +- .../shape/query24.out | 30 +- .../shape/query25.out | 20 +- .../shape/query26.out | 14 +- .../shape/query27.out | 14 +- .../shape/query28.out | 22 +- .../shape/query29.out | 18 +- .../shape/query3.out | 8 +- .../shape/query30.out | 22 +- .../shape/query31.out | 30 +- .../shape/query32.out | 8 +- .../shape/query33.out | 44 +- .../shape/query34.out | 12 +- .../shape/query35.out | 26 +- .../shape/query36.out | 12 +- .../shape/query37.out | 10 +- .../shape/query38.out | 26 +- .../shape/query39.out | 14 +- .../shape/query4.out | 30 +- .../shape/query40.out | 10 +- .../shape/query41.out | 8 +- .../shape/query42.out | 8 +- .../shape/query43.out | 8 +- .../shape/query44.out | 28 +- .../shape/query45.out | 20 +- .../shape/query46.out | 20 +- .../shape/query47.out | 18 +- .../shape/query48.out | 12 +- .../shape/query49.out | 28 +- .../shape/query5.out | 34 +- .../shape/query50.out | 10 +- .../shape/query51.out | 20 +- .../shape/query52.out | 8 +- .../shape/query53.out | 12 +- .../shape/query54.out | 40 +- .../shape/query55.out | 8 +- .../shape/query56.out | 36 +- .../shape/query57.out | 20 +- .../shape/query58.out | 44 +- .../shape/query59.out | 22 +- .../shape/query6.out | 28 +- .../shape/query60.out | 40 +- .../shape/query61.out | 28 +- .../shape/query62.out | 12 +- .../shape/query63.out | 12 +- .../shape/query64.out | 52 +- .../shape/query65.out | 20 +- .../shape/query66.out | 24 +- .../shape/query67.out | 12 +- .../shape/query68.out | 16 +- .../shape/query69.out | 26 +- .../shape/query7.out | 14 +- .../shape/query70.out | 20 +- .../shape/query71.out | 22 +- .../shape/query72.out | 32 +- .../shape/query73.out | 12 +- .../shape/query74.out | 22 +- .../shape/query75.out | 28 +- .../shape/query76.out | 22 +- .../shape/query77.out | 38 +- .../shape/query78.out | 14 +- .../shape/query79.out | 14 +- .../shape/query8.out | 18 +- .../shape/query80.out | 34 +- .../shape/query81.out | 24 +- .../shape/query82.out | 10 +- .../shape/query83.out | 34 +- .../shape/query84.out | 12 +- .../shape/query85.out | 16 +- .../shape/query86.out | 12 +- .../shape/query87.out | 26 +- .../shape/query88.out | 78 +- .../shape/query89.out | 12 +- .../shape/query9.out | 62 +- .../shape/query90.out | 18 +- .../shape/query91.out | 20 +- .../shape/query92.out | 8 +- .../shape/query93.out | 6 +- .../shape/query94.out | 14 +- .../shape/query95.out | 20 +- .../shape/query96.out | 8 +- .../shape/query97.out | 10 +- .../shape/query98.out | 12 +- .../shape/query99.out | 12 +- .../nostats_rf_prune/q1.out | 4 +- .../nostats_rf_prune/q10.out | 12 +- .../nostats_rf_prune/q11.out | 20 +- .../nostats_rf_prune/q12.out | 4 +- .../nostats_rf_prune/q13.out | 8 +- .../nostats_rf_prune/q14.out | 6 +- .../nostats_rf_prune/q15.out | 12 +- .../nostats_rf_prune/q16.out | 6 +- .../nostats_rf_prune/q17.out | 6 +- .../nostats_rf_prune/q18.out | 8 +- .../nostats_rf_prune/q19.out | 6 +- .../nostats_rf_prune/q2.out | 12 +- .../nostats_rf_prune/q20-rewrite.out | 12 +- .../nostats_rf_prune/q20.out | 12 +- .../nostats_rf_prune/q21.out | 10 +- .../nostats_rf_prune/q22.out | 12 +- .../nostats_rf_prune/q3.out | 8 +- .../nostats_rf_prune/q4.out | 4 +- .../nostats_rf_prune/q5.out | 16 +- .../nostats_rf_prune/q6.out | 2 +- .../nostats_rf_prune/q7.out | 16 +- .../nostats_rf_prune/q8.out | 20 +- .../nostats_rf_prune/q9.out | 14 +- .../rf_prune/q1.out | 4 +- .../rf_prune/q10.out | 10 +- .../rf_prune/q11.out | 14 +- .../rf_prune/q12.out | 4 +- .../rf_prune/q13.out | 8 +- .../rf_prune/q14.out | 4 +- .../rf_prune/q15.out | 12 +- .../rf_prune/q16.out | 8 +- .../rf_prune/q17.out | 6 +- .../rf_prune/q18.out | 6 +- .../rf_prune/q19.out | 4 +- .../rf_prune/q2.out | 12 +- .../rf_prune/q20-rewrite.out | 12 +- .../rf_prune/q20.out | 12 +- .../rf_prune/q21.out | 8 +- .../rf_prune/q22.out | 12 +- .../rf_prune/q3.out | 8 +- .../rf_prune/q4.out | 4 +- .../rf_prune/q5.out | 14 +- .../rf_prune/q6.out | 2 +- .../rf_prune/q7.out | 16 +- .../rf_prune/q8.out | 18 +- .../rf_prune/q9.out | 18 +- .../nereids_tpch_shape_sf1000_p0/shape/q1.out | 4 +- .../shape/q10.out | 10 +- .../shape/q11.out | 14 +- .../shape/q12.out | 4 +- .../shape/q13.out | 8 +- .../shape/q14.out | 4 +- .../shape/q15.out | 12 +- .../shape/q16.out | 8 +- .../shape/q17.out | 6 +- .../shape/q18.out | 6 +- .../shape/q19.out | 4 +- .../nereids_tpch_shape_sf1000_p0/shape/q2.out | 12 +- .../shape/q20-rewrite.out | 12 +- .../shape/q20.out | 12 +- .../shape/q21.out | 8 +- .../shape/q22.out | 12 +- .../nereids_tpch_shape_sf1000_p0/shape/q3.out | 8 +- .../nereids_tpch_shape_sf1000_p0/shape/q4.out | 4 +- .../nereids_tpch_shape_sf1000_p0/shape/q5.out | 14 +- .../nereids_tpch_shape_sf1000_p0/shape/q6.out | 2 +- .../nereids_tpch_shape_sf1000_p0/shape/q7.out | 16 +- .../nereids_tpch_shape_sf1000_p0/shape/q8.out | 18 +- .../nereids_tpch_shape_sf1000_p0/shape/q9.out | 18 +- .../shape_no_stats/q1.out | 4 +- .../shape_no_stats/q10.out | 12 +- .../shape_no_stats/q11.out | 20 +- .../shape_no_stats/q12.out | 4 +- .../shape_no_stats/q13.out | 8 +- .../shape_no_stats/q14.out | 6 +- .../shape_no_stats/q15.out | 12 +- .../shape_no_stats/q16.out | 6 +- .../shape_no_stats/q17.out | 6 +- .../shape_no_stats/q18.out | 8 +- .../shape_no_stats/q19.out | 6 +- .../shape_no_stats/q2.out | 12 +- .../shape_no_stats/q20-rewrite.out | 12 +- .../shape_no_stats/q20.out | 12 +- .../shape_no_stats/q21.out | 10 +- .../shape_no_stats/q22.out | 12 +- .../shape_no_stats/q3.out | 8 +- .../shape_no_stats/q4.out | 4 +- .../shape_no_stats/q5.out | 16 +- .../shape_no_stats/q6.out | 2 +- .../shape_no_stats/q7.out | 16 +- .../shape_no_stats/q8.out | 20 +- .../shape_no_stats/q9.out | 14 +- .../nereids_p0/hint/test_leading.groovy | 153 ++ 702 files changed, 12310 insertions(+), 9230 deletions(-) create mode 100644 fe/fe-core/src/main/java/org/apache/doris/nereids/hint/DistributeHint.java rename fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/{JoinHint.java => DistributeType.java} (72%) rename fe/fe-core/src/test/java/org/apache/doris/nereids/{JoinHintTest.java => DistributeHintTest.java} (96%) rename fe/fe-core/src/test/java/org/apache/doris/nereids/jobs/joinorder/joinhint/{JoinHintTest.java => DistributeHintTest.java} (99%) diff --git a/docs/en/docs/query-acceleration/hint/joinHint.md b/docs/en/docs/query-acceleration/hint/joinHint.md index 5ce63cfe70..af120425cc 100644 --- a/docs/en/docs/query-acceleration/hint/joinHint.md +++ b/docs/en/docs/query-acceleration/hint/joinHint.md @@ -614,6 +614,70 @@ mysql> explain shape plan select /*+ ordered */ count(*) from t2 join[broadcast] 16 rows in set (0.01 sec) ``` - the Explain shape plan will display inside distribute operator related information, including DistributionSpecReplicated said the operator will be corresponding data into a copy of all be node, DistributionSpecGather indicates that data is gathered to fe nodes, and DistributionSpecHash indicates that data is dispersed to different be nodes according to a specific hashKey and algorithm. +# Leading Hint mixed with Distribute Hint +When we want more flexible using of leading which we want to control distribute type when useing hint and distribute hint together. +For example: we want to use hint to make plan like: +```sql +mysql> explain shape plan select /*+ leading(t3 broadcast {t2 shuffle t1}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3; ++----------------------------------------------------------------------------------------+ +| Explain String(Nereids Planner) | ++----------------------------------------------------------------------------------------+ +| PhysicalResultSink | +| --hashAgg[GLOBAL] | +| ----PhysicalDistribute[DistributionSpecGather] | +| ------hashAgg[LOCAL] | +| --------PhysicalProject | +| ----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() | +| ------------PhysicalProject | +| --------------PhysicalOlapScan[t3] | +| ------------PhysicalDistribute[DistributionSpecHash] | +| --------------PhysicalProject | +| ----------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() | +| ------------------PhysicalProject | +| --------------------PhysicalOlapScan[t2] | +| ------------------PhysicalDistribute[DistributionSpecHash] | +| --------------------PhysicalProject | +| ----------------------PhysicalOlapScan[t1] | +| | +| Hint log: | +| Used: leading(t3 { t2 shuffle t1 } ) | +| UnUsed: [broadcast]_2 | +| SyntaxError: | ++----------------------------------------------------------------------------------------+ +21 rows in set (0.06 sec) +``` +which means we can make plan like: leading(t3 { t2 shuffle t1 } ) but [broadcast]_2 can not be used because of changing the meaning of original query +When we have Distribute hint and Leading Hint + Distribute Hint together, we would try leading hint first. When leading hint is used all separate distribute hints turn to unused: +```sql +mysql> explain shape plan select /*+ leading(t3 {t2 t1}) */ count(*) from t1 left outer join [shuffle] t2 on c1 = c2 join [broadcast] t3 on c2 = c3; ++----------------------------------------------------------------------------------------+ +| Explain String(Nereids Planner) | ++----------------------------------------------------------------------------------------+ +| PhysicalResultSink | +| --hashAgg[GLOBAL] | +| ----PhysicalDistribute[DistributionSpecGather] | +| ------hashAgg[LOCAL] | +| --------PhysicalProject | +| ----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() | +| ------------PhysicalProject | +| --------------PhysicalOlapScan[t3] | +| ------------PhysicalDistribute[DistributionSpecHash] | +| --------------PhysicalProject | +| ----------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() | +| ------------------PhysicalProject | +| --------------------PhysicalOlapScan[t2] | +| ------------------PhysicalDistribute[DistributionSpecHash] | +| --------------------PhysicalProject | +| ----------------------PhysicalOlapScan[t1] | +| | +| Hint log: | +| Used: leading(t3 { t2 t1 } ) | +| UnUsed: [shuffle]_2 [broadcast]_3 | +| SyntaxError: | ++----------------------------------------------------------------------------------------+ +21 rows in set (0.02 sec) +``` + # To be supported - leadingHint indicates that the current query cannot be mixed with the subquery after it is promoted. A hint is required to control whether the subquery can be unnested diff --git a/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisLexer.g4 b/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisLexer.g4 index a1eea97161..488c8b82a0 100644 --- a/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisLexer.g4 +++ b/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisLexer.g4 @@ -590,6 +590,8 @@ STRING_LITERAL LEADING_STRING : LEFT_BRACE | RIGHT_BRACE + | LEFT_BRACKET + | RIGHT_BRACKET ; BIGINT_LITERAL diff --git a/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4 b/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4 index a91f207e47..7159350556 100644 --- a/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4 +++ b/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4 @@ -334,13 +334,13 @@ relation ; joinRelation - : (joinType) JOIN joinHint? right=relationPrimary joinCriteria? + : (joinType) JOIN distributeType? right=relationPrimary joinCriteria? ; // Just like `opt_plan_hints` in legacy CUP parser. -joinHint - : LEFT_BRACKET identifier RIGHT_BRACKET #bracketJoinHint - | HINT_START identifier HINT_END #commentJoinHint +distributeType + : LEFT_BRACKET identifier RIGHT_BRACKET #bracketDistributeType + | HINT_START identifier HINT_END #commentDistributeType ; relationHint diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/NereidsPlanner.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/NereidsPlanner.java index 4ac8223cc3..220a9024db 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/NereidsPlanner.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/NereidsPlanner.java @@ -29,6 +29,7 @@ import org.apache.doris.nereids.exceptions.AnalysisException; import org.apache.doris.nereids.glue.LogicalPlanAdapter; import org.apache.doris.nereids.glue.translator.PhysicalPlanTranslator; import org.apache.doris.nereids.glue.translator.PlanTranslatorContext; +import org.apache.doris.nereids.hint.DistributeHint; import org.apache.doris.nereids.hint.Hint; import org.apache.doris.nereids.jobs.executor.Optimizer; import org.apache.doris.nereids.jobs.executor.Rewriter; @@ -357,17 +358,25 @@ public class NereidsPlanner extends Planner { String used = ""; String unUsed = ""; String syntaxError = ""; + int distributeHintIndex = 1; for (Hint hint : hints) { + String distributeIndex = ""; + if (hint instanceof DistributeHint) { + distributeHintIndex++; + if (!hint.getExplainString().equals("")) { + distributeIndex = "_" + String.valueOf(distributeHintIndex); + } + } switch (hint.getStatus()) { case UNUSED: - unUsed = unUsed + " " + hint.getExplainString(); + unUsed = unUsed + " " + hint.getExplainString() + distributeIndex; break; case SYNTAX_ERROR: - syntaxError = syntaxError + " " + hint.getExplainString() + syntaxError = syntaxError + " " + hint.getExplainString() + distributeIndex + " Msg:" + hint.getErrorMessage(); break; case SUCCESS: - used = used + " " + hint.getExplainString(); + used = used + " " + hint.getExplainString() + distributeIndex; break; default: break; diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/hint/DistributeHint.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/hint/DistributeHint.java new file mode 100644 index 0000000000..8c41ebfce8 --- /dev/null +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/hint/DistributeHint.java @@ -0,0 +1,76 @@ +// 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.hint; + +import org.apache.doris.nereids.trees.plans.DistributeType; + +/** + * Hints for join. + *

+ * Hints for the right child of join are supported currently. + * Left input and right input of join could have different hints for further extension. + */ +public class DistributeHint extends Hint { + public DistributeType distributeType; + + private boolean isSuccessInLeading = false; + + public DistributeHint(DistributeType distributeType) { + super("Distribute"); + this.distributeType = distributeType; + } + + public void setSuccessInLeading(boolean successInLeading) { + isSuccessInLeading = successInLeading; + } + + /** + * get explain string of distribute hint, when distribute hint success in leading, it would not show + * @return explain string of distribute hint + */ + public String getExplainString() { + if (this.isSuccessInLeading) { + return ""; + } + StringBuilder out = new StringBuilder(); + switch (this.distributeType) { + case NONE: + break; + case SHUFFLE_RIGHT: + out.append("[shuffle]"); + break; + case BROADCAST_RIGHT: + out.append("[broadcast]"); + break; + default: + break; + } + return out.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return this.distributeType == ((DistributeHint) o).distributeType; + } +} diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/hint/Hint.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/hint/Hint.java index 8640ab3f5b..b144e71830 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/hint/Hint.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/hint/Hint.java @@ -65,6 +65,10 @@ public class Hint { return getStatus() == HintStatus.SYNTAX_ERROR; } + public boolean isUnUsed() { + return getStatus() == HintStatus.UNUSED; + } + public String getHintName() { return hintName; } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/hint/LeadingHint.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/hint/LeadingHint.java index 4d1abbbf95..00a1c01b0a 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/hint/LeadingHint.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/hint/LeadingHint.java @@ -22,7 +22,7 @@ import org.apache.doris.common.Pair; import org.apache.doris.nereids.jobs.joinorder.hypergraph.bitmap.LongBitmap; import org.apache.doris.nereids.trees.expressions.ExprId; import org.apache.doris.nereids.trees.expressions.Expression; -import org.apache.doris.nereids.trees.plans.JoinHint; +import org.apache.doris.nereids.trees.plans.DistributeType; import org.apache.doris.nereids.trees.plans.JoinType; import org.apache.doris.nereids.trees.plans.Plan; import org.apache.doris.nereids.trees.plans.RelationId; @@ -33,11 +33,13 @@ import org.apache.doris.nereids.trees.plans.logical.LogicalProject; import org.apache.doris.nereids.trees.plans.logical.LogicalRelation; import org.apache.doris.nereids.trees.plans.logical.LogicalSubQueryAlias; import org.apache.doris.nereids.util.JoinUtils; +import org.apache.doris.qe.ConnectContext; import com.google.common.collect.Maps; import com.google.common.collect.Sets; import java.util.ArrayList; +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; @@ -51,9 +53,13 @@ import java.util.Stack; */ public class LeadingHint extends Hint { private String originalString = ""; + + private List parameters; private final List tablelist = new ArrayList<>(); private final List levellist = new ArrayList<>(); + private final Map distributeHints = new HashMap<>(); + private final Map relationIdToScanMap = Maps.newLinkedHashMap(); private final List> relationIdAndTableName = new ArrayList<>(); @@ -82,6 +88,7 @@ public class LeadingHint extends Hint { public LeadingHint(String hintName, List parameters, String originalString) { super(hintName); this.originalString = originalString; + this.parameters = parameters; int level = 0; Stack brace = new Stack<>(); String lastParameter = ""; @@ -100,6 +107,18 @@ public class LeadingHint extends Hint { } else { level--; } + } else if (parameter.equals("shuffle")) { + DistributeHint distributeHint = new DistributeHint(DistributeType.SHUFFLE_RIGHT); + distributeHints.put(tablelist.size(), distributeHint); + if (!ConnectContext.get().getStatementContext().getHints().contains(distributeHint)) { + ConnectContext.get().getStatementContext().addHint(distributeHint); + } + } else if (parameter.equals("broadcast")) { + DistributeHint distributeHint = new DistributeHint(DistributeType.BROADCAST_RIGHT); + distributeHints.put(tablelist.size(), distributeHint); + if (!ConnectContext.get().getStatementContext().getHints().contains(distributeHint)) { + ConnectContext.get().getStatementContext().addHint(distributeHint); + } } else { tablelist.add(parameter); levellist.add(level); @@ -122,9 +141,25 @@ public class LeadingHint extends Hint { @Override public String getExplainString() { + if (!this.isSuccess()) { + return originalString; + } StringBuilder out = new StringBuilder(); - out.append(originalString); - return out.toString(); + int tableIndex = 0; + for (String parameter : parameters) { + if (parameter.equals("{") || parameter.equals("}") || parameter.equals("[") || parameter.equals("]")) { + out.append(parameter + " "); + } else if (parameter.equals("shuffle") || parameter.equals("broadcast")) { + DistributeHint distributeHint = distributeHints.get(tableIndex); + if (distributeHint.isSuccess()) { + out.append(parameter + " "); + } + } else { + out.append(parameter + " "); + tableIndex++; + } + } + return "leading(" + out.toString() + ")"; } /** @@ -420,7 +455,7 @@ public class LeadingHint extends Hint { * @return plan */ public Plan generateLeadingJoinPlan() { - Stack> stack = new Stack<>(); + Stack>> stack = new Stack<>(); int index = 0; LogicalPlan logicalPlan = getLogicalPlanByName(getTablelist().get(index)); if (logicalPlan == null) { @@ -428,27 +463,28 @@ public class LeadingHint extends Hint { } logicalPlan = makeFilterPlanIfExist(getFilters(), logicalPlan); assert (logicalPlan != null); - stack.push(Pair.of(getLevellist().get(index), logicalPlan)); + stack.push(Pair.of(getLevellist().get(index), Pair.of(logicalPlan, index))); int stackTopLevel = getLevellist().get(index++); while (index < getTablelist().size()) { int currentLevel = getLevellist().get(index); if (currentLevel == stackTopLevel) { // should return error if can not found table logicalPlan = getLogicalPlanByName(getTablelist().get(index++)); + int distributeIndex = index - 1; if (logicalPlan == null) { return null; } logicalPlan = makeFilterPlanIfExist(getFilters(), logicalPlan); - Pair newStackTop = stack.peek(); + Pair> newStackTop = stack.peek(); while (!(stack.isEmpty() || stackTopLevel != newStackTop.first)) { // check join is legal and get join type newStackTop = stack.pop(); List conditions = getJoinConditions( - getFilters(), newStackTop.second, logicalPlan); + getFilters(), newStackTop.second.first, logicalPlan); Pair, List> pair = JoinUtils.extractExpressionForHashTable( - newStackTop.second.getOutput(), logicalPlan.getOutput(), conditions); + newStackTop.second.first.getOutput(), logicalPlan.getOutput(), conditions); // leading hint would set status inside if not success - JoinType joinType = computeJoinType(getBitmap(newStackTop.second), + JoinType joinType = computeJoinType(getBitmap(newStackTop.second.first), getBitmap(logicalPlan), conditions); if (joinType == null) { this.setStatus(HintStatus.SYNTAX_ERROR); @@ -461,13 +497,15 @@ public class LeadingHint extends Hint { return null; } // get joinType + DistributeHint distributeHint = getJoinHint(distributeIndex); LogicalJoin logicalJoin = new LogicalJoin<>(joinType, pair.first, pair.second, - JoinHint.NONE, + distributeHint, Optional.empty(), - newStackTop.second, + newStackTop.second.first, logicalPlan); - logicalJoin.setBitmap(LongBitmap.or(getBitmap(newStackTop.second), getBitmap(logicalPlan))); + distributeIndex = newStackTop.second.second; + logicalJoin.setBitmap(LongBitmap.or(getBitmap(newStackTop.second.first), getBitmap(logicalPlan))); if (stackTopLevel > 0) { if (index < getTablelist().size()) { if (stackTopLevel > getLevellist().get(index)) { @@ -482,7 +520,7 @@ public class LeadingHint extends Hint { } logicalPlan = logicalJoin; } - stack.push(Pair.of(stackTopLevel, logicalPlan)); + stack.push(Pair.of(stackTopLevel, Pair.of(logicalPlan, distributeIndex))); } else { // push logicalPlan = getLogicalPlanByName(getTablelist().get(index++)); @@ -490,12 +528,12 @@ public class LeadingHint extends Hint { return null; } logicalPlan = makeFilterPlanIfExist(getFilters(), logicalPlan); - stack.push(Pair.of(currentLevel, logicalPlan)); + stack.push(Pair.of(currentLevel, Pair.of(logicalPlan, index))); stackTopLevel = currentLevel; } } - LogicalJoin finalJoin = (LogicalJoin) stack.pop().second; + LogicalJoin finalJoin = (LogicalJoin) stack.pop().second.first; // we want all filters been remove assert (filters.isEmpty()); if (finalJoin != null) { @@ -504,6 +542,14 @@ public class LeadingHint extends Hint { return finalJoin; } + private DistributeHint getJoinHint(Integer index) { + if (distributeHints.get(index) == null) { + return new DistributeHint(DistributeType.NONE); + } + distributeHints.get(index).setSuccessInLeading(true); + return distributeHints.get(index); + } + private List getJoinConditions(List> filters, LogicalPlan left, LogicalPlan right) { List joinConditions = new ArrayList<>(); diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/joinorder/hypergraph/HyperGraph.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/joinorder/hypergraph/HyperGraph.java index f094efe718..d78374d134 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/joinorder/hypergraph/HyperGraph.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/joinorder/hypergraph/HyperGraph.java @@ -18,6 +18,7 @@ package org.apache.doris.nereids.jobs.joinorder.hypergraph; import org.apache.doris.common.Pair; +import org.apache.doris.nereids.hint.DistributeHint; import org.apache.doris.nereids.jobs.joinorder.hypergraph.bitmap.LongBitmap; import org.apache.doris.nereids.jobs.joinorder.hypergraph.edge.Edge; import org.apache.doris.nereids.jobs.joinorder.hypergraph.edge.FilterEdge; @@ -32,8 +33,8 @@ import org.apache.doris.nereids.trees.expressions.Alias; import org.apache.doris.nereids.trees.expressions.Expression; import org.apache.doris.nereids.trees.expressions.NamedExpression; import org.apache.doris.nereids.trees.expressions.Slot; +import org.apache.doris.nereids.trees.plans.DistributeType; import org.apache.doris.nereids.trees.plans.GroupPlan; -import org.apache.doris.nereids.trees.plans.JoinHint; import org.apache.doris.nereids.trees.plans.JoinType; import org.apache.doris.nereids.trees.plans.Plan; import org.apache.doris.nereids.trees.plans.logical.LogicalFilter; @@ -230,7 +231,8 @@ public class HyperGraph { for (Map.Entry, Pair, List>> entry : conjuncts .entrySet()) { LogicalJoin singleJoin = new LogicalJoin<>(join.getJoinType(), entry.getValue().first, - entry.getValue().second, JoinHint.NONE, join.getMarkJoinSlotReference(), + entry.getValue().second, + new DistributeHint(DistributeType.NONE), join.getMarkJoinSlotReference(), Lists.newArrayList(join.left(), join.right())); Pair ends = entry.getKey(); JoinEdge edge = new JoinEdge(singleJoin, joinEdges.size(), leftEdgeNodes.first, rightEdgeNodes.first, diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/joinorder/hypergraph/receiver/PlanReceiver.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/joinorder/hypergraph/receiver/PlanReceiver.java index e2fd4b2dee..eece2d8c3d 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/joinorder/hypergraph/receiver/PlanReceiver.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/joinorder/hypergraph/receiver/PlanReceiver.java @@ -17,6 +17,7 @@ package org.apache.doris.nereids.jobs.joinorder.hypergraph.receiver; +import org.apache.doris.nereids.hint.DistributeHint; import org.apache.doris.nereids.jobs.JobContext; import org.apache.doris.nereids.jobs.cascades.CostAndEnforcerJob; import org.apache.doris.nereids.jobs.cascades.DeriveStatsJob; @@ -34,8 +35,8 @@ import org.apache.doris.nereids.properties.PhysicalProperties; import org.apache.doris.nereids.trees.expressions.Expression; import org.apache.doris.nereids.trees.expressions.NamedExpression; import org.apache.doris.nereids.trees.expressions.Slot; +import org.apache.doris.nereids.trees.plans.DistributeType; import org.apache.doris.nereids.trees.plans.GroupPlan; -import org.apache.doris.nereids.trees.plans.JoinHint; import org.apache.doris.nereids.trees.plans.JoinType; import org.apache.doris.nereids.trees.plans.Plan; import org.apache.doris.nereids.trees.plans.logical.LogicalJoin; @@ -228,11 +229,13 @@ public class PlanReceiver implements AbstractReceiver { right, left)); } } else { - plans.add(new PhysicalHashJoin<>(joinType, hashConjuncts, otherConjuncts, JoinHint.NONE, Optional.empty(), + plans.add(new PhysicalHashJoin<>(joinType, hashConjuncts, otherConjuncts, + new DistributeHint(DistributeType.NONE), Optional.empty(), joinProperties, left, right)); if (joinType.isSwapJoinType()) { - plans.add(new PhysicalHashJoin<>(joinType.swap(), hashConjuncts, otherConjuncts, JoinHint.NONE, + plans.add(new PhysicalHashJoin<>(joinType.swap(), hashConjuncts, otherConjuncts, + new DistributeHint(DistributeType.NONE), Optional.empty(), joinProperties, right, left)); @@ -310,7 +313,8 @@ public class PlanReceiver implements AbstractReceiver { } else if (physicalPlan instanceof AbstractPhysicalJoin) { AbstractPhysicalJoin physicalJoin = (AbstractPhysicalJoin) physicalPlan; logicalPlan = new LogicalJoin<>(physicalJoin.getJoinType(), physicalJoin.getHashJoinConjuncts(), - physicalJoin.getOtherJoinConjuncts(), JoinHint.NONE, physicalJoin.getMarkJoinSlotReference(), + physicalJoin.getOtherJoinConjuncts(), + new DistributeHint(DistributeType.NONE), physicalJoin.getMarkJoinSlotReference(), groupExpression.children().stream().map(g -> new GroupPlan(g)).collect(Collectors.toList())); } else { throw new RuntimeException("DPhyp can only handle join and project operator"); diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java index 745ae17946..aaa01c78db 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java @@ -51,7 +51,7 @@ import org.apache.doris.nereids.DorisParser.ArraySliceContext; import org.apache.doris.nereids.DorisParser.BitOperationContext; import org.apache.doris.nereids.DorisParser.BooleanExpressionContext; import org.apache.doris.nereids.DorisParser.BooleanLiteralContext; -import org.apache.doris.nereids.DorisParser.BracketJoinHintContext; +import org.apache.doris.nereids.DorisParser.BracketDistributeTypeContext; import org.apache.doris.nereids.DorisParser.BracketRelationHintContext; import org.apache.doris.nereids.DorisParser.BuildModeContext; import org.apache.doris.nereids.DorisParser.CallProcedureContext; @@ -60,7 +60,7 @@ import org.apache.doris.nereids.DorisParser.CollateContext; import org.apache.doris.nereids.DorisParser.ColumnDefContext; import org.apache.doris.nereids.DorisParser.ColumnDefsContext; import org.apache.doris.nereids.DorisParser.ColumnReferenceContext; -import org.apache.doris.nereids.DorisParser.CommentJoinHintContext; +import org.apache.doris.nereids.DorisParser.CommentDistributeTypeContext; import org.apache.doris.nereids.DorisParser.CommentRelationHintContext; import org.apache.doris.nereids.DorisParser.ComparisonContext; import org.apache.doris.nereids.DorisParser.ComplexColTypeContext; @@ -201,6 +201,7 @@ import org.apache.doris.nereids.analyzer.UnboundVariable.VariableType; import org.apache.doris.nereids.exceptions.AnalysisException; import org.apache.doris.nereids.exceptions.NotSupportedException; import org.apache.doris.nereids.exceptions.ParseException; +import org.apache.doris.nereids.hint.DistributeHint; import org.apache.doris.nereids.properties.OrderKey; import org.apache.doris.nereids.properties.SelectHint; import org.apache.doris.nereids.properties.SelectHintLeading; @@ -317,7 +318,7 @@ import org.apache.doris.nereids.trees.expressions.literal.StringLiteral; import org.apache.doris.nereids.trees.expressions.literal.StructLiteral; import org.apache.doris.nereids.trees.expressions.literal.TinyIntLiteral; import org.apache.doris.nereids.trees.expressions.literal.VarcharLiteral; -import org.apache.doris.nereids.trees.plans.JoinHint; +import org.apache.doris.nereids.trees.plans.DistributeType; import org.apache.doris.nereids.trees.plans.JoinType; import org.apache.doris.nereids.trees.plans.LimitPhase; import org.apache.doris.nereids.trees.plans.Plan; @@ -2726,16 +2727,17 @@ public class LogicalPlanBuilder extends DorisParserBaseVisitor { } else { joinType = JoinType.CROSS_JOIN; } - JoinHint joinHint = Optional.ofNullable(join.joinHint()).map(hintCtx -> { - String hint = typedVisit(join.joinHint()); - if (JoinHint.JoinHintType.SHUFFLE.toString().equalsIgnoreCase(hint)) { - return JoinHint.SHUFFLE_RIGHT; - } else if (JoinHint.JoinHintType.BROADCAST.toString().equalsIgnoreCase(hint)) { - return JoinHint.BROADCAST_RIGHT; + DistributeType distributeType = Optional.ofNullable(join.distributeType()).map(hintCtx -> { + String hint = typedVisit(join.distributeType()); + if (DistributeType.JoinDistributeType.SHUFFLE.toString().equalsIgnoreCase(hint)) { + return DistributeType.SHUFFLE_RIGHT; + } else if (DistributeType.JoinDistributeType.BROADCAST.toString().equalsIgnoreCase(hint)) { + return DistributeType.BROADCAST_RIGHT; } else { throw new ParseException("Invalid join hint: " + hint, hintCtx); } - }).orElse(JoinHint.NONE); + }).orElse(DistributeType.NONE); + DistributeHint distributeHint = new DistributeHint(distributeType); // TODO: natural join, lateral join, union join JoinCriteriaContext joinCriteria = join.joinCriteria(); Optional condition = Optional.empty(); @@ -2761,15 +2763,19 @@ public class LogicalPlanBuilder extends DorisParserBaseVisitor { last = new LogicalJoin<>(joinType, ExpressionUtils.EMPTY_CONDITION, condition.map(ExpressionUtils::extractConjunction) .orElse(ExpressionUtils.EMPTY_CONDITION), - joinHint, + distributeHint, Optional.empty(), last, plan(join.relationPrimary())); } else { last = new UsingJoin<>(joinType, last, - plan(join.relationPrimary()), ImmutableList.of(), ids, joinHint); + plan(join.relationPrimary()), ImmutableList.of(), ids, distributeHint); } + if (distributeHint.distributeType != DistributeType.NONE + && !ConnectContext.get().getStatementContext().getHints().contains(distributeHint)) { + ConnectContext.get().getStatementContext().addHint(distributeHint); + } } return last; } @@ -2817,12 +2823,12 @@ public class LogicalPlanBuilder extends DorisParserBaseVisitor { } @Override - public String visitBracketJoinHint(BracketJoinHintContext ctx) { + public String visitBracketDistributeType(BracketDistributeTypeContext ctx) { return ctx.identifier().getText(); } @Override - public String visitCommentJoinHint(CommentJoinHintContext ctx) { + public String visitCommentDistributeType(CommentDistributeTypeContext ctx) { return ctx.identifier().getText(); } @@ -2874,7 +2880,7 @@ public class LogicalPlanBuilder extends DorisParserBaseVisitor { JoinType.CROSS_JOIN, ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, - JoinHint.NONE, + new DistributeHint(DistributeType.NONE), Optional.empty(), left, right); diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/DistributionSpec.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/DistributionSpec.java index 067a5dd328..cda4b82b76 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/DistributionSpec.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/DistributionSpec.java @@ -53,6 +53,10 @@ public abstract class DistributionSpec { return this.getClass().getSimpleName(); } + public String shapeInfo() { + return this.getClass().getSimpleName(); + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/RequestPropertyDeriver.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/RequestPropertyDeriver.java index 52b69399af..76fc28fc79 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/RequestPropertyDeriver.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/RequestPropertyDeriver.java @@ -19,6 +19,8 @@ package org.apache.doris.nereids.properties; import org.apache.doris.common.Pair; import org.apache.doris.nereids.PlanContext; +import org.apache.doris.nereids.hint.DistributeHint; +import org.apache.doris.nereids.hint.Hint; import org.apache.doris.nereids.jobs.JobContext; import org.apache.doris.nereids.memo.GroupExpression; import org.apache.doris.nereids.properties.DistributionSpecHash.ShuffleType; @@ -26,7 +28,7 @@ import org.apache.doris.nereids.trees.expressions.Alias; import org.apache.doris.nereids.trees.expressions.ExprId; import org.apache.doris.nereids.trees.expressions.NamedExpression; import org.apache.doris.nereids.trees.expressions.SlotReference; -import org.apache.doris.nereids.trees.plans.JoinHint; +import org.apache.doris.nereids.trees.plans.DistributeType; import org.apache.doris.nereids.trees.plans.Plan; import org.apache.doris.nereids.trees.plans.algebra.SetOperation; import org.apache.doris.nereids.trees.plans.physical.AbstractPhysicalSort; @@ -160,13 +162,15 @@ public class RequestPropertyDeriver extends PlanVisitor { @Override public Void visitPhysicalHashJoin(PhysicalHashJoin hashJoin, PlanContext context) { - JoinHint hint = hashJoin.getHint(); - if (hint == JoinHint.BROADCAST_RIGHT && JoinUtils.couldBroadcast(hashJoin)) { + DistributeHint hint = hashJoin.getDistributeHint(); + if (hint.distributeType == DistributeType.BROADCAST_RIGHT && JoinUtils.couldBroadcast(hashJoin)) { addBroadcastJoinRequestProperty(); + hint.setStatus(Hint.HintStatus.SUCCESS); return null; } - if (hint == JoinHint.SHUFFLE_RIGHT && JoinUtils.couldShuffle(hashJoin)) { + if (hint.distributeType == DistributeType.SHUFFLE_RIGHT && JoinUtils.couldShuffle(hashJoin)) { addShuffleJoinRequestProperty(hashJoin); + hint.setStatus(Hint.HintStatus.SUCCESS); return null; } // for shuffle join diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindExpression.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindExpression.java index e1b2167e79..df910ecc56 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindExpression.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindExpression.java @@ -177,7 +177,7 @@ public class BindExpression implements AnalysisRuleFactory { LogicalJoin lj = new LogicalJoin<>(using.getJoinType() == JoinType.CROSS_JOIN ? JoinType.INNER_JOIN : using.getJoinType(), using.getHashJoinConjuncts(), - using.getOtherJoinConjuncts(), using.getHint(), using.getMarkJoinSlotReference(), + using.getOtherJoinConjuncts(), using.getDistributeHint(), using.getMarkJoinSlotReference(), using.children()); List unboundSlots = lj.getHashJoinConjuncts(); Set slotNames = new HashSet<>(); @@ -227,7 +227,7 @@ public class BindExpression implements AnalysisRuleFactory { .map(expr -> TypeCoercionUtils.castIfNotSameType(expr, BooleanType.INSTANCE)) .collect(Collectors.toList()); return new LogicalJoin<>(join.getJoinType(), - hashJoinConjuncts, cond, join.getHint(), join.getMarkJoinSlotReference(), + hashJoinConjuncts, cond, join.getDistributeHint(), join.getMarkJoinSlotReference(), join.children()); }) ), diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/EliminateLogicalSelectHint.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/EliminateLogicalSelectHint.java index 73bb42ccf0..a11d52e2d6 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/EliminateLogicalSelectHint.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/EliminateLogicalSelectHint.java @@ -121,7 +121,9 @@ public class EliminateLogicalSelectHint extends OneRewriteRuleFactory { context.setLeadingJoin(false); return; } - hint.setStatus(Hint.HintStatus.SUCCESS); + if (!hint.isSyntaxError()) { + hint.setStatus(Hint.HintStatus.SUCCESS); + } statementContext.addHint(hint); context.getHintMap().put("Leading", hint); if (hints.get("ordered") != null || ConnectContext.get().getSessionVariable().isDisableJoinReorder()) { diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinLAsscom.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinLAsscom.java index f256bff004..21060fec96 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinLAsscom.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinLAsscom.java @@ -55,7 +55,7 @@ public class InnerJoinLAsscom extends OneExplorationRuleFactory { public Rule build() { return innerLogicalJoin(innerLogicalJoin(), group()) .when(topJoin -> checkReorder(topJoin, topJoin.left(), leftZigZag)) - .whenNot(join -> join.hasJoinHint() || join.left().hasJoinHint()) + .whenNot(join -> join.hasDistributeHint() || join.left().hasDistributeHint()) .whenNot(join -> join.isMarkJoin() || join.left().isMarkJoin()) .then(topJoin -> { LogicalJoin bottomJoin = topJoin.left(); diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinLAsscomProject.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinLAsscomProject.java index 297ec9d76e..086e6fb3ab 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinLAsscomProject.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinLAsscomProject.java @@ -61,7 +61,7 @@ public class InnerJoinLAsscomProject extends OneExplorationRuleFactory { public Rule build() { return innerLogicalJoin(logicalProject(innerLogicalJoin()), group()) .when(topJoin -> InnerJoinLAsscom.checkReorder(topJoin, topJoin.left().child(), enableLeftZigZag)) - .whenNot(join -> join.hasJoinHint() || join.left().child().hasJoinHint()) + .whenNot(join -> join.hasDistributeHint() || join.left().child().hasDistributeHint()) .whenNot(join -> join.isMarkJoin() || join.left().child().isMarkJoin()) .when(join -> join.left().isAllSlots()) .then(topJoin -> { diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinLeftAssociate.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinLeftAssociate.java index d552f19b16..0ec7ba0088 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinLeftAssociate.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinLeftAssociate.java @@ -50,7 +50,7 @@ public class InnerJoinLeftAssociate extends OneExplorationRuleFactory { public Rule build() { return innerLogicalJoin(group(), innerLogicalJoin()) .when(InnerJoinLeftAssociate::checkReorder) - .whenNot(join -> join.hasJoinHint() || join.right().hasJoinHint()) + .whenNot(join -> join.hasDistributeHint() || join.right().hasDistributeHint()) .whenNot(join -> join.isMarkJoin() || join.right().isMarkJoin()) .then(topJoin -> { LogicalJoin bottomJoin = topJoin.right(); diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinLeftAssociateProject.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinLeftAssociateProject.java index bb395df201..ea66ef8475 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinLeftAssociateProject.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinLeftAssociateProject.java @@ -51,7 +51,7 @@ public class InnerJoinLeftAssociateProject extends OneExplorationRuleFactory { public Rule build() { return innerLogicalJoin(group(), logicalProject(innerLogicalJoin())) .when(InnerJoinLeftAssociate::checkReorder) - .whenNot(join -> join.hasJoinHint() || join.right().child().hasJoinHint()) + .whenNot(join -> join.hasDistributeHint() || join.right().child().hasDistributeHint()) .whenNot(join -> join.isMarkJoin() || join.right().child().isMarkJoin()) .when(join -> join.right().isAllSlots()) .then(topJoin -> { diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinRightAssociate.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinRightAssociate.java index 760c4bc7b7..0f4d910af7 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinRightAssociate.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinRightAssociate.java @@ -48,7 +48,7 @@ public class InnerJoinRightAssociate extends OneExplorationRuleFactory { public Rule build() { return innerLogicalJoin(innerLogicalJoin(), group()) .when(InnerJoinRightAssociate::checkReorder) - .whenNot(join -> join.hasJoinHint() || join.left().hasJoinHint()) + .whenNot(join -> join.hasDistributeHint() || join.left().hasDistributeHint()) .whenNot(join -> join.isMarkJoin() || join.left().isMarkJoin()) .then(topJoin -> { LogicalJoin bottomJoin = topJoin.left(); diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinRightAssociateProject.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinRightAssociateProject.java index 9e9dfcb100..910d5ebd00 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinRightAssociateProject.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinRightAssociateProject.java @@ -49,7 +49,7 @@ public class InnerJoinRightAssociateProject extends OneExplorationRuleFactory { public Rule build() { return innerLogicalJoin(logicalProject(innerLogicalJoin()), group()) .when(InnerJoinRightAssociate::checkReorder) - .whenNot(join -> join.hasJoinHint() || join.left().child().hasJoinHint()) + .whenNot(join -> join.hasDistributeHint() || join.left().child().hasDistributeHint()) .whenNot(join -> join.isMarkJoin() || join.left().child().isMarkJoin()) .when(join -> join.left().isAllSlots()) .then(topJoin -> { diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinCommute.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinCommute.java index efdd46f821..0491abd8f8 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinCommute.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinCommute.java @@ -57,7 +57,7 @@ public class JoinCommute extends OneExplorationRuleFactory { .when(join -> !justNonInner || !join.getJoinType().isInnerJoin()) .when(join -> checkReorder(join)) .when(join -> check(swapType, join)) - .whenNot(LogicalJoin::hasJoinHint) + .whenNot(LogicalJoin::hasDistributeHint) .whenNot(join -> joinOrderMatchBitmapRuntimeFilterOrder(join)) .whenNot(LogicalJoin::isMarkJoin) .then(join -> { diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchange.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchange.java index 08c01da35c..b24724c3f8 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchange.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchange.java @@ -17,13 +17,14 @@ package org.apache.doris.nereids.rules.exploration.join; +import org.apache.doris.nereids.hint.DistributeHint; import org.apache.doris.nereids.rules.Rule; import org.apache.doris.nereids.rules.RuleType; import org.apache.doris.nereids.rules.exploration.OneExplorationRuleFactory; import org.apache.doris.nereids.trees.expressions.ExprId; import org.apache.doris.nereids.trees.expressions.Expression; +import org.apache.doris.nereids.trees.plans.DistributeType; import org.apache.doris.nereids.trees.plans.GroupPlan; -import org.apache.doris.nereids.trees.plans.JoinHint; import org.apache.doris.nereids.trees.plans.JoinType; import org.apache.doris.nereids.trees.plans.Plan; import org.apache.doris.nereids.trees.plans.logical.LogicalJoin; @@ -52,7 +53,8 @@ public class JoinExchange extends OneExplorationRuleFactory { public Rule build() { return innerLogicalJoin(innerLogicalJoin(), innerLogicalJoin()) .when(JoinExchange::checkReorder) - .whenNot(join -> join.hasJoinHint() || join.left().hasJoinHint() || join.right().hasJoinHint()) + .whenNot(join -> join.hasDistributeHint() + || join.left().hasDistributeHint() || join.right().hasDistributeHint()) .whenNot(join -> join.isMarkJoin() || join.left().isMarkJoin() || join.right().isMarkJoin()) .then(topJoin -> { LogicalJoin leftJoin = topJoin.left(); @@ -85,11 +87,14 @@ public class JoinExchange extends OneExplorationRuleFactory { } LogicalJoin newLeftJoin = new LogicalJoin<>(JoinType.INNER_JOIN, - newLeftJoinHashJoinConjuncts, newLeftJoinOtherJoinConjuncts, JoinHint.NONE, a, c); + newLeftJoinHashJoinConjuncts, newLeftJoinOtherJoinConjuncts, + new DistributeHint(DistributeType.NONE), a, c); LogicalJoin newRightJoin = new LogicalJoin<>(JoinType.INNER_JOIN, - newRightJoinHashJoinConjuncts, newRightJoinOtherJoinConjuncts, JoinHint.NONE, b, d); + newRightJoinHashJoinConjuncts, newRightJoinOtherJoinConjuncts, + new DistributeHint(DistributeType.NONE), b, d); LogicalJoin newTopJoin = new LogicalJoin<>(JoinType.INNER_JOIN, - newTopJoinHashJoinConjuncts, newTopJoinOtherJoinConjuncts, JoinHint.NONE, + newTopJoinHashJoinConjuncts, newTopJoinOtherJoinConjuncts, + new DistributeHint(DistributeType.NONE), newLeftJoin, newRightJoin); newTopJoin.getJoinReorderContext().setHasExchange(true); diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchangeBothProject.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchangeBothProject.java index ebac66c31c..ec9f016863 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchangeBothProject.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchangeBothProject.java @@ -17,14 +17,15 @@ package org.apache.doris.nereids.rules.exploration.join; +import org.apache.doris.nereids.hint.DistributeHint; import org.apache.doris.nereids.rules.Rule; import org.apache.doris.nereids.rules.RuleType; import org.apache.doris.nereids.rules.exploration.CBOUtils; import org.apache.doris.nereids.rules.exploration.OneExplorationRuleFactory; import org.apache.doris.nereids.trees.expressions.ExprId; import org.apache.doris.nereids.trees.expressions.Expression; +import org.apache.doris.nereids.trees.plans.DistributeType; import org.apache.doris.nereids.trees.plans.GroupPlan; -import org.apache.doris.nereids.trees.plans.JoinHint; import org.apache.doris.nereids.trees.plans.JoinType; import org.apache.doris.nereids.trees.plans.Plan; import org.apache.doris.nereids.trees.plans.logical.LogicalJoin; @@ -56,8 +57,8 @@ public class JoinExchangeBothProject extends OneExplorationRuleFactory { return innerLogicalJoin(logicalProject(innerLogicalJoin()), logicalProject(innerLogicalJoin())) .when(JoinExchange::checkReorder) .when(join -> join.left().isAllSlots() && join.right().isAllSlots()) - .whenNot(join -> join.hasJoinHint() - || join.left().child().hasJoinHint() || join.right().child().hasJoinHint()) + .whenNot(join -> join.hasDistributeHint() + || join.left().child().hasDistributeHint() || join.right().child().hasDistributeHint()) .whenNot(join -> join.isMarkJoin() || join.left().child().isMarkJoin() || join.right().child().isMarkJoin()) .then(topJoin -> { LogicalJoin leftJoin = topJoin.left().child(); @@ -90,16 +91,19 @@ public class JoinExchangeBothProject extends OneExplorationRuleFactory { } LogicalJoin newLeftJoin = new LogicalJoin<>(JoinType.INNER_JOIN, - newLeftJoinHashJoinConjuncts, newLeftJoinOtherJoinConjuncts, JoinHint.NONE, a, c); + newLeftJoinHashJoinConjuncts, newLeftJoinOtherJoinConjuncts, + new DistributeHint(DistributeType.NONE), a, c); LogicalJoin newRightJoin = new LogicalJoin<>(JoinType.INNER_JOIN, - newRightJoinHashJoinConjuncts, newRightJoinOtherJoinConjuncts, JoinHint.NONE, b, d); + newRightJoinHashJoinConjuncts, newRightJoinOtherJoinConjuncts, + new DistributeHint(DistributeType.NONE), b, d); Set topUsedExprIds = new HashSet<>(topJoin.getOutputExprIdSet()); newTopJoinHashJoinConjuncts.forEach(expr -> topUsedExprIds.addAll(expr.getInputSlotExprIds())); newTopJoinOtherJoinConjuncts.forEach(expr -> topUsedExprIds.addAll(expr.getInputSlotExprIds())); Plan left = CBOUtils.newProject(topUsedExprIds, newLeftJoin); Plan right = CBOUtils.newProject(topUsedExprIds, newRightJoin); LogicalJoin newTopJoin = new LogicalJoin<>(JoinType.INNER_JOIN, - newTopJoinHashJoinConjuncts, newTopJoinOtherJoinConjuncts, JoinHint.NONE, + newTopJoinHashJoinConjuncts, newTopJoinOtherJoinConjuncts, + new DistributeHint(DistributeType.NONE), left, right); newTopJoin.getJoinReorderContext().setHasExchange(true); diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchangeLeftProject.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchangeLeftProject.java index d3e291f13b..0010943ef5 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchangeLeftProject.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchangeLeftProject.java @@ -17,14 +17,15 @@ package org.apache.doris.nereids.rules.exploration.join; +import org.apache.doris.nereids.hint.DistributeHint; import org.apache.doris.nereids.rules.Rule; import org.apache.doris.nereids.rules.RuleType; import org.apache.doris.nereids.rules.exploration.CBOUtils; import org.apache.doris.nereids.rules.exploration.OneExplorationRuleFactory; import org.apache.doris.nereids.trees.expressions.ExprId; import org.apache.doris.nereids.trees.expressions.Expression; +import org.apache.doris.nereids.trees.plans.DistributeType; import org.apache.doris.nereids.trees.plans.GroupPlan; -import org.apache.doris.nereids.trees.plans.JoinHint; import org.apache.doris.nereids.trees.plans.JoinType; import org.apache.doris.nereids.trees.plans.Plan; import org.apache.doris.nereids.trees.plans.logical.LogicalJoin; @@ -56,8 +57,8 @@ public class JoinExchangeLeftProject extends OneExplorationRuleFactory { return innerLogicalJoin(logicalProject(innerLogicalJoin()), innerLogicalJoin()) .when(JoinExchange::checkReorder) .when(join -> join.left().isAllSlots()) - .whenNot(join -> join.hasJoinHint() - || join.left().child().hasJoinHint() || join.right().hasJoinHint()) + .whenNot(join -> join.hasDistributeHint() + || join.left().child().hasDistributeHint() || join.right().hasDistributeHint()) .whenNot(join -> join.isMarkJoin() || join.left().child().isMarkJoin() || join.right().isMarkJoin()) .then(topJoin -> { LogicalJoin leftJoin = topJoin.left().child(); @@ -90,16 +91,19 @@ public class JoinExchangeLeftProject extends OneExplorationRuleFactory { } LogicalJoin newLeftJoin = new LogicalJoin<>(JoinType.INNER_JOIN, - newLeftJoinHashJoinConjuncts, newLeftJoinOtherJoinConjuncts, JoinHint.NONE, a, c); + newLeftJoinHashJoinConjuncts, newLeftJoinOtherJoinConjuncts, + new DistributeHint(DistributeType.NONE), a, c); LogicalJoin newRightJoin = new LogicalJoin<>(JoinType.INNER_JOIN, - newRightJoinHashJoinConjuncts, newRightJoinOtherJoinConjuncts, JoinHint.NONE, b, d); + newRightJoinHashJoinConjuncts, newRightJoinOtherJoinConjuncts, + new DistributeHint(DistributeType.NONE), b, d); Set topUsedExprIds = new HashSet<>(topJoin.getOutputExprIdSet()); newTopJoinHashJoinConjuncts.forEach(expr -> topUsedExprIds.addAll(expr.getInputSlotExprIds())); newTopJoinOtherJoinConjuncts.forEach(expr -> topUsedExprIds.addAll(expr.getInputSlotExprIds())); Plan left = CBOUtils.newProject(topUsedExprIds, newLeftJoin); Plan right = CBOUtils.newProject(topUsedExprIds, newRightJoin); LogicalJoin newTopJoin = new LogicalJoin<>(JoinType.INNER_JOIN, - newTopJoinHashJoinConjuncts, newTopJoinOtherJoinConjuncts, JoinHint.NONE, + newTopJoinHashJoinConjuncts, newTopJoinOtherJoinConjuncts, + new DistributeHint(DistributeType.NONE), left, right); newTopJoin.getJoinReorderContext().setHasExchange(true); diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchangeRightProject.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchangeRightProject.java index ff44c8ea10..8ba74373e5 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchangeRightProject.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchangeRightProject.java @@ -17,14 +17,15 @@ package org.apache.doris.nereids.rules.exploration.join; +import org.apache.doris.nereids.hint.DistributeHint; import org.apache.doris.nereids.rules.Rule; import org.apache.doris.nereids.rules.RuleType; import org.apache.doris.nereids.rules.exploration.CBOUtils; import org.apache.doris.nereids.rules.exploration.OneExplorationRuleFactory; import org.apache.doris.nereids.trees.expressions.ExprId; import org.apache.doris.nereids.trees.expressions.Expression; +import org.apache.doris.nereids.trees.plans.DistributeType; import org.apache.doris.nereids.trees.plans.GroupPlan; -import org.apache.doris.nereids.trees.plans.JoinHint; import org.apache.doris.nereids.trees.plans.JoinType; import org.apache.doris.nereids.trees.plans.Plan; import org.apache.doris.nereids.trees.plans.logical.LogicalJoin; @@ -56,8 +57,8 @@ public class JoinExchangeRightProject extends OneExplorationRuleFactory { return innerLogicalJoin(innerLogicalJoin(), logicalProject(innerLogicalJoin())) .when(JoinExchange::checkReorder) .when(join -> join.right().isAllSlots()) - .whenNot(join -> join.hasJoinHint() - || join.left().hasJoinHint() || join.right().child().hasJoinHint()) + .whenNot(join -> join.hasDistributeHint() + || join.left().hasDistributeHint() || join.right().child().hasDistributeHint()) .whenNot(join -> join.isMarkJoin() || join.left().isMarkJoin() || join.right().child().isMarkJoin()) .then(topJoin -> { LogicalJoin leftJoin = topJoin.left(); @@ -90,16 +91,19 @@ public class JoinExchangeRightProject extends OneExplorationRuleFactory { } LogicalJoin newLeftJoin = new LogicalJoin<>(JoinType.INNER_JOIN, - newLeftJoinHashJoinConjuncts, newLeftJoinOtherJoinConjuncts, JoinHint.NONE, a, c); + newLeftJoinHashJoinConjuncts, newLeftJoinOtherJoinConjuncts, + new DistributeHint(DistributeType.NONE), a, c); LogicalJoin newRightJoin = new LogicalJoin<>(JoinType.INNER_JOIN, - newRightJoinHashJoinConjuncts, newRightJoinOtherJoinConjuncts, JoinHint.NONE, b, d); + newRightJoinHashJoinConjuncts, newRightJoinOtherJoinConjuncts, + new DistributeHint(DistributeType.NONE), b, d); Set topUsedExprIds = new HashSet<>(topJoin.getOutputExprIdSet()); newTopJoinHashJoinConjuncts.forEach(expr -> topUsedExprIds.addAll(expr.getInputSlotExprIds())); newTopJoinOtherJoinConjuncts.forEach(expr -> topUsedExprIds.addAll(expr.getInputSlotExprIds())); Plan left = CBOUtils.newProject(topUsedExprIds, newLeftJoin); Plan right = CBOUtils.newProject(topUsedExprIds, newRightJoin); LogicalJoin newTopJoin = new LogicalJoin<>(JoinType.INNER_JOIN, - newTopJoinHashJoinConjuncts, newTopJoinOtherJoinConjuncts, JoinHint.NONE, + newTopJoinHashJoinConjuncts, newTopJoinOtherJoinConjuncts, + new DistributeHint(DistributeType.NONE), left, right); newTopJoin.getJoinReorderContext().setHasExchange(true); diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/LogicalJoinSemiJoinTranspose.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/LogicalJoinSemiJoinTranspose.java index a1631386b8..ea4bc59dbb 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/LogicalJoinSemiJoinTranspose.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/LogicalJoinSemiJoinTranspose.java @@ -43,7 +43,7 @@ public class LogicalJoinSemiJoinTranspose implements ExplorationRuleFactory { .when(topJoin -> (topJoin.left().getJoinType().isLeftSemiOrAntiJoin() && (topJoin.getJoinType().isInnerJoin() || topJoin.getJoinType().isLeftOuterJoin()))) - .whenNot(topJoin -> topJoin.hasJoinHint() || topJoin.left().hasJoinHint() + .whenNot(topJoin -> topJoin.hasDistributeHint() || topJoin.left().hasDistributeHint() || topJoin.left().isMarkJoin()) .whenNot(LogicalJoin::isMarkJoin) .then(topJoin -> { @@ -60,7 +60,7 @@ public class LogicalJoinSemiJoinTranspose implements ExplorationRuleFactory { .when(topJoin -> (topJoin.right().getJoinType().isLeftSemiOrAntiJoin() && (topJoin.getJoinType().isInnerJoin() || topJoin.getJoinType().isRightOuterJoin()))) - .whenNot(topJoin -> topJoin.hasJoinHint() || topJoin.right().hasJoinHint() + .whenNot(topJoin -> topJoin.hasDistributeHint() || topJoin.right().hasDistributeHint() || topJoin.right().isMarkJoin()) .whenNot(LogicalJoin::isMarkJoin) .then(topJoin -> { diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/LogicalJoinSemiJoinTransposeProject.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/LogicalJoinSemiJoinTransposeProject.java index 3986cc8bb5..455f526aec 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/LogicalJoinSemiJoinTransposeProject.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/LogicalJoinSemiJoinTransposeProject.java @@ -43,8 +43,8 @@ public class LogicalJoinSemiJoinTransposeProject implements ExplorationRuleFacto .when(topJoin -> (topJoin.left().child().getJoinType().isLeftSemiOrAntiJoin() && (topJoin.getJoinType().isInnerJoin() || topJoin.getJoinType().isLeftOuterJoin()))) - .whenNot(topJoin -> topJoin.hasJoinHint() - || topJoin.left().child().hasJoinHint() + .whenNot(topJoin -> topJoin.hasDistributeHint() + || topJoin.left().child().hasDistributeHint() || topJoin.left().child().isMarkJoin()) .whenNot(LogicalJoin::isMarkJoin) .when(join -> join.left().isAllSlots()) @@ -65,8 +65,8 @@ public class LogicalJoinSemiJoinTransposeProject implements ExplorationRuleFacto .when(topJoin -> (topJoin.right().child().getJoinType().isLeftSemiOrAntiJoin() && (topJoin.getJoinType().isInnerJoin() || topJoin.getJoinType().isRightOuterJoin()))) - .whenNot(topJoin -> topJoin.hasJoinHint() - || topJoin.right().child().hasJoinHint() + .whenNot(topJoin -> topJoin.hasDistributeHint() + || topJoin.right().child().hasDistributeHint() || topJoin.right().child().isMarkJoin()) .when(join -> join.right().isAllSlots()) .then(topJoin -> { diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/OuterJoinAssocProject.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/OuterJoinAssocProject.java index cbbd72b5c8..512aec7bbc 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/OuterJoinAssocProject.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/OuterJoinAssocProject.java @@ -56,7 +56,7 @@ public class OuterJoinAssocProject extends OneExplorationRuleFactory { .when(join -> OuterJoinAssoc.VALID_TYPE_PAIR_SET.contains( Pair.of(join.left().child().getJoinType(), join.getJoinType()))) .when(topJoin -> OuterJoinLAsscom.checkReorder(topJoin, topJoin.left().child())) - .whenNot(join -> join.hasJoinHint() || join.left().child().hasJoinHint()) + .whenNot(join -> join.hasDistributeHint() || join.left().child().hasDistributeHint()) .whenNot(join -> join.isMarkJoin() || join.left().child().isMarkJoin()) .when(join -> OuterJoinAssoc.checkCondition(join, join.left().child().left().getOutputSet())) .when(join -> join.left().isAllSlots()) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/OuterJoinLAsscom.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/OuterJoinLAsscom.java index cc84a7aff2..729c1efa2e 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/OuterJoinLAsscom.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/OuterJoinLAsscom.java @@ -62,7 +62,7 @@ public class OuterJoinLAsscom extends OneExplorationRuleFactory { return logicalJoin(logicalJoin(), group()) .when(join -> VALID_TYPE_PAIR_SET.contains(Pair.of(join.left().getJoinType(), join.getJoinType()))) .when(topJoin -> checkReorder(topJoin, topJoin.left())) - .whenNot(join -> join.hasJoinHint() || join.left().hasJoinHint()) + .whenNot(join -> join.hasDistributeHint() || join.left().hasDistributeHint()) .when(topJoin -> checkCondition(topJoin, topJoin.left().right().getOutputExprIdSet())) .whenNot(LogicalJoin::isMarkJoin) .then(topJoin -> { diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/OuterJoinLAsscomProject.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/OuterJoinLAsscomProject.java index 1ad60b39f1..8349559bbc 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/OuterJoinLAsscomProject.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/OuterJoinLAsscomProject.java @@ -53,7 +53,7 @@ public class OuterJoinLAsscomProject extends OneExplorationRuleFactory { .when(join -> OuterJoinLAsscom.VALID_TYPE_PAIR_SET.contains( Pair.of(join.left().child().getJoinType(), join.getJoinType()))) .when(topJoin -> OuterJoinLAsscom.checkReorder(topJoin, topJoin.left().child())) - .whenNot(join -> join.hasJoinHint() || join.left().child().hasJoinHint()) + .whenNot(join -> join.hasDistributeHint() || join.left().child().hasDistributeHint()) .whenNot(join -> join.isMarkJoin() || join.left().child().isMarkJoin()) .when(topJoin -> OuterJoinLAsscom.checkCondition(topJoin, topJoin.left().child().right().getOutputExprIdSet())) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushDownProjectThroughInnerOuterJoin.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushDownProjectThroughInnerOuterJoin.java index 7aca58e098..d920fdffc0 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushDownProjectThroughInnerOuterJoin.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushDownProjectThroughInnerOuterJoin.java @@ -61,7 +61,7 @@ public class PushDownProjectThroughInnerOuterJoin implements ExplorationRuleFact || j.left().child().getJoinType().isInnerJoin()) // Just pushdown project with non-column expr like (t.id + 1) .whenNot(j -> j.left().isAllSlots()) - .whenNot(j -> j.left().child().hasJoinHint()) + .whenNot(j -> j.left().child().hasDistributeHint()) .then(topJoin -> { LogicalProject> project = topJoin.left(); Plan newLeft = pushdownProject(project); @@ -75,7 +75,7 @@ public class PushDownProjectThroughInnerOuterJoin implements ExplorationRuleFact || j.right().child().getJoinType().isInnerJoin()) // Just pushdown project with non-column expr like (t.id + 1) .whenNot(j -> j.right().isAllSlots()) - .whenNot(j -> j.right().child().hasJoinHint()) + .whenNot(j -> j.right().child().hasDistributeHint()) .then(topJoin -> { LogicalProject> project = topJoin.right(); Plan newRight = pushdownProject(project); diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushDownProjectThroughSemiJoin.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushDownProjectThroughSemiJoin.java index f2a33b78a6..0629092f45 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushDownProjectThroughSemiJoin.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushDownProjectThroughSemiJoin.java @@ -58,7 +58,7 @@ public class PushDownProjectThroughSemiJoin implements ExplorationRuleFactory { .when(j -> j.left().child().getJoinType().isLeftSemiOrAntiJoin()) // Just pushdown project with non-column expr like (t.id + 1) .whenNot(j -> j.left().isAllSlots()) - .whenNot(j -> j.left().child().hasJoinHint()) + .whenNot(j -> j.left().child().hasDistributeHint()) .then(topJoin -> { LogicalProject> project = topJoin.left(); Plan newLeft = pushdownProject(project); @@ -69,7 +69,7 @@ public class PushDownProjectThroughSemiJoin implements ExplorationRuleFactory { .when(j -> j.right().child().getJoinType().isLeftSemiOrAntiJoin()) // Just pushdown project with non-column expr like (t.id + 1) .whenNot(j -> j.right().isAllSlots()) - .whenNot(j -> j.right().child().hasJoinHint()) + .whenNot(j -> j.right().child().hasDistributeHint()) .then(topJoin -> { LogicalProject> project = topJoin.right(); Plan newRight = pushdownProject(project); diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/SemiJoinSemiJoinTranspose.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/SemiJoinSemiJoinTranspose.java index 12966e9ac8..a2fedbd1be 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/SemiJoinSemiJoinTranspose.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/SemiJoinSemiJoinTranspose.java @@ -62,7 +62,7 @@ public class SemiJoinSemiJoinTranspose extends OneExplorationRuleFactory { public Rule build() { return logicalJoin(logicalJoin(), group()) .when(this::typeChecker) - .whenNot(join -> join.hasJoinHint() || join.left().hasJoinHint()) + .whenNot(join -> join.hasDistributeHint() || join.left().hasDistributeHint()) .whenNot(join -> join.isMarkJoin() || join.left().isMarkJoin()) .then(topJoin -> { LogicalJoin bottomJoin = topJoin.left(); diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/SemiJoinSemiJoinTransposeProject.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/SemiJoinSemiJoinTransposeProject.java index 13e9c7cd46..8c16d529e2 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/SemiJoinSemiJoinTransposeProject.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/SemiJoinSemiJoinTransposeProject.java @@ -54,7 +54,7 @@ public class SemiJoinSemiJoinTransposeProject extends OneExplorationRuleFactory return logicalJoin(logicalProject(logicalJoin()), group()) .when(this::typeChecker) .when(topSemi -> InnerJoinLAsscom.checkReorder(topSemi, topSemi.left().child(), false)) - .whenNot(join -> join.hasJoinHint() || join.left().child().hasJoinHint()) + .whenNot(join -> join.hasDistributeHint() || join.left().child().hasDistributeHint()) .whenNot(join -> join.isMarkJoin() || join.left().child().isMarkJoin()) .when(join -> join.left().isAllSlots()) .then(topSemi -> { diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/ExpressionRewrite.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/ExpressionRewrite.java index 676c079e03..ebe27c0cfe 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/ExpressionRewrite.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/ExpressionRewrite.java @@ -203,7 +203,7 @@ public class ExpressionRewrite implements RewriteRuleFactory { return join; } return new LogicalJoin<>(join.getJoinType(), rewriteHashJoinConjuncts, - rewriteOtherJoinConjuncts, join.getHint(), join.getMarkJoinSlotReference(), + rewriteOtherJoinConjuncts, join.getDistributeHint(), join.getMarkJoinSlotReference(), join.children()); }).toRule(RuleType.REWRITE_JOIN_EXPRESSION); } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/implementation/LogicalJoinToHashJoin.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/implementation/LogicalJoinToHashJoin.java index 0c175f0d63..1ab830d57b 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/implementation/LogicalJoinToHashJoin.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/implementation/LogicalJoinToHashJoin.java @@ -34,7 +34,7 @@ public class LogicalJoinToHashJoin extends OneImplementationRuleFactory { join.getJoinType(), join.getHashJoinConjuncts(), join.getOtherJoinConjuncts(), - join.getHint(), + join.getDistributeHint(), join.getMarkJoinSlotReference(), join.getLogicalProperties(), join.left(), diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/ExistsApplyToJoin.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/ExistsApplyToJoin.java index f4b2cbc9a1..52c09a7e5a 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/ExistsApplyToJoin.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/ExistsApplyToJoin.java @@ -17,6 +17,7 @@ package org.apache.doris.nereids.rules.rewrite; +import org.apache.doris.nereids.hint.DistributeHint; import org.apache.doris.nereids.rules.Rule; import org.apache.doris.nereids.rules.RuleType; import org.apache.doris.nereids.trees.expressions.Alias; @@ -25,7 +26,7 @@ import org.apache.doris.nereids.trees.expressions.Exists; import org.apache.doris.nereids.trees.expressions.Expression; import org.apache.doris.nereids.trees.expressions.functions.agg.Count; import org.apache.doris.nereids.trees.expressions.literal.IntegerLiteral; -import org.apache.doris.nereids.trees.plans.JoinHint; +import org.apache.doris.nereids.trees.plans.DistributeType; import org.apache.doris.nereids.trees.plans.JoinType; import org.apache.doris.nereids.trees.plans.LimitPhase; import org.apache.doris.nereids.trees.plans.Plan; @@ -96,7 +97,7 @@ public class ExistsApplyToJoin extends OneRewriteRuleFactory { predicate != null ? ExpressionUtils.extractConjunction(predicate) : ExpressionUtils.EMPTY_CONDITION, - JoinHint.NONE, + new DistributeHint(DistributeType.NONE), apply.getMarkJoinSlotReference(), apply.children()); } else { @@ -104,7 +105,7 @@ public class ExistsApplyToJoin extends OneRewriteRuleFactory { predicate != null ? ExpressionUtils.extractConjunction(predicate) : ExpressionUtils.EMPTY_CONDITION, - JoinHint.NONE, + new DistributeHint(DistributeType.NONE), apply.getMarkJoinSlotReference(), apply.children()); } @@ -124,7 +125,8 @@ public class ExistsApplyToJoin extends OneRewriteRuleFactory { LogicalAggregate newAgg = new LogicalAggregate<>(new ArrayList<>(), ImmutableList.of(alias), newLimit); LogicalJoin newJoin = new LogicalJoin<>(JoinType.CROSS_JOIN, ExpressionUtils.EMPTY_CONDITION, - ExpressionUtils.EMPTY_CONDITION, JoinHint.NONE, unapply.getMarkJoinSlotReference(), + ExpressionUtils.EMPTY_CONDITION, + new DistributeHint(DistributeType.NONE), unapply.getMarkJoinSlotReference(), (LogicalPlan) unapply.left(), newAgg); return new LogicalFilter<>(ImmutableSet.of(new EqualTo(newAgg.getOutput().get(0), new IntegerLiteral(0))), newJoin); @@ -134,6 +136,7 @@ public class ExistsApplyToJoin extends OneRewriteRuleFactory { LogicalLimit newLimit = new LogicalLimit<>(1, 0, LimitPhase.ORIGIN, (LogicalPlan) unapply.right()); return new LogicalJoin<>(JoinType.CROSS_JOIN, ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, - JoinHint.NONE, unapply.getMarkJoinSlotReference(), (LogicalPlan) unapply.left(), newLimit); + new DistributeHint(DistributeType.NONE), unapply.getMarkJoinSlotReference(), + (LogicalPlan) unapply.left(), newLimit); } } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/ExtractFilterFromCrossJoin.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/ExtractFilterFromCrossJoin.java index 779425e2e1..5d360d1a0e 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/ExtractFilterFromCrossJoin.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/ExtractFilterFromCrossJoin.java @@ -40,7 +40,7 @@ public class ExtractFilterFromCrossJoin extends OneRewriteRuleFactory { return crossLogicalJoin() .then(join -> { LogicalJoin newJoin = new LogicalJoin<>(JoinType.CROSS_JOIN, - ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, join.getHint(), + ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, join.getDistributeHint(), join.getMarkJoinSlotReference(), join.children()); Set predicates = Stream.concat(join.getHashJoinConjuncts().stream(), join.getOtherJoinConjuncts().stream()) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/FindHashConditionForJoin.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/FindHashConditionForJoin.java index 8dc1ad137c..fe51a7d830 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/FindHashConditionForJoin.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/FindHashConditionForJoin.java @@ -72,7 +72,7 @@ public class FindHashConditionForJoin extends OneRewriteRuleFactory { return new LogicalJoin<>(joinType, combinedHashJoinConjuncts, remainedNonHashJoinConjuncts, - join.getHint(), + join.getDistributeHint(), join.getMarkJoinSlotReference(), join.children()); }).toRule(RuleType.FIND_HASH_CONDITION_FOR_JOIN); diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/InApplyToJoin.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/InApplyToJoin.java index 5a1ba7e22e..054b92c9f7 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/InApplyToJoin.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/InApplyToJoin.java @@ -18,6 +18,7 @@ package org.apache.doris.nereids.rules.rewrite; import org.apache.doris.nereids.exceptions.AnalysisException; +import org.apache.doris.nereids.hint.DistributeHint; import org.apache.doris.nereids.rules.Rule; import org.apache.doris.nereids.rules.RuleType; import org.apache.doris.nereids.trees.expressions.Alias; @@ -29,7 +30,7 @@ import org.apache.doris.nereids.trees.expressions.NamedExpression; import org.apache.doris.nereids.trees.expressions.Not; import org.apache.doris.nereids.trees.expressions.functions.agg.BitmapUnion; import org.apache.doris.nereids.trees.expressions.functions.scalar.BitmapContains; -import org.apache.doris.nereids.trees.plans.JoinHint; +import org.apache.doris.nereids.trees.plans.DistributeType; import org.apache.doris.nereids.trees.plans.JoinType; import org.apache.doris.nereids.trees.plans.Plan; import org.apache.doris.nereids.trees.plans.logical.LogicalAggregate; @@ -88,7 +89,7 @@ public class InApplyToJoin extends OneRewriteRuleFactory { } return new LogicalJoin<>(JoinType.LEFT_SEMI_JOIN, Lists.newArrayList(), Lists.newArrayList(expr), - JoinHint.NONE, + new DistributeHint(DistributeType.NONE), apply.left(), agg); } @@ -118,12 +119,12 @@ public class InApplyToJoin extends OneRewriteRuleFactory { predicate.nullable() && !apply.isCorrelated() ? JoinType.NULL_AWARE_LEFT_ANTI_JOIN : JoinType.LEFT_ANTI_JOIN, - Lists.newArrayList(), conjuncts, JoinHint.NONE, + Lists.newArrayList(), conjuncts, new DistributeHint(DistributeType.NONE), apply.getMarkJoinSlotReference(), apply.children()); } else { return new LogicalJoin<>(JoinType.LEFT_SEMI_JOIN, Lists.newArrayList(), conjuncts, - JoinHint.NONE, apply.getMarkJoinSlotReference(), + new DistributeHint(DistributeType.NONE), apply.getMarkJoinSlotReference(), apply.children()); } }).toRule(RuleType.IN_APPLY_TO_JOIN); diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/OrExpansion.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/OrExpansion.java index 199e8c8209..1e4d7793ba 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/OrExpansion.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/OrExpansion.java @@ -176,7 +176,7 @@ public class OrExpansion extends OneExplorationRuleFactory { Expression hashCond = disjunctions.get(0); hashCond = hashCond.rewriteUp(s -> replaced.containsKey(s) ? replaced.get(s) : s); Plan newPlan = new LogicalJoin<>(JoinType.LEFT_ANTI_JOIN, Lists.newArrayList(hashCond), - otherConditions, originJoin.getHint(), + otherConditions, originJoin.getDistributeHint(), originJoin.getMarkJoinSlotReference(), left, right); if (hashCond.children().stream().anyMatch(e -> !(e instanceof Slot))) { Plan normalizedPlan = PushDownExpressionsInHashCondition.pushDownHashExpression( @@ -193,7 +193,7 @@ public class OrExpansion extends OneExplorationRuleFactory { newReplaced.putAll(newRight.getProducerToConsumerOutputMap()); hashCond = hashCond.rewriteUp(s -> newReplaced.containsKey(s) ? newReplaced.get(s) : s); newPlan = new LogicalJoin<>(JoinType.LEFT_ANTI_JOIN, Lists.newArrayList(hashCond), - new ArrayList<>(), originJoin.getHint(), + new ArrayList<>(), originJoin.getDistributeHint(), originJoin.getMarkJoinSlotReference(), newPlan, newRight); if (hashCond.children().stream().anyMatch(e -> !(e instanceof Slot))) { newPlan = PushDownExpressionsInHashCondition.pushDownHashExpression( @@ -253,7 +253,7 @@ public class OrExpansion extends OneExplorationRuleFactory { .collect(Collectors.toList()); LogicalJoin newJoin = new LogicalJoin<>( - JoinType.INNER_JOIN, hashCond, otherCond, join.getHint(), + JoinType.INNER_JOIN, hashCond, otherCond, join.getDistributeHint(), join.getMarkJoinSlotReference(), left, right); if (newJoin.getHashJoinConjuncts().stream() .anyMatch(equalTo -> equalTo.children().stream().anyMatch(e -> !(e instanceof Slot)))) { diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PullUpJoinFromUnionAll.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PullUpJoinFromUnionAll.java index 16d61731d3..7492319d4b 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PullUpJoinFromUnionAll.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PullUpJoinFromUnionAll.java @@ -20,6 +20,7 @@ package org.apache.doris.nereids.rules.rewrite; import org.apache.doris.catalog.constraint.ForeignKeyConstraint; import org.apache.doris.catalog.constraint.PrimaryKeyConstraint; import org.apache.doris.catalog.constraint.UniqueConstraint; +import org.apache.doris.nereids.hint.DistributeHint; import org.apache.doris.nereids.jobs.JobContext; import org.apache.doris.nereids.rules.Rule; import org.apache.doris.nereids.rules.RuleType; @@ -31,7 +32,7 @@ import org.apache.doris.nereids.trees.expressions.NamedExpression; import org.apache.doris.nereids.trees.expressions.Slot; import org.apache.doris.nereids.trees.expressions.SlotReference; import org.apache.doris.nereids.trees.expressions.literal.Literal; -import org.apache.doris.nereids.trees.plans.JoinHint; +import org.apache.doris.nereids.trees.plans.DistributeType; import org.apache.doris.nereids.trees.plans.JoinType; import org.apache.doris.nereids.trees.plans.Plan; import org.apache.doris.nereids.trees.plans.algebra.SetOperation.Qualifier; @@ -521,7 +522,7 @@ public class PullUpJoinFromUnionAll extends OneRewriteRuleFactory { JoinType.INNER_JOIN, newHashJoinConjuncts, ExpressionUtils.EMPTY_CONDITION, - JoinHint.NONE, + new DistributeHint(DistributeType.NONE), Optional.empty(), newUnionNode, pullUpTable); @@ -634,7 +635,7 @@ public class PullUpJoinFromUnionAll extends OneRewriteRuleFactory { return new LogicalJoin(JoinType.INNER_JOIN, join.getHashJoinConjuncts(), join.getOtherJoinConjuncts(), - JoinHint.NONE, + new DistributeHint(DistributeType.NONE), Optional.empty(), leftChild, rightChild); } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughJoin.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughJoin.java index ebee8b9c1a..c90723678a 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughJoin.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughJoin.java @@ -137,7 +137,7 @@ public class PushDownFilterThroughJoin extends OneRewriteRuleFactory { new LogicalJoin<>(join.getJoinType(), join.getHashJoinConjuncts(), joinConditions, - join.getHint(), + join.getDistributeHint(), join.getMarkJoinSlotReference(), PlanUtils.filterOrSelf(leftPredicates, join.left()), PlanUtils.filterOrSelf(rightPredicates, join.right()))); diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownJoinOtherCondition.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownJoinOtherCondition.java index 778a8729f2..3716af8acb 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownJoinOtherCondition.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownJoinOtherCondition.java @@ -89,7 +89,7 @@ public class PushDownJoinOtherCondition extends OneRewriteRuleFactory { Plan right = PlanUtils.filterOrSelf(rightConjuncts, join.right()); return new LogicalJoin<>(join.getJoinType(), join.getHashJoinConjuncts(), - remainingOther, join.getHint(), join.getMarkJoinSlotReference(), left, right); + remainingOther, join.getDistributeHint(), join.getMarkJoinSlotReference(), left, right); }).toRule(RuleType.PUSH_DOWN_JOIN_OTHER_CONDITION); } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushFilterInsideJoin.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushFilterInsideJoin.java index ca987a5bea..386e9864a3 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushFilterInsideJoin.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushFilterInsideJoin.java @@ -48,7 +48,7 @@ public class PushFilterInsideJoin extends OneRewriteRuleFactory { LogicalJoin join = filter.child(); otherConditions.addAll(join.getOtherJoinConjuncts()); return new LogicalJoin<>(join.getJoinType(), join.getHashJoinConjuncts(), - otherConditions, join.getHint(), join.getMarkJoinSlotReference(), + otherConditions, join.getDistributeHint(), join.getMarkJoinSlotReference(), join.children()); }).toRule(RuleType.PUSH_FILTER_INSIDE_JOIN); } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/ReorderJoin.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/ReorderJoin.java index 03c4e7e8ed..5707e9cde7 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/ReorderJoin.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/ReorderJoin.java @@ -19,12 +19,13 @@ package org.apache.doris.nereids.rules.rewrite; import org.apache.doris.common.Pair; import org.apache.doris.nereids.annotation.DependsRules; +import org.apache.doris.nereids.hint.DistributeHint; import org.apache.doris.nereids.rules.Rule; import org.apache.doris.nereids.rules.RuleType; import org.apache.doris.nereids.trees.expressions.ExprId; import org.apache.doris.nereids.trees.expressions.Expression; -import org.apache.doris.nereids.trees.plans.JoinHint; -import org.apache.doris.nereids.trees.plans.JoinHint.JoinHintType; +import org.apache.doris.nereids.trees.plans.DistributeType; +import org.apache.doris.nereids.trees.plans.DistributeType.JoinDistributeType; import org.apache.doris.nereids.trees.plans.JoinType; import org.apache.doris.nereids.trees.plans.Plan; import org.apache.doris.nereids.trees.plans.logical.LogicalFilter; @@ -83,7 +84,7 @@ public class ReorderJoin extends OneRewriteRuleFactory { } LogicalFilter filter = ctx.root; - Map planToHintType = Maps.newHashMap(); + Map planToHintType = Maps.newHashMap(); Plan plan = joinToMultiJoin(filter, planToHintType); Preconditions.checkState(plan instanceof MultiJoin); MultiJoin multiJoin = (MultiJoin) plan; @@ -99,7 +100,7 @@ public class ReorderJoin extends OneRewriteRuleFactory { * {@link LogicalJoin} or {@link LogicalFilter}--{@link LogicalJoin} * --> {@link MultiJoin} */ - public Plan joinToMultiJoin(Plan plan, Map planToHintType) { + public Plan joinToMultiJoin(Plan plan, Map planToHintType) { // subtree can't specify the end of Pattern. so end can be GroupPlan or Filter if (nonJoinAndNonFilter(plan) || (plan instanceof LogicalFilter && nonJoinAndNonFilter(plan.child(0)))) { @@ -215,7 +216,7 @@ public class ReorderJoin extends OneRewriteRuleFactory { * A B C D F ──► A B C │ D F ──► MJ(FOJ MJ(A,B,C) MJ(D,F)) * */ - public Plan multiJoinToJoin(MultiJoin multiJoin, Map planToHintType) { + public Plan multiJoinToJoin(MultiJoin multiJoin, Map planToHintType) { if (multiJoin.arity() == 1) { return PlanUtils.filterOrSelf(ImmutableSet.copyOf(multiJoin.getJoinFilter()), multiJoin.child(0)); } @@ -282,7 +283,8 @@ public class ReorderJoin extends OneRewriteRuleFactory { return PlanUtils.filterOrSelf(ImmutableSet.copyOf(remainingFilter), new LogicalJoin<>( multiJoinHandleChildren.getJoinType(), ExpressionUtils.EMPTY_CONDITION, multiJoinHandleChildren.getNotInnerJoinConditions(), - JoinHint.fromRightPlanHintType(planToHintType.getOrDefault(right, JoinHintType.NONE)), + new DistributeHint(DistributeType.fromRightPlanHintType( + planToHintType.getOrDefault(right, JoinDistributeType.NONE))), Optional.empty(), left, right)); } @@ -326,7 +328,7 @@ public class ReorderJoin extends OneRewriteRuleFactory { * @return InnerJoin or CrossJoin{left, last of [candidates]} */ private LogicalJoin findInnerJoin(Plan left, List candidates, - Set joinFilter, Set usedPlansIndex, Map planToHintType) { + Set joinFilter, Set usedPlansIndex, Map planToHintType) { List otherJoinConditions = Lists.newArrayList(); Set leftOutputExprIdSet = left.getOutputExprIdSet(); int candidateIndex = 0; @@ -357,7 +359,8 @@ public class ReorderJoin extends OneRewriteRuleFactory { usedPlansIndex.add(i); return new LogicalJoin<>(JoinType.INNER_JOIN, hashJoinConditions, otherJoinConditions, - JoinHint.fromRightPlanHintType(planToHintType.getOrDefault(candidate, JoinHintType.NONE)), + new DistributeHint(DistributeType.fromRightPlanHintType( + planToHintType.getOrDefault(candidate, JoinDistributeType.NONE))), Optional.empty(), left, candidate); } @@ -369,7 +372,8 @@ public class ReorderJoin extends OneRewriteRuleFactory { return new LogicalJoin<>(JoinType.CROSS_JOIN, ExpressionUtils.EMPTY_CONDITION, otherJoinConditions, - JoinHint.fromRightPlanHintType(planToHintType.getOrDefault(right, JoinHintType.NONE)), + new DistributeHint(DistributeType.fromRightPlanHintType( + planToHintType.getOrDefault(right, JoinDistributeType.NONE))), Optional.empty(), left, right); } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/ScalarApplyToJoin.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/ScalarApplyToJoin.java index a9f9cf448f..1f94d4f744 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/ScalarApplyToJoin.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/ScalarApplyToJoin.java @@ -18,12 +18,13 @@ package org.apache.doris.nereids.rules.rewrite; import org.apache.doris.nereids.exceptions.AnalysisException; +import org.apache.doris.nereids.hint.DistributeHint; import org.apache.doris.nereids.rules.Rule; import org.apache.doris.nereids.rules.RuleType; import org.apache.doris.nereids.trees.expressions.AssertNumRowsElement; import org.apache.doris.nereids.trees.expressions.EqualTo; import org.apache.doris.nereids.trees.expressions.Expression; -import org.apache.doris.nereids.trees.plans.JoinHint; +import org.apache.doris.nereids.trees.plans.DistributeType; import org.apache.doris.nereids.trees.plans.JoinType; import org.apache.doris.nereids.trees.plans.Plan; import org.apache.doris.nereids.trees.plans.logical.LogicalApply; @@ -62,7 +63,7 @@ public class ScalarApplyToJoin extends OneRewriteRuleFactory { return new LogicalJoin<>(JoinType.CROSS_JOIN, ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, - JoinHint.NONE, + new DistributeHint(DistributeType.NONE), apply.getMarkJoinSlotReference(), (LogicalPlan) apply.left(), assertNumRows); } @@ -85,7 +86,7 @@ public class ScalarApplyToJoin extends OneRewriteRuleFactory { apply.isNeedAddSubOutputToProjects() ? JoinType.LEFT_OUTER_JOIN : JoinType.LEFT_SEMI_JOIN, ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.extractConjunction(correlationFilter.get()), - JoinHint.NONE, + new DistributeHint(DistributeType.NONE), apply.getMarkJoinSlotReference(), apply.children()); } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/SemiJoinCommute.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/SemiJoinCommute.java index 6655753572..3c6a6d6c81 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/SemiJoinCommute.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/SemiJoinCommute.java @@ -33,7 +33,7 @@ public class SemiJoinCommute extends OneRewriteRuleFactory { return logicalJoin() .when(join -> join.getJoinType().isRightSemiOrAntiJoin() || join.getJoinType().isRightOuterJoin()) .whenNot(join -> ConnectContext.get().getSessionVariable().isDisableJoinReorder()) - .whenNot(LogicalJoin::hasJoinHint) + .whenNot(LogicalJoin::hasDistributeHint) .whenNot(LogicalJoin::isMarkJoin) .then(join -> join.withTypeChildren(join.getJoinType().swap(), join.right(), join.left())) .toRule(RuleType.LOGICAL_SEMI_JOIN_COMMUTE); diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/TransposeSemiJoinLogicalJoin.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/TransposeSemiJoinLogicalJoin.java index 7d4d639f74..609f66bb6c 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/TransposeSemiJoinLogicalJoin.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/TransposeSemiJoinLogicalJoin.java @@ -43,7 +43,7 @@ public class TransposeSemiJoinLogicalJoin extends OneRewriteRuleFactory { && (topJoin.left().getJoinType().isInnerJoin() || topJoin.left().getJoinType().isLeftOuterJoin() || topJoin.left().getJoinType().isRightOuterJoin()))) - .whenNot(topJoin -> topJoin.hasJoinHint() || topJoin.left().hasJoinHint()) + .whenNot(topJoin -> topJoin.hasDistributeHint() || topJoin.left().hasDistributeHint()) .whenNot(LogicalJoin::isMarkJoin) .then(topSemiJoin -> { LogicalJoin bottomJoin = topSemiJoin.left(); diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/TransposeSemiJoinLogicalJoinProject.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/TransposeSemiJoinLogicalJoinProject.java index af2bdc1349..37b3e027ff 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/TransposeSemiJoinLogicalJoinProject.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/TransposeSemiJoinLogicalJoinProject.java @@ -48,7 +48,7 @@ public class TransposeSemiJoinLogicalJoinProject extends OneRewriteRuleFactory { || topJoin.left().child().getJoinType().isLeftOuterJoin() || topJoin.left().child().getJoinType().isRightOuterJoin()))) .when(join -> join.left().isAllSlots()) - .whenNot(join -> join.hasJoinHint() || join.left().child().hasJoinHint()) + .whenNot(join -> join.hasDistributeHint() || join.left().child().hasDistributeHint()) .whenNot(join -> join.isMarkJoin() || join.left().child().isMarkJoin()) .when(join -> join.left().getProjects().stream().allMatch(expr -> expr instanceof Slot)) .then(topSemiJoin -> { diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/copier/LogicalPlanDeepCopier.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/copier/LogicalPlanDeepCopier.java index 3ae47c3a3e..6e803e258e 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/copier/LogicalPlanDeepCopier.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/copier/LogicalPlanDeepCopier.java @@ -337,7 +337,7 @@ public class LogicalPlanDeepCopier extends DefaultPlanRewriter ExpressionDeepCopier.INSTANCE.deepCopy(c, context)) .collect(ImmutableList.toImmutableList()); return new LogicalJoin<>(join.getJoinType(), hashJoinConjuncts, otherJoinConjuncts, - join.getHint(), join.getMarkJoinSlotReference(), children); + join.getDistributeHint(), join.getMarkJoinSlotReference(), children); } @Override diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/JoinHint.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/DistributeType.java similarity index 72% rename from fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/JoinHint.java rename to fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/DistributeType.java index 37e246f1a6..dc834cbbcc 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/JoinHint.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/DistributeType.java @@ -23,15 +23,15 @@ package org.apache.doris.nereids.trees.plans; * Hints for the right child of join are supported currently. * Left input and right input of join could have different hints for further extension. */ -public enum JoinHint { - NONE(JoinHintType.NONE, JoinHintType.NONE), - BROADCAST_RIGHT(JoinHintType.NONE, JoinHintType.BROADCAST), - SHUFFLE_RIGHT(JoinHintType.NONE, JoinHintType.SHUFFLE); +public enum DistributeType { + NONE(JoinDistributeType.NONE, JoinDistributeType.NONE), + BROADCAST_RIGHT(JoinDistributeType.NONE, JoinDistributeType.BROADCAST), + SHUFFLE_RIGHT(JoinDistributeType.NONE, JoinDistributeType.SHUFFLE); /** * Join hint type for single join input plan. */ - public enum JoinHintType { + public enum JoinDistributeType { // No join hint. NONE, // Shuffle join hint. @@ -40,26 +40,26 @@ public enum JoinHint { BROADCAST, } - private final JoinHintType leftHint; - private final JoinHintType rightHint; + private final JoinDistributeType leftHint; + private final JoinDistributeType rightHint; - JoinHint(JoinHintType leftHint, JoinHintType rightHint) { + DistributeType(JoinDistributeType leftHint, JoinDistributeType rightHint) { this.leftHint = leftHint; this.rightHint = rightHint; } - public JoinHintType getLeftHint() { + public JoinDistributeType getLeftHint() { return leftHint; } - public JoinHintType getRightHint() { + public JoinDistributeType getRightHint() { return rightHint; } /** * Create join hint from join right child's join hint type. */ - public static JoinHint fromRightPlanHintType(JoinHintType hintType) { + public static DistributeType fromRightPlanHintType(JoinDistributeType hintType) { switch (hintType) { case SHUFFLE: return SHUFFLE_RIGHT; diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/algebra/Join.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/algebra/Join.java index 3f96c4d11c..b892214b97 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/algebra/Join.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/algebra/Join.java @@ -17,11 +17,12 @@ package org.apache.doris.nereids.trees.plans.algebra; +import org.apache.doris.nereids.hint.DistributeHint; import org.apache.doris.nereids.trees.expressions.EqualTo; import org.apache.doris.nereids.trees.expressions.Expression; import org.apache.doris.nereids.trees.expressions.MarkJoinSlotReference; -import org.apache.doris.nereids.trees.plans.JoinHint; -import org.apache.doris.nereids.trees.plans.JoinHint.JoinHintType; +import org.apache.doris.nereids.trees.plans.DistributeType; +import org.apache.doris.nereids.trees.plans.DistributeType.JoinDistributeType; import org.apache.doris.nereids.trees.plans.JoinType; import java.util.List; @@ -45,12 +46,12 @@ public interface Join { Optional getOnClauseCondition(); - JoinHint getHint(); + DistributeHint getDistributeHint(); boolean isMarkJoin(); - default boolean hasJoinHint() { - return getHint() != JoinHint.NONE; + default boolean hasDistributeHint() { + return getDistributeHint().distributeType != DistributeType.NONE; } /** @@ -60,21 +61,21 @@ public interface Join { return !getHashJoinConjuncts().isEmpty() || !getOtherJoinConjuncts().isEmpty(); } - default JoinHintType getLeftHint() { - return JoinHintType.NONE; + default JoinDistributeType getLeftHint() { + return JoinDistributeType.NONE; } /** * Get the hint type of join's right child. */ - default JoinHintType getRightHint() { - switch (getHint()) { + default JoinDistributeType getRightHint() { + switch (getDistributeHint().distributeType) { case SHUFFLE_RIGHT: - return JoinHintType.SHUFFLE; + return JoinDistributeType.SHUFFLE; case BROADCAST_RIGHT: - return JoinHintType.BROADCAST; + return JoinDistributeType.BROADCAST; default: - return JoinHintType.NONE; + return JoinDistributeType.NONE; } } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalJoin.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalJoin.java index c729aec752..76fda759ef 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalJoin.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalJoin.java @@ -18,6 +18,7 @@ package org.apache.doris.nereids.trees.plans.logical; import org.apache.doris.common.Pair; +import org.apache.doris.nereids.hint.DistributeHint; import org.apache.doris.nereids.jobs.joinorder.hypergraph.bitmap.LongBitmap; import org.apache.doris.nereids.memo.GroupExpression; import org.apache.doris.nereids.properties.FunctionalDependencies; @@ -30,7 +31,7 @@ import org.apache.doris.nereids.trees.expressions.ExprId; import org.apache.doris.nereids.trees.expressions.Expression; import org.apache.doris.nereids.trees.expressions.MarkJoinSlotReference; import org.apache.doris.nereids.trees.expressions.Slot; -import org.apache.doris.nereids.trees.plans.JoinHint; +import org.apache.doris.nereids.trees.plans.DistributeType; import org.apache.doris.nereids.trees.plans.JoinType; import org.apache.doris.nereids.trees.plans.Plan; import org.apache.doris.nereids.trees.plans.PlanType; @@ -75,21 +76,23 @@ public class LogicalJoin hashJoinConjuncts, LEFT_CHILD_TYPE leftChild, RIGHT_CHILD_TYPE rightChild) { - this(joinType, hashJoinConjuncts, ExpressionUtils.EMPTY_CONDITION, JoinHint.NONE, Optional.empty(), + this(joinType, hashJoinConjuncts, ExpressionUtils.EMPTY_CONDITION, + new DistributeHint(DistributeType.NONE), Optional.empty(), Optional.empty(), Optional.empty(), leftChild, rightChild); } public LogicalJoin(JoinType joinType, List hashJoinConjuncts, List otherJoinConjuncts, - JoinHint hint, LEFT_CHILD_TYPE leftChild, RIGHT_CHILD_TYPE rightChild) { + DistributeHint hint, LEFT_CHILD_TYPE leftChild, RIGHT_CHILD_TYPE rightChild) { this(joinType, hashJoinConjuncts, otherJoinConjuncts, hint, Optional.empty(), Optional.empty(), Optional.empty(), leftChild, rightChild); } @@ -98,7 +101,7 @@ public class LogicalJoin hashJoinConjuncts, List otherJoinConjuncts, - JoinHint hint, + DistributeHint hint, Optional markJoinSlotReference, LEFT_CHILD_TYPE leftChild, RIGHT_CHILD_TYPE rightChild) { this(joinType, hashJoinConjuncts, @@ -111,7 +114,7 @@ public class LogicalJoin hashJoinConjuncts, List otherJoinConjuncts, - JoinHint hint, + DistributeHint hint, Optional markJoinSlotReference, LEFT_CHILD_TYPE leftChild, RIGHT_CHILD_TYPE rightChild) { this(joinType, hashJoinConjuncts, @@ -124,7 +127,7 @@ public class LogicalJoin hashJoinConjuncts, List otherJoinConjuncts, - JoinHint hint, + DistributeHint hint, Optional markJoinSlotReference, List children) { this(joinType, hashJoinConjuncts, @@ -133,7 +136,7 @@ public class LogicalJoin hashJoinConjuncts, List otherJoinConjuncts, - JoinHint hint, Optional markJoinSlotReference, + DistributeHint hint, Optional markJoinSlotReference, Optional groupExpression, Optional logicalProperties, List children, JoinReorderContext joinReorderContext) { // Just use in withXXX method. Don't need check/copyOf() @@ -150,7 +153,7 @@ public class LogicalJoin hashJoinConjuncts, List otherJoinConjuncts, - JoinHint hint, + DistributeHint hint, Optional markJoinSlotReference, Optional groupExpression, Optional logicalProperties, @@ -168,7 +171,7 @@ public class LogicalJoin hashJoinConjuncts, List otherJoinConjuncts, - JoinHint hint, + DistributeHint hint, Optional markJoinSlotReference, Optional groupExpression, Optional logicalProperties, @@ -220,11 +223,11 @@ public class LogicalJoin that = (LogicalJoin) o; return joinType == that.joinType - && hint == that.hint + && hint.equals(that.hint) && hashJoinConjuncts.equals(that.hashJoinConjuncts) && otherJoinConjuncts.equals(that.otherJoinConjuncts) && Objects.equals(markJoinSlotReference, that.markJoinSlotReference); @@ -486,7 +489,7 @@ public class LogicalJoin otherJoinConjuncts; private final ImmutableList hashJoinConjuncts; - private final JoinHint hint; + private final DistributeHint hint; private final Optional markJoinSlotReference; public UsingJoin(JoinType joinType, LEFT_CHILD_TYPE leftChild, RIGHT_CHILD_TYPE rightChild, List expressions, List hashJoinConjuncts, - JoinHint hint) { + DistributeHint hint) { this(joinType, leftChild, rightChild, expressions, hashJoinConjuncts, Optional.empty(), Optional.empty(), hint, Optional.empty()); } @@ -63,7 +63,7 @@ public class UsingJoin expressions, List hashJoinConjuncts, Optional groupExpression, Optional logicalProperties, - JoinHint hint, Optional markJoinSlotReference) { + DistributeHint hint, Optional markJoinSlotReference) { super(PlanType.LOGICAL_USING_JOIN, groupExpression, logicalProperties, leftChild, rightChild); this.joinType = joinType; this.otherJoinConjuncts = ImmutableList.copyOf(expressions); @@ -155,7 +155,7 @@ public class UsingJoin hashJoinConjuncts; protected final List otherJoinConjuncts; - protected final JoinHint hint; + protected final DistributeHint hint; protected final Optional markJoinSlotReference; protected final List runtimeFilters = Lists.newArrayList(); @@ -74,7 +75,7 @@ public abstract class AbstractPhysicalJoin< JoinType joinType, List hashJoinConjuncts, List otherJoinConjuncts, - JoinHint hint, + DistributeHint hint, Optional markJoinSlotReference, Optional groupExpression, LogicalProperties logicalProperties, LEFT_CHILD_TYPE leftChild, RIGHT_CHILD_TYPE rightChild) { @@ -94,7 +95,7 @@ public abstract class AbstractPhysicalJoin< JoinType joinType, List hashJoinConjuncts, List otherJoinConjuncts, - JoinHint hint, + DistributeHint hint, Optional markJoinSlotReference, Optional groupExpression, LogicalProperties logicalProperties, @@ -174,7 +175,7 @@ public abstract class AbstractPhysicalJoin< } @Override - public JoinHint getHint() { + public DistributeHint getDistributeHint() { return hint; } @@ -239,9 +240,9 @@ public abstract class AbstractPhysicalJoin< args.add("MarkJoinSlotReference"); args.add(markJoinSlotReference.get()); } - if (hint != JoinHint.NONE) { + if (hint.distributeType != DistributeType.NONE) { args.add("hint"); - args.add(hint); + args.add(hint.getExplainString()); } if (!runtimeFilters.isEmpty()) { args.add("runtimeFilters"); diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalDistribute.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalDistribute.java index d62225cdcd..21833aa3c0 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalDistribute.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalDistribute.java @@ -166,4 +166,11 @@ public class PhysicalDistribute extends PhysicalUnary(distributionSpec, groupExpression, null, physicalProperties, statistics, child()); } + + @Override + public String shapeInfo() { + StringBuilder builder = new StringBuilder("PhysicalDistribute"); + builder.append("[").append(getDistributionSpec().shapeInfo()).append("]"); + return builder.toString(); + } } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalHashJoin.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalHashJoin.java index 5086d0f361..b62f0ff759 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalHashJoin.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalHashJoin.java @@ -20,6 +20,7 @@ package org.apache.doris.nereids.trees.plans.physical; import org.apache.doris.common.IdGenerator; import org.apache.doris.common.Pair; import org.apache.doris.nereids.CascadesContext; +import org.apache.doris.nereids.hint.DistributeHint; import org.apache.doris.nereids.memo.GroupExpression; import org.apache.doris.nereids.processor.post.RuntimeFilterContext; import org.apache.doris.nereids.processor.post.RuntimeFilterGenerator; @@ -31,7 +32,6 @@ import org.apache.doris.nereids.trees.expressions.Expression; import org.apache.doris.nereids.trees.expressions.MarkJoinSlotReference; import org.apache.doris.nereids.trees.expressions.NamedExpression; import org.apache.doris.nereids.trees.expressions.Slot; -import org.apache.doris.nereids.trees.plans.JoinHint; import org.apache.doris.nereids.trees.plans.JoinType; import org.apache.doris.nereids.trees.plans.Plan; import org.apache.doris.nereids.trees.plans.PlanType; @@ -64,7 +64,7 @@ public class PhysicalHashJoin< JoinType joinType, List hashJoinConjuncts, List otherJoinConjuncts, - JoinHint hint, + DistributeHint hint, Optional markJoinSlotReference, LogicalProperties logicalProperties, LEFT_CHILD_TYPE leftChild, @@ -83,7 +83,7 @@ public class PhysicalHashJoin< JoinType joinType, List hashJoinConjuncts, List otherJoinConjuncts, - JoinHint hint, + DistributeHint hint, Optional markJoinSlotReference, Optional groupExpression, LogicalProperties logicalProperties, @@ -96,7 +96,7 @@ public class PhysicalHashJoin< JoinType joinType, List hashJoinConjuncts, List otherJoinConjuncts, - JoinHint hint, + DistributeHint hint, Optional markJoinSlotReference, Optional groupExpression, LogicalProperties logicalProperties, diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalNestedLoopJoin.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalNestedLoopJoin.java index 9071b137ca..1ad2f2b616 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalNestedLoopJoin.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalNestedLoopJoin.java @@ -17,13 +17,14 @@ package org.apache.doris.nereids.trees.plans.physical; +import org.apache.doris.nereids.hint.DistributeHint; import org.apache.doris.nereids.memo.GroupExpression; import org.apache.doris.nereids.properties.LogicalProperties; import org.apache.doris.nereids.properties.PhysicalProperties; import org.apache.doris.nereids.trees.expressions.Expression; import org.apache.doris.nereids.trees.expressions.MarkJoinSlotReference; import org.apache.doris.nereids.trees.expressions.Slot; -import org.apache.doris.nereids.trees.plans.JoinHint; +import org.apache.doris.nereids.trees.plans.DistributeType; import org.apache.doris.nereids.trees.plans.JoinType; import org.apache.doris.nereids.trees.plans.Plan; import org.apache.doris.nereids.trees.plans.PlanType; @@ -83,7 +84,7 @@ public class PhysicalNestedLoopJoin< LEFT_CHILD_TYPE leftChild, RIGHT_CHILD_TYPE rightChild) { super(PlanType.PHYSICAL_NESTED_LOOP_JOIN, joinType, hashJoinConjuncts, otherJoinConjuncts, // nested loop join ignores join hints. - JoinHint.NONE, markJoinSlotReference, + new DistributeHint(DistributeType.NONE), markJoinSlotReference, groupExpression, logicalProperties, leftChild, rightChild); } @@ -106,7 +107,7 @@ public class PhysicalNestedLoopJoin< RIGHT_CHILD_TYPE rightChild) { super(PlanType.PHYSICAL_NESTED_LOOP_JOIN, joinType, hashJoinConjuncts, otherJoinConjuncts, // nested loop join ignores join hints. - JoinHint.NONE, markJoinSlotReference, + new DistributeHint(DistributeType.NONE), markJoinSlotReference, groupExpression, logicalProperties, physicalProperties, statistics, leftChild, rightChild); } diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/JoinHintTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/DistributeHintTest.java similarity index 96% rename from fe/fe-core/src/test/java/org/apache/doris/nereids/JoinHintTest.java rename to fe/fe-core/src/test/java/org/apache/doris/nereids/DistributeHintTest.java index ac43c5698a..0029574a99 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/JoinHintTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/DistributeHintTest.java @@ -20,7 +20,7 @@ package org.apache.doris.nereids; import org.apache.doris.nereids.properties.DistributionSpec; import org.apache.doris.nereids.properties.DistributionSpecHash; import org.apache.doris.nereids.properties.DistributionSpecHash.ShuffleType; -import org.apache.doris.nereids.trees.plans.JoinHint; +import org.apache.doris.nereids.trees.plans.DistributeType; import org.apache.doris.nereids.trees.plans.Plan; import org.apache.doris.nereids.util.MatchingUtils; import org.apache.doris.nereids.util.MemoPatternMatchSupported; @@ -38,7 +38,7 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -class JoinHintTest extends TestWithFeService implements MemoPatternMatchSupported { +class DistributeHintTest extends TestWithFeService implements MemoPatternMatchSupported { @Override protected void runBeforeAll() throws Exception { @@ -127,7 +127,7 @@ class JoinHintTest extends TestWithFeService implements MemoPatternMatchSupporte return true; }), physicalDistribute()), physicalDistribute() - ).when(join -> join.getHint() == JoinHint.SHUFFLE_RIGHT) + ).when(join -> join.getDistributeHint().distributeType == DistributeType.SHUFFLE_RIGHT) ) ) )); diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/jobs/joinorder/joinhint/JoinHintTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/jobs/joinorder/joinhint/DistributeHintTest.java similarity index 99% rename from fe/fe-core/src/test/java/org/apache/doris/nereids/jobs/joinorder/joinhint/JoinHintTest.java rename to fe/fe-core/src/test/java/org/apache/doris/nereids/jobs/joinorder/joinhint/DistributeHintTest.java index b4571e4eb1..3779e56c49 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/jobs/joinorder/joinhint/JoinHintTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/jobs/joinorder/joinhint/DistributeHintTest.java @@ -37,7 +37,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -public class JoinHintTest extends TPCHTestBase { +public class DistributeHintTest extends TPCHTestBase { private int used = 0; private int unused = 0; diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/parser/NereidsParserTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/parser/NereidsParserTest.java index 6dbcacee40..7b8a9fe263 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/parser/NereidsParserTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/parser/NereidsParserTest.java @@ -27,7 +27,7 @@ import org.apache.doris.nereids.exceptions.ParseException; import org.apache.doris.nereids.glue.LogicalPlanAdapter; import org.apache.doris.nereids.trees.expressions.Cast; import org.apache.doris.nereids.trees.expressions.literal.DecimalLiteral; -import org.apache.doris.nereids.trees.plans.JoinHint; +import org.apache.doris.nereids.trees.plans.DistributeType; import org.apache.doris.nereids.trees.plans.JoinType; import org.apache.doris.nereids.trees.plans.Plan; import org.apache.doris.nereids.trees.plans.PlanType; @@ -383,20 +383,20 @@ public class NereidsParserTest extends ParserTestBase { public void testJoinHint() { // no hint parsePlan("select * from t1 join t2 on t1.keyy=t2.keyy") - .matches(logicalJoin().when(j -> j.getHint() == JoinHint.NONE)); + .matches(logicalJoin().when(j -> j.getDistributeHint().distributeType == DistributeType.NONE)); // valid hint parsePlan("select * from t1 join [shuffle] t2 on t1.keyy=t2.keyy") - .matches(logicalJoin().when(j -> j.getHint() == JoinHint.SHUFFLE_RIGHT)); + .matches(logicalJoin().when(j -> j.getDistributeHint().distributeType == DistributeType.SHUFFLE_RIGHT)); parsePlan("select * from t1 join [ shuffle ] t2 on t1.keyy=t2.keyy") - .matches(logicalJoin().when(j -> j.getHint() == JoinHint.SHUFFLE_RIGHT)); + .matches(logicalJoin().when(j -> j.getDistributeHint().distributeType == DistributeType.SHUFFLE_RIGHT)); parsePlan("select * from t1 join [broadcast] t2 on t1.keyy=t2.keyy") - .matches(logicalJoin().when(j -> j.getHint() == JoinHint.BROADCAST_RIGHT)); + .matches(logicalJoin().when(j -> j.getDistributeHint().distributeType == DistributeType.BROADCAST_RIGHT)); parsePlan("select * from t1 join /*+ broadcast */ t2 on t1.keyy=t2.keyy") - .matches(logicalJoin().when(j -> j.getHint() == JoinHint.BROADCAST_RIGHT)); + .matches(logicalJoin().when(j -> j.getDistributeHint().distributeType == DistributeType.BROADCAST_RIGHT)); // invalid hint position parsePlan("select * from [shuffle] t1 join t2 on t1.keyy=t2.keyy") diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/properties/ChildOutputPropertyDeriverTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/properties/ChildOutputPropertyDeriverTest.java index f283e6fb87..a818091926 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/properties/ChildOutputPropertyDeriverTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/properties/ChildOutputPropertyDeriverTest.java @@ -20,6 +20,7 @@ package org.apache.doris.nereids.properties; import org.apache.doris.catalog.ColocateTableIndex; import org.apache.doris.catalog.Env; import org.apache.doris.common.Pair; +import org.apache.doris.nereids.hint.DistributeHint; import org.apache.doris.nereids.memo.Group; import org.apache.doris.nereids.memo.GroupExpression; import org.apache.doris.nereids.properties.DistributionSpecHash.ShuffleType; @@ -30,8 +31,8 @@ import org.apache.doris.nereids.trees.expressions.SlotReference; import org.apache.doris.nereids.trees.expressions.functions.agg.AggregateParam; import org.apache.doris.nereids.trees.plans.AggMode; import org.apache.doris.nereids.trees.plans.AggPhase; +import org.apache.doris.nereids.trees.plans.DistributeType; import org.apache.doris.nereids.trees.plans.GroupPlan; -import org.apache.doris.nereids.trees.plans.JoinHint; import org.apache.doris.nereids.trees.plans.JoinType; import org.apache.doris.nereids.trees.plans.LimitPhase; import org.apache.doris.nereids.trees.plans.Plan; @@ -99,7 +100,7 @@ class ChildOutputPropertyDeriverTest { @Test void testInnerJoin() { PhysicalHashJoin join = new PhysicalHashJoin<>(JoinType.INNER_JOIN, - ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, JoinHint.NONE, Optional.empty(), logicalProperties, + ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, new DistributeHint(DistributeType.NONE), Optional.empty(), logicalProperties, groupPlan, groupPlan); GroupExpression groupExpression = new GroupExpression(join); new Group(null, groupExpression, null); @@ -138,7 +139,7 @@ class ChildOutputPropertyDeriverTest { @Test void testCrossJoin() { PhysicalHashJoin join = new PhysicalHashJoin<>(JoinType.CROSS_JOIN, - ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, JoinHint.NONE, Optional.empty(), logicalProperties, + ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, new DistributeHint(DistributeType.NONE), Optional.empty(), logicalProperties, groupPlan, groupPlan); GroupExpression groupExpression = new GroupExpression(join); new Group(null, groupExpression, null); @@ -177,7 +178,7 @@ class ChildOutputPropertyDeriverTest { @Test void testLeftOuterJoin() { PhysicalHashJoin join = new PhysicalHashJoin<>(JoinType.LEFT_OUTER_JOIN, - ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, JoinHint.NONE, Optional.empty(), logicalProperties, + ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, new DistributeHint(DistributeType.NONE), Optional.empty(), logicalProperties, groupPlan, groupPlan); GroupExpression groupExpression = new GroupExpression(join); new Group(null, groupExpression, null); @@ -217,7 +218,7 @@ class ChildOutputPropertyDeriverTest { @Test void testLeftSemiJoin() { PhysicalHashJoin join = new PhysicalHashJoin<>(JoinType.LEFT_SEMI_JOIN, - ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, JoinHint.NONE, Optional.empty(), logicalProperties, + ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, new DistributeHint(DistributeType.NONE), Optional.empty(), logicalProperties, groupPlan, groupPlan); GroupExpression groupExpression = new GroupExpression(join); new Group(null, groupExpression, null); @@ -257,7 +258,7 @@ class ChildOutputPropertyDeriverTest { @Test void testLeftAntiJoin() { PhysicalHashJoin join = new PhysicalHashJoin<>(JoinType.LEFT_ANTI_JOIN, - ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, JoinHint.NONE, Optional.empty(), logicalProperties, + ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, new DistributeHint(DistributeType.NONE), Optional.empty(), logicalProperties, groupPlan, groupPlan); GroupExpression groupExpression = new GroupExpression(join); new Group(null, groupExpression, null); @@ -297,7 +298,7 @@ class ChildOutputPropertyDeriverTest { @Test void testNullAwareLeftAntiJoin() { PhysicalHashJoin join = new PhysicalHashJoin<>(JoinType.NULL_AWARE_LEFT_ANTI_JOIN, - ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, JoinHint.NONE, Optional.empty(), logicalProperties, + ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, new DistributeHint(DistributeType.NONE), Optional.empty(), logicalProperties, groupPlan, groupPlan); GroupExpression groupExpression = new GroupExpression(join); new Group(null, groupExpression, null); @@ -337,7 +338,7 @@ class ChildOutputPropertyDeriverTest { @Test void testRightSemiJoin() { PhysicalHashJoin join = new PhysicalHashJoin<>(JoinType.RIGHT_SEMI_JOIN, - ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, JoinHint.NONE, Optional.empty(), logicalProperties, + ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, new DistributeHint(DistributeType.NONE), Optional.empty(), logicalProperties, groupPlan, groupPlan); GroupExpression groupExpression = new GroupExpression(join); new Group(null, groupExpression, null); @@ -378,7 +379,7 @@ class ChildOutputPropertyDeriverTest { @Test void testRightAntiJoin() { PhysicalHashJoin join = new PhysicalHashJoin<>(JoinType.RIGHT_ANTI_JOIN, - ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, JoinHint.NONE, Optional.empty(), logicalProperties, + ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, new DistributeHint(DistributeType.NONE), Optional.empty(), logicalProperties, groupPlan, groupPlan); GroupExpression groupExpression = new GroupExpression(join); new Group(null, groupExpression, null); @@ -419,7 +420,7 @@ class ChildOutputPropertyDeriverTest { @Test void testRightOuterJoin() { PhysicalHashJoin join = new PhysicalHashJoin<>(JoinType.RIGHT_OUTER_JOIN, - ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, JoinHint.NONE, Optional.empty(), logicalProperties, + ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, new DistributeHint(DistributeType.NONE), Optional.empty(), logicalProperties, groupPlan, groupPlan); GroupExpression groupExpression = new GroupExpression(join); new Group(null, groupExpression, null); @@ -460,7 +461,7 @@ class ChildOutputPropertyDeriverTest { @Test void testFullOuterJoin() { PhysicalHashJoin join = new PhysicalHashJoin<>(JoinType.FULL_OUTER_JOIN, - ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, JoinHint.NONE, Optional.empty(), logicalProperties, + ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, new DistributeHint(DistributeType.NONE), Optional.empty(), logicalProperties, groupPlan, groupPlan); GroupExpression groupExpression = new GroupExpression(join); new Group(null, groupExpression, null); @@ -507,7 +508,7 @@ class ChildOutputPropertyDeriverTest { new SlotReference(new ExprId(0), "left", IntegerType.INSTANCE, false, Collections.emptyList()), new SlotReference(new ExprId(2), "right", IntegerType.INSTANCE, false, Collections.emptyList()))), - ExpressionUtils.EMPTY_CONDITION, JoinHint.NONE, Optional.empty(), logicalProperties, groupPlan, groupPlan); + ExpressionUtils.EMPTY_CONDITION, new DistributeHint(DistributeType.NONE), Optional.empty(), logicalProperties, groupPlan, groupPlan); GroupExpression groupExpression = new GroupExpression(join); new Group(null, groupExpression, null); @@ -554,7 +555,7 @@ class ChildOutputPropertyDeriverTest { new SlotReference(new ExprId(0), "left", IntegerType.INSTANCE, false, Collections.emptyList()), new SlotReference(new ExprId(2), "right", IntegerType.INSTANCE, false, Collections.emptyList()))), - ExpressionUtils.EMPTY_CONDITION, JoinHint.NONE, Optional.empty(), logicalProperties, groupPlan, groupPlan); + ExpressionUtils.EMPTY_CONDITION, new DistributeHint(DistributeType.NONE), Optional.empty(), logicalProperties, groupPlan, groupPlan); GroupExpression groupExpression = new GroupExpression(join); new Group(null, groupExpression, null); diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/properties/RequestPropertyDeriverTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/properties/RequestPropertyDeriverTest.java index e6eaf3884e..fa10f16c58 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/properties/RequestPropertyDeriverTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/properties/RequestPropertyDeriverTest.java @@ -18,6 +18,7 @@ package org.apache.doris.nereids.properties; import org.apache.doris.common.Pair; +import org.apache.doris.nereids.hint.DistributeHint; import org.apache.doris.nereids.jobs.JobContext; import org.apache.doris.nereids.memo.Group; import org.apache.doris.nereids.memo.GroupExpression; @@ -28,8 +29,8 @@ import org.apache.doris.nereids.trees.expressions.SlotReference; import org.apache.doris.nereids.trees.expressions.functions.agg.AggregateParam; import org.apache.doris.nereids.trees.plans.AggMode; import org.apache.doris.nereids.trees.plans.AggPhase; +import org.apache.doris.nereids.trees.plans.DistributeType; import org.apache.doris.nereids.trees.plans.GroupPlan; -import org.apache.doris.nereids.trees.plans.JoinHint; import org.apache.doris.nereids.trees.plans.JoinType; import org.apache.doris.nereids.trees.plans.physical.PhysicalAssertNumRows; import org.apache.doris.nereids.trees.plans.physical.PhysicalHashAggregate; @@ -109,7 +110,7 @@ class RequestPropertyDeriverTest { }; PhysicalHashJoin join = new PhysicalHashJoin<>(JoinType.RIGHT_OUTER_JOIN, - ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, JoinHint.NONE, Optional.empty(), + ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, new DistributeHint(DistributeType.NONE), Optional.empty(), logicalProperties, groupPlan, groupPlan); GroupExpression groupExpression = new GroupExpression(join, Lists.newArrayList(group, group)); @@ -145,7 +146,7 @@ class RequestPropertyDeriverTest { }; PhysicalHashJoin join = new PhysicalHashJoin<>(JoinType.INNER_JOIN, - ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, JoinHint.NONE, Optional.empty(), + ExpressionUtils.EMPTY_CONDITION, ExpressionUtils.EMPTY_CONDITION, new DistributeHint(DistributeType.NONE), Optional.empty(), logicalProperties, groupPlan, groupPlan); GroupExpression groupExpression = new GroupExpression(join, Lists.newArrayList(group, group)); diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/FindHashConditionForJoinTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/FindHashConditionForJoinTest.java index e768a0771a..7351f39ffa 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/FindHashConditionForJoinTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/FindHashConditionForJoinTest.java @@ -17,6 +17,7 @@ package org.apache.doris.nereids.rules.rewrite; +import org.apache.doris.nereids.hint.DistributeHint; import org.apache.doris.nereids.trees.expressions.Add; import org.apache.doris.nereids.trees.expressions.EqualTo; import org.apache.doris.nereids.trees.expressions.Expression; @@ -24,7 +25,7 @@ import org.apache.doris.nereids.trees.expressions.LessThan; import org.apache.doris.nereids.trees.expressions.Or; import org.apache.doris.nereids.trees.expressions.Slot; import org.apache.doris.nereids.trees.expressions.literal.IntegerLiteral; -import org.apache.doris.nereids.trees.plans.JoinHint; +import org.apache.doris.nereids.trees.plans.DistributeType; import org.apache.doris.nereids.trees.plans.JoinType; import org.apache.doris.nereids.trees.plans.Plan; import org.apache.doris.nereids.trees.plans.logical.LogicalJoin; @@ -86,7 +87,7 @@ class FindHashConditionForJoinTest implements MemoPatternMatchSupported { Expression eq5 = new EqualTo(studentId, new Add(studentId, cid)); List expr = ImmutableList.of(eq1, eq2, eq3, or, less, eq4, eq5); LogicalJoin join = new LogicalJoin<>(JoinType.INNER_JOIN, new ArrayList<>(), - expr, JoinHint.NONE, Optional.empty(), studentScan, scoreScan); + expr, new DistributeHint(DistributeType.NONE), Optional.empty(), studentScan, scoreScan); PlanChecker.from(new ConnectContext(), join) .applyTopDown(new FindHashConditionForJoin()) @@ -105,7 +106,7 @@ class FindHashConditionForJoinTest implements MemoPatternMatchSupported { Expression eq2 = new EqualTo(studentId, new IntegerLiteral(1)); // a=1 LogicalJoin join = new LogicalJoin<>(JoinType.CROSS_JOIN, new ArrayList<>(), - ImmutableList.of(eq1, eq2), JoinHint.NONE, Optional.empty(), studentScan, scoreScan); + ImmutableList.of(eq1, eq2), new DistributeHint(DistributeType.NONE), Optional.empty(), studentScan, scoreScan); PlanChecker.from(MemoTestUtils.createConnectContext(), join) .applyTopDown(new FindHashConditionForJoin()) diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/trees/plans/PlanEqualsTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/trees/plans/PlanEqualsTest.java index c43ecd6872..2affdd9560 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/trees/plans/PlanEqualsTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/trees/plans/PlanEqualsTest.java @@ -19,6 +19,7 @@ package org.apache.doris.nereids.trees.plans; import org.apache.doris.catalog.OlapTable; import org.apache.doris.catalog.Partition; +import org.apache.doris.nereids.hint.DistributeHint; import org.apache.doris.nereids.properties.DistributionSpecHash; import org.apache.doris.nereids.properties.LogicalProperties; import org.apache.doris.nereids.properties.OrderKey; @@ -233,20 +234,20 @@ class PlanEqualsTest { Lists.newArrayList(new EqualTo( new SlotReference(new ExprId(0), "a", BigIntType.INSTANCE, true, Lists.newArrayList()), new SlotReference(new ExprId(1), "b", BigIntType.INSTANCE, true, Lists.newArrayList()))), - ExpressionUtils.EMPTY_CONDITION, JoinHint.NONE, Optional.empty(), logicalProperties, left, right); + ExpressionUtils.EMPTY_CONDITION, new DistributeHint(DistributeType.NONE), Optional.empty(), logicalProperties, left, right); PhysicalHashJoin expected = new PhysicalHashJoin<>(JoinType.INNER_JOIN, Lists.newArrayList(new EqualTo( new SlotReference(new ExprId(0), "a", BigIntType.INSTANCE, true, Lists.newArrayList()), new SlotReference(new ExprId(1), "b", BigIntType.INSTANCE, true, Lists.newArrayList()))), - ExpressionUtils.EMPTY_CONDITION, JoinHint.NONE, Optional.empty(), logicalProperties, left, right); + ExpressionUtils.EMPTY_CONDITION, new DistributeHint(DistributeType.NONE), Optional.empty(), logicalProperties, left, right); Assertions.assertEquals(expected, actual); PhysicalHashJoin unexpected = new PhysicalHashJoin<>(JoinType.INNER_JOIN, Lists.newArrayList(new EqualTo( new SlotReference(new ExprId(2), "a", BigIntType.INSTANCE, false, Lists.newArrayList()), new SlotReference(new ExprId(3), "b", BigIntType.INSTANCE, true, Lists.newArrayList()))), - ExpressionUtils.EMPTY_CONDITION, JoinHint.NONE, Optional.empty(), logicalProperties, left, right); + ExpressionUtils.EMPTY_CONDITION, new DistributeHint(DistributeType.NONE), Optional.empty(), logicalProperties, left, right); Assertions.assertNotEquals(unexpected, actual); } diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/trees/plans/PlanToStringTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/trees/plans/PlanToStringTest.java index 53c938d849..a764b9ec34 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/trees/plans/PlanToStringTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/trees/plans/PlanToStringTest.java @@ -73,6 +73,7 @@ public class PlanToStringTest { new EqualTo(new SlotReference(new ExprId(0), "a", BigIntType.INSTANCE, true, Lists.newArrayList()), new SlotReference(new ExprId(1), "b", BigIntType.INSTANCE, true, Lists.newArrayList()))), left, right); + System.out.println(plan.toString()); Assertions.assertTrue(plan.toString().matches( "LogicalJoin\\[\\d+\\] \\( type=INNER_JOIN, markJoinSlotReference=Optional.empty, hashJoinConjuncts=\\[\\(a#\\d+ = b#\\d+\\)], otherJoinConjuncts=\\[] \\)")); } diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/util/HyperGraphBuilder.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/util/HyperGraphBuilder.java index 10be8c23a3..f544e6ad8b 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/util/HyperGraphBuilder.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/util/HyperGraphBuilder.java @@ -20,6 +20,7 @@ package org.apache.doris.nereids.util; import org.apache.doris.catalog.Env; import org.apache.doris.common.Pair; import org.apache.doris.nereids.CascadesContext; +import org.apache.doris.nereids.hint.DistributeHint; import org.apache.doris.nereids.jobs.joinorder.hypergraph.HyperGraph; import org.apache.doris.nereids.memo.Group; import org.apache.doris.nereids.memo.GroupExpression; @@ -27,7 +28,7 @@ import org.apache.doris.nereids.trees.expressions.EqualTo; import org.apache.doris.nereids.trees.expressions.Expression; import org.apache.doris.nereids.trees.expressions.Slot; import org.apache.doris.nereids.trees.expressions.SlotReference; -import org.apache.doris.nereids.trees.plans.JoinHint; +import org.apache.doris.nereids.trees.plans.DistributeType; import org.apache.doris.nereids.trees.plans.JoinType; import org.apache.doris.nereids.trees.plans.Plan; import org.apache.doris.nereids.trees.plans.logical.LogicalJoin; @@ -284,12 +285,12 @@ public class HyperGraphBuilder { .collect(Collectors.toSet()); assert outputs.containsAll(requireSlots); if (withJoinHint) { - JoinHint[] values = JoinHint.values(); + DistributeType[] values = DistributeType.values(); Random random = new Random(); int randomIndex = random.nextInt(values.length); - JoinHint hint = values[randomIndex]; + DistributeType hint = values[randomIndex]; Plan hintJoin = ((LogicalJoin) join.withChildren(left, right)).withJoinType(joinType); - ((LogicalJoin) hintJoin).setHint(hint); + ((LogicalJoin) hintJoin).setHint(new DistributeHint(hint)); return hintJoin; } return ((LogicalJoin) join.withChildren(left, right)).withJoinType(joinType); diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/util/LogicalPlanBuilder.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/util/LogicalPlanBuilder.java index 5ffad9fb07..971ccd90ef 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/util/LogicalPlanBuilder.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/util/LogicalPlanBuilder.java @@ -18,6 +18,7 @@ package org.apache.doris.nereids.util; import org.apache.doris.common.Pair; +import org.apache.doris.nereids.hint.DistributeHint; import org.apache.doris.nereids.properties.OrderKey; import org.apache.doris.nereids.trees.expressions.Alias; import org.apache.doris.nereids.trees.expressions.AssertNumRowsElement; @@ -25,7 +26,7 @@ import org.apache.doris.nereids.trees.expressions.AssertNumRowsElement.Assertion import org.apache.doris.nereids.trees.expressions.EqualTo; import org.apache.doris.nereids.trees.expressions.Expression; import org.apache.doris.nereids.trees.expressions.NamedExpression; -import org.apache.doris.nereids.trees.plans.JoinHint; +import org.apache.doris.nereids.trees.plans.DistributeType; import org.apache.doris.nereids.trees.plans.JoinType; import org.apache.doris.nereids.trees.plans.LimitPhase; import org.apache.doris.nereids.trees.plans.Plan; @@ -121,7 +122,7 @@ public class LogicalPlanBuilder { public LogicalPlanBuilder join(LogicalPlan right, JoinType joinType, List hashJoinConjuncts, List otherJoinConjucts) { LogicalJoin join = new LogicalJoin<>(joinType, hashJoinConjuncts, otherJoinConjucts, - JoinHint.NONE, Optional.empty(), this.plan, right); + new DistributeHint(DistributeType.NONE), Optional.empty(), this.plan, right); return from(join); } diff --git a/regression-test/data/empty_relation/eliminate_empty.out b/regression-test/data/empty_relation/eliminate_empty.out index 0bcc266b1c..a9b6de276d 100644 --- a/regression-test/data/empty_relation/eliminate_empty.out +++ b/regression-test/data/empty_relation/eliminate_empty.out @@ -9,7 +9,7 @@ PhysicalResultSink -- !explain_union_empty_data -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----hashAgg[LOCAL] ------PhysicalProject --------PhysicalOlapScan[nation] @@ -36,7 +36,7 @@ PhysicalResultSink -- !explain_except_data_empty -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashAgg[LOCAL] --------PhysicalProject @@ -44,12 +44,12 @@ PhysicalResultSink -- !explain_except_data_empty_data -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalExcept -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------PhysicalProject ----------PhysicalOlapScan[nation] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------PhysicalProject ----------filter(( not (n_nationkey = 1))) ------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_p0/cte/test_cte_filter_pushdown.out b/regression-test/data/nereids_p0/cte/test_cte_filter_pushdown.out index 2a984c18fc..6b25adffa3 100644 --- a/regression-test/data/nereids_p0/cte/test_cte_filter_pushdown.out +++ b/regression-test/data/nereids_p0/cte/test_cte_filter_pushdown.out @@ -8,13 +8,13 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------filter((main.k1 = 1)) ------------PhysicalOlapScan[test] --PhysicalResultSink -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalProject --------hashJoin[INNER_JOIN] hashCondition=((m1.k1 = m2.k1)) otherCondition=() -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecExecutionAny] ------------filter((temp.k1 = 1)) --------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecReplicated] ------------PhysicalProject --------------filter((m2.k1 = 1)) ----------------PhysicalCteConsumer ( cteId=CTEId#0 ) @@ -26,17 +26,17 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------filter((main.k1 = 1)) --------PhysicalWindow ----------PhysicalQuickSort[LOCAL_SORT] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------PhysicalOlapScan[test] --PhysicalResultSink -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalProject --------hashJoin[INNER_JOIN] hashCondition=((m1.k1 = m2.k1)) otherCondition=() -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecExecutionAny] ------------filter((temp.k1 = 1)) --------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecReplicated] ------------PhysicalProject --------------filter((m2.k1 = 1)) ----------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_p0/eliminate_outer_join/eliminate_outer_join.out b/regression-test/data/nereids_p0/eliminate_outer_join/eliminate_outer_join.out index 127f3a1996..1307653cc2 100644 --- a/regression-test/data/nereids_p0/eliminate_outer_join/eliminate_outer_join.out +++ b/regression-test/data/nereids_p0/eliminate_outer_join/eliminate_outer_join.out @@ -1,101 +1,185 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !1 -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF2 ps_suppkey->[s_suppkey] -----hashJoin[INNER_JOIN] hashCondition=((nation.n_nationkey = supplier.s_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[n_nationkey] -------hashJoin[INNER_JOIN] hashCondition=((region.r_regionkey = nation.n_regionkey)) otherCondition=() build RFs:RF0 n_regionkey->[r_regionkey] ---------PhysicalOlapScan[region] apply RFs: RF0 ---------filter(( not n_nationkey IS NULL) and (nation.n_nationkey > 1)) -----------PhysicalOlapScan[nation] apply RFs: RF1 -------filter(( not s_suppkey IS NULL) and (supplier.s_suppkey > 1)) ---------PhysicalOlapScan[supplier] apply RFs: RF2 -----filter(( not ps_suppkey IS NULL) and (partsupp.ps_suppkey > 1)) -------PhysicalOlapScan[partsupp] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF2 ps_suppkey->[s_suppkey] +------hashJoin[INNER_JOIN] hashCondition=((nation.n_nationkey = supplier.s_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[n_nationkey] +--------hashJoin[INNER_JOIN] hashCondition=((region.r_regionkey = nation.n_regionkey)) otherCondition=() build RFs:RF0 n_regionkey->[r_regionkey] +----------PhysicalOlapScan[region] apply RFs: RF0 +----------PhysicalDistribute[DistributionSpecReplicated] +------------filter(( not n_nationkey IS NULL) and (nation.n_nationkey > 1)) +--------------PhysicalOlapScan[nation] apply RFs: RF1 +--------PhysicalDistribute[DistributionSpecReplicated] +----------filter(( not s_suppkey IS NULL) and (supplier.s_suppkey > 1)) +------------PhysicalOlapScan[supplier] apply RFs: RF2 +------PhysicalDistribute[DistributionSpecReplicated] +--------filter(( not ps_suppkey IS NULL) and (partsupp.ps_suppkey > 1)) +----------PhysicalOlapScan[partsupp] + +Hint log: +Used: [broadcast]_2 +UnUsed: +SyntaxError: -- !2 -- PhysicalResultSink ---hashJoin[RIGHT_OUTER_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() -----filter((supplier.s_suppkey > 1)) -------hashJoin[FULL_OUTER_JOIN] hashCondition=((nation.n_nationkey = supplier.s_suppkey)) otherCondition=() ---------hashJoin[FULL_OUTER_JOIN] hashCondition=((region.r_regionkey = nation.n_regionkey)) otherCondition=() -----------PhysicalOlapScan[region] -----------PhysicalOlapScan[nation] ---------PhysicalOlapScan[supplier] -----filter(( not ps_suppkey IS NULL) and (partsupp.ps_suppkey > 1)) -------PhysicalOlapScan[partsupp] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[RIGHT_OUTER_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() +------PhysicalDistribute[DistributionSpecHash] +--------filter((supplier.s_suppkey > 1)) +----------hashJoin[FULL_OUTER_JOIN] hashCondition=((nation.n_nationkey = supplier.s_suppkey)) otherCondition=() +------------PhysicalDistribute[DistributionSpecHash] +--------------hashJoin[FULL_OUTER_JOIN] hashCondition=((region.r_regionkey = nation.n_regionkey)) otherCondition=() +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalOlapScan[region] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalOlapScan[nation] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalOlapScan[supplier] +------PhysicalDistribute[DistributionSpecHash] +--------filter(( not ps_suppkey IS NULL) and (partsupp.ps_suppkey > 1)) +----------PhysicalOlapScan[partsupp] + +Hint log: +Used: +UnUsed: [broadcast]_2 +SyntaxError: -- !3 -- PhysicalResultSink ---hashJoin[RIGHT_OUTER_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() -----filter((supplier.s_suppkey > 1)) -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((nation.n_nationkey = supplier.s_suppkey)) otherCondition=() ---------hashJoin[FULL_OUTER_JOIN] hashCondition=((region.r_regionkey = nation.n_regionkey)) otherCondition=() -----------PhysicalOlapScan[region] -----------PhysicalOlapScan[nation] ---------PhysicalOlapScan[supplier] -----filter(( not ps_suppkey IS NULL) and (partsupp.ps_suppkey > 1)) -------PhysicalOlapScan[partsupp] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[RIGHT_OUTER_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() +------PhysicalDistribute[DistributionSpecHash] +--------filter((supplier.s_suppkey > 1)) +----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((nation.n_nationkey = supplier.s_suppkey)) otherCondition=() +------------hashJoin[FULL_OUTER_JOIN] hashCondition=((region.r_regionkey = nation.n_regionkey)) otherCondition=() +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalOlapScan[region] +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalOlapScan[nation] +------------PhysicalDistribute[DistributionSpecReplicated] +--------------PhysicalOlapScan[supplier] +------PhysicalDistribute[DistributionSpecHash] +--------filter(( not ps_suppkey IS NULL) and (partsupp.ps_suppkey > 1)) +----------PhysicalOlapScan[partsupp] + +Hint log: +Used: +UnUsed: [broadcast]_2 +SyntaxError: -- !4 -- PhysicalResultSink ---hashJoin[LEFT_OUTER_JOIN] hashCondition=((region.r_regionkey = nation.n_regionkey)) otherCondition=() -----filter(( not r_name IS NULL) and (region.r_name = '')) -------PhysicalOlapScan[region] -----PhysicalOlapScan[nation] - --- !5 -- -PhysicalResultSink ---hashJoin[LEFT_OUTER_JOIN] hashCondition=((nation.n_nationkey = supplier.s_suppkey)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] ----hashJoin[LEFT_OUTER_JOIN] hashCondition=((region.r_regionkey = nation.n_regionkey)) otherCondition=() ------filter(( not r_name IS NULL) and (region.r_name = '')) --------PhysicalOlapScan[region] -------PhysicalOlapScan[nation] -----PhysicalOlapScan[supplier] +------PhysicalDistribute[DistributionSpecReplicated] +--------PhysicalOlapScan[nation] --- !6 -- +Hint log: +Used: [broadcast]_2 +UnUsed: +SyntaxError: + +-- !5 -- PhysicalResultSink ---hashJoin[LEFT_OUTER_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] ----hashJoin[LEFT_OUTER_JOIN] hashCondition=((nation.n_nationkey = supplier.s_suppkey)) otherCondition=() ------hashJoin[LEFT_OUTER_JOIN] hashCondition=((region.r_regionkey = nation.n_regionkey)) otherCondition=() --------filter(( not r_name IS NULL) and (region.r_name = '')) ----------PhysicalOlapScan[region] ---------PhysicalOlapScan[nation] -------PhysicalOlapScan[supplier] -----PhysicalOlapScan[partsupp] +--------PhysicalDistribute[DistributionSpecReplicated] +----------PhysicalOlapScan[nation] +------PhysicalDistribute[DistributionSpecReplicated] +--------PhysicalOlapScan[supplier] + +Hint log: +Used: [broadcast]_2 +UnUsed: +SyntaxError: + +-- !6 -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_OUTER_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() +------hashJoin[LEFT_OUTER_JOIN] hashCondition=((nation.n_nationkey = supplier.s_suppkey)) otherCondition=() +--------hashJoin[LEFT_OUTER_JOIN] hashCondition=((region.r_regionkey = nation.n_regionkey)) otherCondition=() +----------filter(( not r_name IS NULL) and (region.r_name = '')) +------------PhysicalOlapScan[region] +----------PhysicalDistribute[DistributionSpecReplicated] +------------PhysicalOlapScan[nation] +--------PhysicalDistribute[DistributionSpecReplicated] +----------PhysicalOlapScan[supplier] +------PhysicalDistribute[DistributionSpecReplicated] +--------PhysicalOlapScan[partsupp] + +Hint log: +Used: [broadcast]_2 +UnUsed: +SyntaxError: -- !7 -- PhysicalResultSink ---hashJoin[FULL_OUTER_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() -----hashJoin[LEFT_OUTER_JOIN] hashCondition=((nation.n_nationkey = supplier.s_suppkey)) otherCondition=() -------hashJoin[INNER_JOIN] hashCondition=((region.r_regionkey = nation.n_regionkey)) otherCondition=() build RFs:RF0 n_regionkey->[r_regionkey] ---------filter(( not r_regionkey IS NULL)) -----------PhysicalOlapScan[region] apply RFs: RF0 ---------filter(( not n_regionkey IS NULL)) -----------PhysicalOlapScan[nation] -------PhysicalOlapScan[supplier] -----PhysicalOlapScan[partsupp] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[FULL_OUTER_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() +------PhysicalDistribute[DistributionSpecHash] +--------hashJoin[LEFT_OUTER_JOIN] hashCondition=((nation.n_nationkey = supplier.s_suppkey)) otherCondition=() +----------hashJoin[INNER_JOIN] hashCondition=((region.r_regionkey = nation.n_regionkey)) otherCondition=() build RFs:RF0 n_regionkey->[r_regionkey] +------------filter(( not r_regionkey IS NULL)) +--------------PhysicalOlapScan[region] apply RFs: RF0 +------------PhysicalDistribute[DistributionSpecReplicated] +--------------filter(( not n_regionkey IS NULL)) +----------------PhysicalOlapScan[nation] +----------PhysicalDistribute[DistributionSpecReplicated] +------------PhysicalOlapScan[supplier] +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[partsupp] + +Hint log: +Used: [broadcast]_2 +UnUsed: +SyntaxError: -- !8 -- PhysicalResultSink ---hashJoin[LEFT_OUTER_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() -----hashJoin[LEFT_OUTER_JOIN] hashCondition=((nation.n_nationkey = supplier.s_suppkey)) otherCondition=() -------hashJoin[INNER_JOIN] hashCondition=((region.r_regionkey = nation.n_regionkey)) otherCondition=() build RFs:RF0 n_regionkey->[r_regionkey] ---------filter(( not r_name IS NULL) and ( not r_regionkey IS NULL) and (region.r_name = '')) -----------PhysicalOlapScan[region] apply RFs: RF0 ---------filter(( not n_regionkey IS NULL)) -----------PhysicalOlapScan[nation] -------PhysicalOlapScan[supplier] -----PhysicalOlapScan[partsupp] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_OUTER_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() +------hashJoin[LEFT_OUTER_JOIN] hashCondition=((nation.n_nationkey = supplier.s_suppkey)) otherCondition=() +--------hashJoin[INNER_JOIN] hashCondition=((region.r_regionkey = nation.n_regionkey)) otherCondition=() build RFs:RF0 n_regionkey->[r_regionkey] +----------filter(( not r_name IS NULL) and ( not r_regionkey IS NULL) and (region.r_name = '')) +------------PhysicalOlapScan[region] apply RFs: RF0 +----------PhysicalDistribute[DistributionSpecReplicated] +------------filter(( not n_regionkey IS NULL)) +--------------PhysicalOlapScan[nation] +--------PhysicalDistribute[DistributionSpecReplicated] +----------PhysicalOlapScan[supplier] +------PhysicalDistribute[DistributionSpecReplicated] +--------PhysicalOlapScan[partsupp] + +Hint log: +Used: [broadcast]_2 +UnUsed: +SyntaxError: -- !9 -- PhysicalResultSink ---hashJoin[LEFT_OUTER_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() -----hashJoin[INNER_JOIN] hashCondition=((nation.n_nationkey = supplier.s_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[n_nationkey] -------hashJoin[INNER_JOIN] hashCondition=((region.r_regionkey = nation.n_regionkey)) otherCondition=() build RFs:RF0 n_regionkey->[r_regionkey] ---------filter(( not r_name IS NULL) and ( not r_regionkey IS NULL) and (region.r_name = '')) -----------PhysicalOlapScan[region] apply RFs: RF0 ---------filter(( not n_regionkey IS NULL)) -----------PhysicalOlapScan[nation] apply RFs: RF1 -------PhysicalOlapScan[supplier] -----PhysicalOlapScan[partsupp] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_OUTER_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() +------hashJoin[INNER_JOIN] hashCondition=((nation.n_nationkey = supplier.s_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[n_nationkey] +--------hashJoin[INNER_JOIN] hashCondition=((region.r_regionkey = nation.n_regionkey)) otherCondition=() build RFs:RF0 n_regionkey->[r_regionkey] +----------filter(( not r_name IS NULL) and ( not r_regionkey IS NULL) and (region.r_name = '')) +------------PhysicalOlapScan[region] apply RFs: RF0 +----------PhysicalDistribute[DistributionSpecReplicated] +------------filter(( not n_regionkey IS NULL)) +--------------PhysicalOlapScan[nation] apply RFs: RF1 +--------PhysicalDistribute[DistributionSpecReplicated] +----------PhysicalOlapScan[supplier] +------PhysicalDistribute[DistributionSpecReplicated] +--------PhysicalOlapScan[partsupp] + +Hint log: +Used: [broadcast]_2 +UnUsed: +SyntaxError: diff --git a/regression-test/data/nereids_p0/hint/fix_leading.out b/regression-test/data/nereids_p0/hint/fix_leading.out index 86abd918f9..a3ca4f5411 100644 --- a/regression-test/data/nereids_p0/hint/fix_leading.out +++ b/regression-test/data/nereids_p0/hint/fix_leading.out @@ -1,21 +1,21 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !select1 -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t3.c3) and (t1.c1 = t4.c4)) otherCondition=() --------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() ----------PhysicalOlapScan[t1] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------PhysicalOlapScan[t2] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------NestedLoopJoin[CROSS_JOIN] ------------PhysicalOlapScan[t3] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalOlapScan[t4] Hint log: -Used: leading({ t1 t2 } { t3 t4 }) +Used: leading({ t1 t2 } { t3 t4 } ) UnUsed: SyntaxError: diff --git a/regression-test/data/nereids_p0/hint/test_leading.out b/regression-test/data/nereids_p0/hint/test_leading.out index b97e8e7b75..d1bd8f8bd2 100644 --- a/regression-test/data/nereids_p0/hint/test_leading.out +++ b/regression-test/data/nereids_p0/hint/test_leading.out @@ -1817,13 +1817,13 @@ -- !select70_1 -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() ------------PhysicalProject --------------PhysicalOlapScan[t1] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------PhysicalOlapScan[t2] @@ -1835,13 +1835,13 @@ SyntaxError: leading(t1 t3) Msg:can not find table: t3 -- !select70_2 -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() ------------PhysicalProject --------------PhysicalOlapScan[t1] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------PhysicalOlapScan[t2] @@ -1853,13 +1853,13 @@ SyntaxError: leading(t1 t5) Msg:can not find table: t5 -- !select71_1 -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() ------------PhysicalProject --------------PhysicalOlapScan[t1] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------PhysicalOlapScan[t2] @@ -1871,13 +1871,13 @@ SyntaxError: leading(t1 t1 t2) Msg:duplicated table -- !select71_2 -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() ------------PhysicalProject --------------PhysicalOlapScan[t1] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------PhysicalOlapScan[t2] @@ -1889,81 +1889,81 @@ SyntaxError: leading(t1 t2 t2) Msg:duplicated table -- !select72_1 -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() ------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() --------------PhysicalProject ----------------PhysicalOlapScan[t1] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------PhysicalOlapScan[t2] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((t3.c3 = t4.c4)) otherCondition=() ------------------PhysicalProject --------------------PhysicalOlapScan[t4] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[t3] Hint log: -Used: leading(t4 t3) +Used: leading(t4 t3 ) UnUsed: SyntaxError: -- !select72_2 -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() ------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() --------------PhysicalProject ----------------PhysicalOlapScan[t1] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------PhysicalOlapScan[t2] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((t3.c3 = t4.c4)) otherCondition=() ------------------PhysicalProject --------------------PhysicalOlapScan[t3] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[t4] Hint log: -Used: leading(t1 t2) +Used: leading(t1 t2 ) UnUsed: SyntaxError: -- !select73_1 -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() ------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() --------------PhysicalProject ----------------PhysicalOlapScan[t1] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------PhysicalOlapScan[t2] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((t3.c3 = t4.c4)) otherCondition=() ------------------PhysicalProject --------------------PhysicalOlapScan[t4] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[t3] Hint log: -Used: leading(t1 t2) leading(t4 t3) +Used: leading(t1 t2 ) leading(t4 t3 ) UnUsed: SyntaxError: @@ -2278,3 +2278,1451 @@ SyntaxError: -- !select88_13 -- 119 + +-- !select90_1 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +------------PhysicalProject +--------------PhysicalOlapScan[t1] +------------PhysicalDistribute[DistributionSpecReplicated] +--------------PhysicalProject +----------------PhysicalOlapScan[t2] + +Hint log: +Used: [broadcast]_2 +UnUsed: +SyntaxError: + +-- !select90_2 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t1] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t2] + +Hint log: +Used: +UnUsed: [broadcast]_2 +SyntaxError: + +-- !select90_3 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +------------------PhysicalProject +--------------------PhysicalOlapScan[t1] +------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------PhysicalProject +----------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: [broadcast]_2 [shuffle]_3 +UnUsed: +SyntaxError: + +-- !select90_4 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: [shuffle]_3 +UnUsed: [broadcast]_2 +SyntaxError: + +-- !select90_5 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +------------------PhysicalProject +--------------------PhysicalOlapScan[t1] +------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------PhysicalProject +----------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: [broadcast]_2 [shuffle]_3 +UnUsed: +SyntaxError: + +-- !select90_6 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +------------------PhysicalProject +--------------------PhysicalOlapScan[t1] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalProject +----------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: [shuffle]_2 +UnUsed: [broadcast]_3 +SyntaxError: + +-- !select91_1 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalProject +------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: leading(t1 t2 t3 ) +UnUsed: [broadcast]_2 [shuffle]_3 +SyntaxError: + +-- !select91_2 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: leading(t1 t2 t3 ) +UnUsed: [broadcast]_2 [shuffle]_3 +SyntaxError: + +-- !select91_3 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +------------------PhysicalProject +--------------------PhysicalOlapScan[t1] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalProject +----------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: leading(t1 t2 t3 ) +UnUsed: [broadcast]_2 [shuffle]_3 +SyntaxError: + +-- !select91_4 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +------------------PhysicalProject +--------------------PhysicalOlapScan[t1] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalProject +----------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: leading(t1 t2 t3 ) +UnUsed: [shuffle]_2 [broadcast]_3 +SyntaxError: + +-- !select92_1 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalProject +------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecReplicated] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: leading(t1 shuffle t2 broadcast t3 ) +UnUsed: +SyntaxError: + +-- !select92_2 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +------------PhysicalProject +--------------PhysicalOlapScan[t1] +------------PhysicalDistribute[DistributionSpecReplicated] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------PhysicalProject +----------------------PhysicalOlapScan[t3] + +Hint log: +Used: leading(t1 { t2 broadcast t3 } ) +UnUsed: [shuffle]_2 +SyntaxError: + +-- !select92_3 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +------------PhysicalProject +--------------PhysicalOlapScan[t1] +------------PhysicalDistribute[DistributionSpecReplicated] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------------PhysicalProject +--------------------PhysicalOlapScan[t3] +------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------PhysicalProject +----------------------PhysicalOlapScan[t2] + +Hint log: +Used: leading(t1 { t3 broadcast t2 } ) +UnUsed: [shuffle]_2 +SyntaxError: + +-- !select92_4 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalProject +------------------PhysicalOlapScan[t2] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t1] +------------PhysicalDistribute[DistributionSpecReplicated] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: leading(t2 shuffle t1 broadcast t3 ) +UnUsed: +SyntaxError: + +-- !select92_5 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2) and (t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecReplicated] +--------------NestedLoopJoin[CROSS_JOIN] +----------------PhysicalProject +------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecReplicated] +------------------PhysicalProject +--------------------PhysicalOlapScan[t3] + +Hint log: +Used: leading(t2 { t1 broadcast t3 } ) +UnUsed: [shuffle]_2 +SyntaxError: + +-- !select92_6 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2) and (t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecReplicated] +--------------NestedLoopJoin[CROSS_JOIN] +----------------PhysicalProject +------------------PhysicalOlapScan[t3] +----------------PhysicalDistribute[DistributionSpecReplicated] +------------------PhysicalProject +--------------------PhysicalOlapScan[t1] + +Hint log: +Used: leading(t2 { t3 broadcast t1 } ) +UnUsed: [shuffle]_2 +SyntaxError: + +-- !select93_1 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalProject +------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecReplicated] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: leading(t1 t2 broadcast t3 ) +UnUsed: +SyntaxError: + +-- !select93_2 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +------------PhysicalProject +--------------PhysicalOlapScan[t1] +------------PhysicalDistribute[DistributionSpecReplicated] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------PhysicalProject +----------------------PhysicalOlapScan[t3] + +Hint log: +Used: leading(t1 { t2 broadcast t3 } ) +UnUsed: +SyntaxError: + +-- !select93_3 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +------------PhysicalProject +--------------PhysicalOlapScan[t1] +------------PhysicalDistribute[DistributionSpecReplicated] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------------PhysicalProject +--------------------PhysicalOlapScan[t3] +------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------PhysicalProject +----------------------PhysicalOlapScan[t2] + +Hint log: +Used: leading(t1 { t3 broadcast t2 } ) +UnUsed: +SyntaxError: + +-- !select93_4 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalProject +------------------PhysicalOlapScan[t2] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t1] +------------PhysicalDistribute[DistributionSpecReplicated] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: leading(t2 t1 broadcast t3 ) +UnUsed: +SyntaxError: + +-- !select93_5 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2) and (t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecReplicated] +--------------NestedLoopJoin[CROSS_JOIN] +----------------PhysicalProject +------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecReplicated] +------------------PhysicalProject +--------------------PhysicalOlapScan[t3] + +Hint log: +Used: leading(t2 { t1 broadcast t3 } ) +UnUsed: +SyntaxError: + +-- !select93_6 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2) and (t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecReplicated] +--------------NestedLoopJoin[CROSS_JOIN] +----------------PhysicalProject +------------------PhysicalOlapScan[t3] +----------------PhysicalDistribute[DistributionSpecReplicated] +------------------PhysicalProject +--------------------PhysicalOlapScan[t1] + +Hint log: +Used: leading(t2 { t3 broadcast t1 } ) +UnUsed: +SyntaxError: + +-- !select94_2 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalProject +------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: leading(t1 shuffle t2 t3 ) +UnUsed: +SyntaxError: + +-- !select94_2 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +------------PhysicalProject +--------------PhysicalOlapScan[t1] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalProject +----------------------PhysicalOlapScan[t3] + +Hint log: +Used: leading(t1 { t2 t3 } ) +UnUsed: [shuffle]_2 +SyntaxError: + +-- !select94_2 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +------------PhysicalProject +--------------PhysicalOlapScan[t1] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------------PhysicalProject +--------------------PhysicalOlapScan[t3] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalProject +----------------------PhysicalOlapScan[t2] + +Hint log: +Used: leading(t1 { t3 t2 } ) +UnUsed: [shuffle]_2 +SyntaxError: + +-- !select94_2 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalProject +------------------PhysicalOlapScan[t2] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t1] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: leading(t2 shuffle t1 t3 ) +UnUsed: +SyntaxError: + +-- !select94_2 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2) and (t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------NestedLoopJoin[CROSS_JOIN] +----------------PhysicalProject +------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecReplicated] +------------------PhysicalProject +--------------------PhysicalOlapScan[t3] + +Hint log: +Used: leading(t2 { t1 t3 } ) +UnUsed: [shuffle]_2 +SyntaxError: + +-- !select94_2 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2) and (t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------NestedLoopJoin[CROSS_JOIN] +----------------PhysicalProject +------------------PhysicalOlapScan[t3] +----------------PhysicalDistribute[DistributionSpecReplicated] +------------------PhysicalProject +--------------------PhysicalOlapScan[t1] + +Hint log: +Used: leading(t2 { t3 t1 } ) +UnUsed: [shuffle]_2 +SyntaxError: + +-- !select95_1 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalProject +------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecReplicated] +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecReplicated] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: leading(t1 broadcast t2 t3 ) +UnUsed: +SyntaxError: + +-- !select95_2 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalProject +------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: +UnUsed: [broadcast]_2 leading(t1 broadcast { t2 t3 }) +SyntaxError: + +-- !select95_3 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalProject +------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: +UnUsed: [broadcast]_2 leading(t1 broadcast { t3 t2 }) +SyntaxError: + +-- !select95_4 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalProject +------------------PhysicalOlapScan[t2] +----------------PhysicalDistribute[DistributionSpecReplicated] +------------------PhysicalProject +--------------------PhysicalOlapScan[t1] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: leading(t2 broadcast t1 t3 ) +UnUsed: +SyntaxError: + +-- !select95_5 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalProject +------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: +UnUsed: [broadcast]_2 leading(t2 broadcast { t1 t3 }) +SyntaxError: + +-- !select95_6 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalProject +------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: +UnUsed: [broadcast]_2 leading(t2 broadcast { t3 t1 }) +SyntaxError: + +-- !select95_7 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalProject +------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: +UnUsed: leading(t3 broadcast t1 t2) +SyntaxError: + +-- !select95_8 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------PhysicalOlapScan[t3] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +------------------PhysicalProject +--------------------PhysicalOlapScan[t1] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalProject +----------------------PhysicalOlapScan[t2] + +Hint log: +Used: leading(t3 { t1 t2 } ) +UnUsed: [broadcast]_2 +SyntaxError: + +-- !select95_9 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------PhysicalOlapScan[t3] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalProject +----------------------PhysicalOlapScan[t1] + +Hint log: +Used: leading(t3 { t2 t1 } ) +UnUsed: [broadcast]_2 +SyntaxError: + +-- !select96_1 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalProject +------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecReplicated] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: leading(t1 shuffle t2 broadcast t3 ) +UnUsed: +SyntaxError: + +-- !select96_2 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalProject +------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: +UnUsed: [shuffle]_2 [broadcast]_3 leading(t1 shuffle { t2 broadcast t3 }) +SyntaxError: + +-- !select96_3 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalProject +------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: +UnUsed: [shuffle]_2 [broadcast]_3 leading(t1 shuffle { t3 broadcast t2 }) +SyntaxError: + +-- !select96_4 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalProject +------------------PhysicalOlapScan[t2] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t1] +------------PhysicalDistribute[DistributionSpecReplicated] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: leading(t2 shuffle t1 broadcast t3 ) +UnUsed: +SyntaxError: + +-- !select96_5 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalProject +------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: +UnUsed: [shuffle]_2 leading(t2 shuffle { t1 broadcast t3 }) +SyntaxError: + +-- !select96_6 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalProject +------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: +UnUsed: [shuffle]_2 leading(t2 shuffle { t3 broadcast t1 }) +SyntaxError: + +-- !select96_7 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalProject +------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: +UnUsed: [broadcast]_3 leading(t3 shuffle t1 broadcast t2) +SyntaxError: + +-- !select96_8 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------PhysicalOlapScan[t3] +------------PhysicalDistribute[DistributionSpecReplicated] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +------------------PhysicalProject +--------------------PhysicalOlapScan[t1] +------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------PhysicalProject +----------------------PhysicalOlapScan[t2] + +Hint log: +Used: leading(t3 { t1 broadcast t2 } ) +UnUsed: [shuffle]_2 +SyntaxError: + +-- !select96_9 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------PhysicalOlapScan[t3] +------------PhysicalDistribute[DistributionSpecReplicated] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------PhysicalProject +----------------------PhysicalOlapScan[t1] + +Hint log: +Used: leading(t3 { t2 broadcast t1 } ) +UnUsed: [shuffle]_2 +SyntaxError: + +-- !select97_1 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +------------------PhysicalProject +--------------------PhysicalOlapScan[t1] +------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------PhysicalProject +----------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: leading(t1 broadcast t2 shuffle t3 ) +UnUsed: +SyntaxError: + +-- !select97_2 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalProject +------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: +UnUsed: [broadcast]_2 [shuffle]_3 leading(t1 broadcast { t2 shuffle t3 }) +SyntaxError: + +-- !select97_3 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalProject +------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: +UnUsed: [broadcast]_2 [shuffle]_3 leading(t1 broadcast { t3 shuffle t2 }) +SyntaxError: + +-- !select97_4 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalProject +------------------PhysicalOlapScan[t2] +----------------PhysicalDistribute[DistributionSpecReplicated] +------------------PhysicalProject +--------------------PhysicalOlapScan[t1] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: leading(t2 broadcast t1 shuffle t3 ) +UnUsed: +SyntaxError: + +-- !select97_5 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalProject +------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: +UnUsed: [broadcast]_2 leading(t2 broadcast { t1 shuffle t3 }) +SyntaxError: + +-- !select97_6 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalProject +------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: +UnUsed: [broadcast]_2 leading(t2 broadcast { t3 shuffle t1 }) +SyntaxError: + +-- !select97_7 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +----------------PhysicalProject +------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------PhysicalOlapScan[t3] + +Hint log: +Used: +UnUsed: [shuffle]_3 leading(t3 broadcast t1 shuffle t2) +SyntaxError: + +-- !select97_8 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------PhysicalOlapScan[t3] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +------------------PhysicalProject +--------------------PhysicalOlapScan[t1] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalProject +----------------------PhysicalOlapScan[t2] + +Hint log: +Used: leading(t3 { t1 shuffle t2 } ) +UnUsed: [broadcast]_2 +SyntaxError: + +-- !select97_9 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3)) otherCondition=() +------------PhysicalProject +--------------PhysicalOlapScan[t3] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2)) otherCondition=() +------------------PhysicalProject +--------------------PhysicalOlapScan[t2] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalProject +----------------------PhysicalOlapScan[t1] + +Hint log: +Used: leading(t3 { t2 shuffle t1 } ) +UnUsed: [broadcast]_2 +SyntaxError: + +-- !select100_0 -- +1719 + +-- !select100_1 -- +1719 + +-- !select100_2 -- +1980 + +-- !select100_3 -- +3103 + +-- !select100_4 -- +3512 + +-- !select100_5 -- +3472 + +-- !select100_6 -- +3472 + +-- !select101_0 -- +3103 + +-- !select101_1 -- +3103 + +-- !select101_2 -- +3512 + +-- !select101_3 -- +3472 + +-- !select101_4 -- +3472 + +-- !select102_0 -- +3103 + +-- !select102_1 -- +3103 + +-- !select102_2 -- +3103 + +-- !select102_3 -- +3103 + +-- !select102_4 -- +3103 + +-- !select102_5 -- +3103 + +-- !select102_6 -- +3103 + +-- !select103_0 -- +3103 + +-- !select103_1 -- +3103 + +-- !select103_2 -- +3103 + +-- !select103_3 -- +3103 + +-- !select103_4 -- +3103 + +-- !select103_5 -- +3103 + +-- !select103_6 -- +3103 + +-- !select104_0 -- +3103 + +-- !select104_1 -- +3103 + +-- !select104_2 -- +3103 + +-- !select104_3 -- +3103 + +-- !select104_4 -- +3103 + +-- !select104_5 -- +3103 + +-- !select104_6 -- +3103 + +-- !select105_0 -- +3103 + +-- !select105_1 -- +3103 + +-- !select105_2 -- +3103 + +-- !select105_3 -- +3103 + +-- !select105_4 -- +3103 + +-- !select105_5 -- +3103 + +-- !select105_6 -- +3103 + +-- !select105_7 -- +3103 + +-- !select105_8 -- +3103 + +-- !select105_9 -- +3103 + +-- !select106_0 -- +3103 + +-- !select106_1 -- +3103 + +-- !select106_2 -- +3103 + +-- !select106_3 -- +3103 + +-- !select106_4 -- +3103 + +-- !select106_5 -- +3103 + +-- !select106_6 -- +3103 + +-- !select106_7 -- +3103 + +-- !select106_8 -- +3103 + +-- !select106_9 -- +3103 + +-- !select107_0 -- +3103 + +-- !select107_1 -- +3103 + +-- !select107_2 -- +3103 + +-- !select107_3 -- +3103 + +-- !select107_4 -- +3103 + +-- !select107_5 -- +3103 + +-- !select107_6 -- +3103 + +-- !select107_7 -- +3103 + +-- !select107_8 -- +3103 + +-- !select107_9 -- +3103 + diff --git a/regression-test/data/nereids_rules_p0/eager_aggregate/basic.out b/regression-test/data/nereids_rules_p0/eager_aggregate/basic.out index 1fb129bcaf..cf56e86f26 100644 --- a/regression-test/data/nereids_rules_p0/eager_aggregate/basic.out +++ b/regression-test/data/nereids_rules_p0/eager_aggregate/basic.out @@ -1,43 +1,55 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !1 -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() build RFs:RF0 device_id->[device_id] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------filter((a.event_id = 'ad_click')) -------------PhysicalOlapScan[com_dd_library] apply RFs: RF0 ---------hashAgg[LOCAL] -----------filter((cast(experiment_id as DOUBLE) = 37)) -------------PhysicalOlapScan[shunt_log_com_dd_library] +----------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() build RFs:RF0 device_id->[device_id] +------------hashAgg[LOCAL] +--------------filter((a.event_id = 'ad_click')) +----------------PhysicalOlapScan[com_dd_library] apply RFs: RF0 +------------PhysicalDistribute[DistributionSpecHash] +--------------hashAgg[LOCAL] +----------------filter((cast(experiment_id as DOUBLE) = 37)) +------------------PhysicalOlapScan[shunt_log_com_dd_library] -- !2 -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() build RFs:RF0 device_id->[device_id] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------PhysicalOlapScan[com_dd_library] apply RFs: RF0 ---------hashAgg[LOCAL] -----------filter((cast(experiment_id as DOUBLE) = 73)) -------------PhysicalOlapScan[shunt_log_com_dd_library] +----------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() build RFs:RF0 device_id->[device_id] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[com_dd_library] apply RFs: RF0 +------------PhysicalDistribute[DistributionSpecHash] +--------------hashAgg[LOCAL] +----------------filter((cast(experiment_id as DOUBLE) = 73)) +------------------PhysicalOlapScan[shunt_log_com_dd_library] -- !3 -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() build RFs:RF0 device_id->[device_id] ---------PhysicalOlapScan[com_dd_library] apply RFs: RF0 ---------filter((cast(experiment_id as DOUBLE) = 73)) -----------PhysicalOlapScan[shunt_log_com_dd_library] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() build RFs:RF0 device_id->[device_id] +------------PhysicalOlapScan[com_dd_library] apply RFs: RF0 +------------PhysicalDistribute[DistributionSpecHash] +--------------filter((cast(experiment_id as DOUBLE) = 73)) +----------------PhysicalOlapScan[shunt_log_com_dd_library] -- !4 -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------PhysicalOlapScan[com_dd_library] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[shunt_log_com_dd_library] +----------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[com_dd_library] +------------PhysicalDistribute[DistributionSpecHash] +--------------hashAgg[LOCAL] +----------------PhysicalOlapScan[shunt_log_com_dd_library] diff --git a/regression-test/data/nereids_rules_p0/eager_aggregate/basic_one_side.out b/regression-test/data/nereids_rules_p0/eager_aggregate/basic_one_side.out index dac93a7105..1c4e0c83b5 100644 --- a/regression-test/data/nereids_rules_p0/eager_aggregate/basic_one_side.out +++ b/regression-test/data/nereids_rules_p0/eager_aggregate/basic_one_side.out @@ -1,40 +1,52 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !1 -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() build RFs:RF0 device_id->[device_id] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------filter((a.event_id = 'ad_click')) -------------PhysicalOlapScan[com_dd_library_one_side] apply RFs: RF0 ---------filter((cast(experiment_id as DOUBLE) = 37)) -----------PhysicalOlapScan[shunt_log_com_dd_library_one_side] +----------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() build RFs:RF0 device_id->[device_id] +------------hashAgg[LOCAL] +--------------filter((a.event_id = 'ad_click')) +----------------PhysicalOlapScan[com_dd_library_one_side] apply RFs: RF0 +------------PhysicalDistribute[DistributionSpecHash] +--------------filter((cast(experiment_id as DOUBLE) = 37)) +----------------PhysicalOlapScan[shunt_log_com_dd_library_one_side] -- !2 -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() build RFs:RF0 device_id->[device_id] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------PhysicalOlapScan[com_dd_library_one_side] apply RFs: RF0 ---------filter((cast(experiment_id as DOUBLE) = 73)) -----------PhysicalOlapScan[shunt_log_com_dd_library_one_side] +----------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() build RFs:RF0 device_id->[device_id] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[com_dd_library_one_side] apply RFs: RF0 +------------PhysicalDistribute[DistributionSpecHash] +--------------filter((cast(experiment_id as DOUBLE) = 73)) +----------------PhysicalOlapScan[shunt_log_com_dd_library_one_side] -- !3 -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() build RFs:RF0 device_id->[device_id] ---------PhysicalOlapScan[com_dd_library_one_side] apply RFs: RF0 ---------filter((cast(experiment_id as DOUBLE) = 73)) -----------PhysicalOlapScan[shunt_log_com_dd_library_one_side] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() build RFs:RF0 device_id->[device_id] +------------PhysicalOlapScan[com_dd_library_one_side] apply RFs: RF0 +------------PhysicalDistribute[DistributionSpecHash] +--------------filter((cast(experiment_id as DOUBLE) = 73)) +----------------PhysicalOlapScan[shunt_log_com_dd_library_one_side] -- !4 -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------PhysicalOlapScan[com_dd_library_one_side] ---------PhysicalOlapScan[shunt_log_com_dd_library_one_side] +----------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[com_dd_library_one_side] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalOlapScan[shunt_log_com_dd_library_one_side] diff --git a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_count_through_join.out b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_count_through_join.out index 7cdf0f16d0..dcec484dfd 100644 --- a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_count_through_join.out +++ b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_count_through_join.out @@ -1,461 +1,557 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !groupby_pushdown_basic -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t] -- !groupby_pushdown_left_join -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t] +------------PhysicalOlapScan[count_t] -- !groupby_pushdown_right_join -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t] +------------PhysicalOlapScan[count_t] -- !groupby_pushdown_full_join -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t] +------------PhysicalOlapScan[count_t] -- !groupby_pushdown_left_semi_join -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t] -- !groupby_pushdown_left_anti_join -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t] +------------PhysicalOlapScan[count_t] -- !groupby_pushdown_complex_conditions -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) +------------PhysicalOlapScan[count_t] +------------PhysicalOlapScan[count_t] -- !groupby_pushdown_with_aggregate -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t] +------------PhysicalOlapScan[count_t] -- !groupby_pushdown_subquery -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------filter((count_t.score > 10)) -------------PhysicalOlapScan[count_t] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------hashAgg[LOCAL] +--------------filter((count_t.score > 10)) +----------------PhysicalOlapScan[count_t] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t] -- !groupby_pushdown_outer_join -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t] +------------PhysicalOlapScan[count_t] -- !groupby_pushdown_deep_subquery -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------filter((count_t.score > 10)) -------------PhysicalOlapScan[count_t] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------hashAgg[LOCAL] +--------------filter((count_t.score > 10)) +----------------PhysicalOlapScan[count_t] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t] -- !groupby_pushdown_having -- PhysicalResultSink ---filter((count(score) > 100)) -----hashAgg[GLOBAL] -------hashAgg[LOCAL] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----filter((count(score) > 100)) +------hashAgg[GLOBAL] +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] -------------PhysicalOlapScan[count_t] -----------hashAgg[LOCAL] -------------PhysicalOlapScan[count_t] +------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------------hashAgg[LOCAL] +----------------PhysicalOlapScan[count_t] +--------------hashAgg[LOCAL] +----------------PhysicalOlapScan[count_t] -- !groupby_pushdown_mixed_aggregates -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t] +------------PhysicalOlapScan[count_t] -- !groupby_pushdown_multi_table_join -- PhysicalResultSink ---hashAgg[LOCAL] -----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[count_t] +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[count_t] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalOlapScan[count_t] -------------hashAgg[LOCAL] ---------------PhysicalOlapScan[count_t] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] -- !groupby_pushdown_with_order_by -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalQuickSort[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----PhysicalDistribute[DistributionSpecGather] +------PhysicalQuickSort[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] ---------------PhysicalOlapScan[count_t] -------------hashAgg[LOCAL] ---------------PhysicalOlapScan[count_t] +--------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[count_t] +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[count_t] -- !groupby_pushdown_multiple_equal_conditions -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t] -- !groupby_pushdown_equal_conditions_with_aggregate -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +------------PhysicalOlapScan[count_t] +------------PhysicalOlapScan[count_t] -- !groupby_pushdown_equal_conditions_non_aggregate_selection -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t] -- !groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t] -- !groupby_pushdown_with_where_clause -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------filter((t1.score > 50)) -------------PhysicalOlapScan[count_t] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------hashAgg[LOCAL] +--------------filter((t1.score > 50)) +----------------PhysicalOlapScan[count_t] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t] -- !groupby_pushdown_varied_aggregates -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t] +------------PhysicalOlapScan[count_t] -- !groupby_pushdown_with_order_by_limit -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] ---------------PhysicalOlapScan[count_t] -------------hashAgg[LOCAL] ---------------PhysicalOlapScan[count_t] +--------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[count_t] +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[count_t] -- !groupby_pushdown_alias_multiple_equal_conditions -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1_alias.id = t2_alias.id) and (t1_alias.name = t2_alias.name)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] +----------hashJoin[INNER_JOIN] hashCondition=((t1_alias.id = t2_alias.id) and (t1_alias.name = t2_alias.name)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t] -- !groupby_pushdown_complex_join_condition -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) +------------PhysicalOlapScan[count_t] +------------PhysicalOlapScan[count_t] -- !groupby_pushdown_function_processed_columns -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t] +------------PhysicalOlapScan[count_t] -- !groupby_pushdown_nested_queries -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------filter((count_t.score > 20) and (t1.id < 100)) -------------PhysicalOlapScan[count_t] apply RFs: RF0 ---------hashAgg[LOCAL] -----------filter((count_t.id < 100)) -------------PhysicalOlapScan[count_t] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------------hashAgg[LOCAL] +--------------filter((count_t.score > 20) and (t1.id < 100)) +----------------PhysicalOlapScan[count_t] apply RFs: RF0 +------------hashAgg[LOCAL] +--------------filter((count_t.id < 100)) +----------------PhysicalOlapScan[count_t] -- !groupby_pushdown_basic -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] - --- !groupby_pushdown_left_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_right_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_full_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_left_semi_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] - --- !groupby_pushdown_left_anti_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_complex_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] - --- !groupby_pushdown_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[LOCAL] -----------filter((count_t.score > 10)) -------------PhysicalOlapScan[count_t] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] - --- !groupby_pushdown_outer_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_deep_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[LOCAL] -----------filter((count_t.score > 10)) -------------PhysicalOlapScan[count_t] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] - --- !groupby_pushdown_having -- -PhysicalResultSink ---filter((count(*) > 100)) +--PhysicalDistribute[DistributionSpecGather] ----hashAgg[GLOBAL] -------hashAgg[LOCAL] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------hashAgg[LOCAL] -------------PhysicalOlapScan[count_t] -----------hashAgg[LOCAL] -------------PhysicalOlapScan[count_t] - --- !groupby_pushdown_multi_table_join -- -PhysicalResultSink ---hashAgg[LOCAL] -----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() -------hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ------------hashAgg[LOCAL] --------------PhysicalOlapScan[count_t] ------------hashAgg[LOCAL] --------------PhysicalOlapScan[count_t] -------hashAgg[GLOBAL] + +-- !groupby_pushdown_left_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] +----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t] +------------PhysicalOlapScan[count_t] + +-- !groupby_pushdown_right_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t] +------------PhysicalOlapScan[count_t] + +-- !groupby_pushdown_full_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t] +------------PhysicalOlapScan[count_t] + +-- !groupby_pushdown_left_semi_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t] + +-- !groupby_pushdown_left_anti_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t] +------------PhysicalOlapScan[count_t] + +-- !groupby_pushdown_complex_conditions -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) +------------PhysicalOlapScan[count_t] +------------PhysicalOlapScan[count_t] + +-- !groupby_pushdown_with_aggregate -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t] + +-- !groupby_pushdown_subquery -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------hashAgg[LOCAL] +--------------filter((count_t.score > 10)) +----------------PhysicalOlapScan[count_t] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t] + +-- !groupby_pushdown_outer_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t] +------------PhysicalOlapScan[count_t] + +-- !groupby_pushdown_deep_subquery -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------hashAgg[LOCAL] +--------------filter((count_t.score > 10)) +----------------PhysicalOlapScan[count_t] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t] + +-- !groupby_pushdown_having -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----filter((count(*) > 100)) +------hashAgg[GLOBAL] +--------PhysicalDistribute[DistributionSpecHash] +----------hashAgg[LOCAL] +------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------------hashAgg[LOCAL] +----------------PhysicalOlapScan[count_t] +--------------hashAgg[LOCAL] +----------------PhysicalOlapScan[count_t] + +-- !groupby_pushdown_multi_table_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[count_t] +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[count_t] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t] -- !groupby_pushdown_with_order_by -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalQuickSort[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----PhysicalDistribute[DistributionSpecGather] +------PhysicalQuickSort[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] ---------------PhysicalOlapScan[count_t] -------------hashAgg[LOCAL] ---------------PhysicalOlapScan[count_t] +--------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[count_t] +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[count_t] -- !groupby_pushdown_multiple_equal_conditions -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t] -- !groupby_pushdown_equal_conditions_non_aggregate_selection -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t] -- !groupby_pushdown_with_where_clause -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------filter((t1.score > 50)) -------------PhysicalOlapScan[count_t] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------hashAgg[LOCAL] +--------------filter((t1.score > 50)) +----------------PhysicalOlapScan[count_t] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t] -- !groupby_pushdown_varied_aggregates -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t] +------------PhysicalOlapScan[count_t] -- !groupby_pushdown_with_order_by_limit -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] ---------------PhysicalOlapScan[count_t] -------------hashAgg[LOCAL] ---------------PhysicalOlapScan[count_t] +--------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[count_t] +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[count_t] -- !groupby_pushdown_complex_join_condition -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) +------------PhysicalOlapScan[count_t] +------------PhysicalOlapScan[count_t] -- !groupby_pushdown_nested_queries -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------filter((count_t.score > 20) and (t1.id < 100)) -------------PhysicalOlapScan[count_t] apply RFs: RF0 ---------hashAgg[LOCAL] -----------filter((count_t.id < 100)) -------------PhysicalOlapScan[count_t] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------------hashAgg[LOCAL] +--------------filter((count_t.score > 20) and (t1.id < 100)) +----------------PhysicalOlapScan[count_t] apply RFs: RF0 +------------hashAgg[LOCAL] +--------------filter((count_t.id < 100)) +----------------PhysicalOlapScan[count_t] diff --git a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_count_through_join_one_side.out b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_count_through_join_one_side.out index c28f225c99..f35a74ae3d 100644 --- a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_count_through_join_one_side.out +++ b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_count_through_join_one_side.out @@ -1,417 +1,513 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !groupby_pushdown_basic -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t_one_side] +------------PhysicalOlapScan[count_t_one_side] -- !groupby_pushdown_left_join -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t_one_side] +------------PhysicalOlapScan[count_t_one_side] -- !groupby_pushdown_right_join -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t_one_side] +------------PhysicalOlapScan[count_t_one_side] -- !groupby_pushdown_full_join -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t_one_side] +------------PhysicalOlapScan[count_t_one_side] -- !groupby_pushdown_left_semi_join -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t_one_side] +------------PhysicalOlapScan[count_t_one_side] -- !groupby_pushdown_left_anti_join -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t_one_side] +------------PhysicalOlapScan[count_t_one_side] -- !groupby_pushdown_complex_conditions -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) +------------PhysicalOlapScan[count_t_one_side] +------------PhysicalOlapScan[count_t_one_side] -- !groupby_pushdown_with_aggregate -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t_one_side] +------------PhysicalOlapScan[count_t_one_side] -- !groupby_pushdown_subquery -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalOlapScan[count_t_one_side] apply RFs: RF0 +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------filter((count_t_one_side.score > 10)) -------------PhysicalOlapScan[count_t_one_side] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------------PhysicalOlapScan[count_t_one_side] apply RFs: RF0 +------------hashAgg[LOCAL] +--------------filter((count_t_one_side.score > 10)) +----------------PhysicalOlapScan[count_t_one_side] -- !groupby_pushdown_outer_join -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t_one_side] +------------PhysicalOlapScan[count_t_one_side] -- !groupby_pushdown_deep_subquery -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalOlapScan[count_t_one_side] apply RFs: RF0 +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------filter((count_t_one_side.score > 10)) -------------PhysicalOlapScan[count_t_one_side] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------------PhysicalOlapScan[count_t_one_side] apply RFs: RF0 +------------hashAgg[LOCAL] +--------------filter((count_t_one_side.score > 10)) +----------------PhysicalOlapScan[count_t_one_side] -- !groupby_pushdown_having -- PhysicalResultSink ---filter((count(score) > 100)) -----hashAgg[GLOBAL] -------hashAgg[LOCAL] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----filter((count(score) > 100)) +------hashAgg[GLOBAL] +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] -------------PhysicalOlapScan[count_t_one_side] -----------PhysicalOlapScan[count_t_one_side] +------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------------hashAgg[LOCAL] +----------------PhysicalOlapScan[count_t_one_side] +--------------PhysicalOlapScan[count_t_one_side] -- !groupby_pushdown_mixed_aggregates -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t_one_side] +------------PhysicalOlapScan[count_t_one_side] -- !groupby_pushdown_multi_table_join -- PhysicalResultSink ---hashAgg[LOCAL] -----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] ---------------PhysicalOlapScan[count_t_one_side] -------------PhysicalOlapScan[count_t_one_side] -------PhysicalOlapScan[count_t_one_side] +--------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[count_t_one_side] +----------------PhysicalOlapScan[count_t_one_side] +--------PhysicalDistribute[DistributionSpecHash] +----------PhysicalOlapScan[count_t_one_side] -- !groupby_pushdown_with_order_by -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalQuickSort[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----PhysicalDistribute[DistributionSpecGather] +------PhysicalQuickSort[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] ---------------PhysicalOlapScan[count_t_one_side] -------------PhysicalOlapScan[count_t_one_side] +--------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[count_t_one_side] +----------------PhysicalOlapScan[count_t_one_side] -- !groupby_pushdown_multiple_equal_conditions -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t_one_side] +------------PhysicalOlapScan[count_t_one_side] -- !groupby_pushdown_equal_conditions_with_aggregate -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +------------PhysicalOlapScan[count_t_one_side] +------------PhysicalOlapScan[count_t_one_side] -- !groupby_pushdown_equal_conditions_non_aggregate_selection -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t_one_side] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_with_where_clause -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalOlapScan[count_t_one_side] apply RFs: RF0 ---------hashAgg[LOCAL] -----------filter((t1.score > 50)) -------------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_varied_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_with_order_by_limit -- -PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ------------hashAgg[LOCAL] --------------PhysicalOlapScan[count_t_one_side] ------------PhysicalOlapScan[count_t_one_side] --- !groupby_pushdown_alias_multiple_equal_conditions -- +-- !groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1_alias.id = t2_alias.id) and (t1_alias.name = t2_alias.name)) otherCondition=() ---------hashAgg[LOCAL] -----------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_complex_join_condition -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_function_processed_columns -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_nested_queries -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------filter((count_t_one_side.id < 100)) -----------PhysicalOlapScan[count_t_one_side] apply RFs: RF0 ---------hashAgg[LOCAL] -----------filter((count_t_one_side.score > 20) and (t1.id < 100)) -------------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_basic -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_left_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_right_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_full_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_left_semi_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_left_anti_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_complex_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalOlapScan[count_t_one_side] apply RFs: RF0 ---------filter((count_t_one_side.score > 10)) -----------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_outer_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_deep_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalOlapScan[count_t_one_side] apply RFs: RF0 ---------filter((count_t_one_side.score > 10)) -----------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_having -- -PhysicalResultSink ---filter((count(*) > 100)) +--PhysicalDistribute[DistributionSpecGather] ----hashAgg[GLOBAL] -------hashAgg[LOCAL] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[count_t_one_side] -----------PhysicalOlapScan[count_t_one_side] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t_one_side] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t_one_side] --- !groupby_pushdown_multi_table_join -- +-- !groupby_pushdown_with_where_clause -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[count_t_one_side] -----------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------------PhysicalOlapScan[count_t_one_side] apply RFs: RF0 +------------hashAgg[LOCAL] +--------------filter((t1.score > 50)) +----------------PhysicalOlapScan[count_t_one_side] --- !groupby_pushdown_with_order_by -- +-- !groupby_pushdown_varied_aggregates -- PhysicalResultSink ---PhysicalQuickSort[MERGE_SORT] -----PhysicalQuickSort[LOCAL_SORT] -------hashAgg[GLOBAL] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ------------PhysicalOlapScan[count_t_one_side] ------------PhysicalOlapScan[count_t_one_side] --- !groupby_pushdown_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_equal_conditions_non_aggregate_selection -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_with_where_clause -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalOlapScan[count_t_one_side] apply RFs: RF0 ---------filter((t1.score > 50)) -----------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_varied_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -- !groupby_pushdown_with_order_by_limit -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[count_t_one_side] +----------------PhysicalOlapScan[count_t_one_side] + +-- !groupby_pushdown_alias_multiple_equal_conditions -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1_alias.id = t2_alias.id) and (t1_alias.name = t2_alias.name)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[count_t_one_side] +------------PhysicalOlapScan[count_t_one_side] + +-- !groupby_pushdown_complex_join_condition -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) +------------PhysicalOlapScan[count_t_one_side] +------------PhysicalOlapScan[count_t_one_side] + +-- !groupby_pushdown_function_processed_columns -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ------------PhysicalOlapScan[count_t_one_side] ------------PhysicalOlapScan[count_t_one_side] +-- !groupby_pushdown_nested_queries -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------------filter((count_t_one_side.id < 100)) +--------------PhysicalOlapScan[count_t_one_side] apply RFs: RF0 +------------hashAgg[LOCAL] +--------------filter((count_t_one_side.score > 20) and (t1.id < 100)) +----------------PhysicalOlapScan[count_t_one_side] + +-- !groupby_pushdown_basic -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t_one_side] +------------PhysicalOlapScan[count_t_one_side] + +-- !groupby_pushdown_left_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t_one_side] +------------PhysicalOlapScan[count_t_one_side] + +-- !groupby_pushdown_right_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t_one_side] +------------PhysicalOlapScan[count_t_one_side] + +-- !groupby_pushdown_full_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t_one_side] +------------PhysicalOlapScan[count_t_one_side] + +-- !groupby_pushdown_left_semi_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t_one_side] +------------PhysicalOlapScan[count_t_one_side] + +-- !groupby_pushdown_left_anti_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t_one_side] +------------PhysicalOlapScan[count_t_one_side] + +-- !groupby_pushdown_complex_conditions -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) +------------PhysicalOlapScan[count_t_one_side] +------------PhysicalOlapScan[count_t_one_side] + +-- !groupby_pushdown_with_aggregate -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t_one_side] +------------PhysicalOlapScan[count_t_one_side] + +-- !groupby_pushdown_subquery -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------------PhysicalOlapScan[count_t_one_side] apply RFs: RF0 +------------filter((count_t_one_side.score > 10)) +--------------PhysicalOlapScan[count_t_one_side] + +-- !groupby_pushdown_outer_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t_one_side] +------------PhysicalOlapScan[count_t_one_side] + +-- !groupby_pushdown_deep_subquery -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------------PhysicalOlapScan[count_t_one_side] apply RFs: RF0 +------------filter((count_t_one_side.score > 10)) +--------------PhysicalOlapScan[count_t_one_side] + +-- !groupby_pushdown_having -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----filter((count(*) > 100)) +------hashAgg[GLOBAL] +--------PhysicalDistribute[DistributionSpecHash] +----------hashAgg[LOCAL] +------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------------PhysicalOlapScan[count_t_one_side] +--------------PhysicalOlapScan[count_t_one_side] + +-- !groupby_pushdown_multi_table_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() +------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------------PhysicalOlapScan[count_t_one_side] +--------------PhysicalOlapScan[count_t_one_side] +------------PhysicalDistribute[DistributionSpecReplicated] +--------------PhysicalOlapScan[count_t_one_side] + +-- !groupby_pushdown_with_order_by -- +PhysicalResultSink +--PhysicalQuickSort[MERGE_SORT] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalQuickSort[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------------PhysicalOlapScan[count_t_one_side] +----------------PhysicalOlapScan[count_t_one_side] + +-- !groupby_pushdown_multiple_equal_conditions -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +------------PhysicalOlapScan[count_t_one_side] +------------PhysicalOlapScan[count_t_one_side] + +-- !groupby_pushdown_equal_conditions_non_aggregate_selection -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +------------PhysicalOlapScan[count_t_one_side] +------------PhysicalOlapScan[count_t_one_side] + +-- !groupby_pushdown_with_where_clause -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------------PhysicalOlapScan[count_t_one_side] apply RFs: RF0 +------------filter((t1.score > 50)) +--------------PhysicalOlapScan[count_t_one_side] + +-- !groupby_pushdown_varied_aggregates -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[count_t_one_side] +------------PhysicalOlapScan[count_t_one_side] + +-- !groupby_pushdown_with_order_by_limit -- +PhysicalResultSink +--PhysicalTopN[MERGE_SORT] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------------PhysicalOlapScan[count_t_one_side] +----------------PhysicalOlapScan[count_t_one_side] + -- !groupby_pushdown_complex_join_condition -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) +------------PhysicalOlapScan[count_t_one_side] +------------PhysicalOlapScan[count_t_one_side] -- !groupby_pushdown_nested_queries -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------filter((count_t_one_side.id < 100)) -----------PhysicalOlapScan[count_t_one_side] apply RFs: RF0 ---------filter((count_t_one_side.score > 20) and (t1.id < 100)) -----------PhysicalOlapScan[count_t_one_side] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------------filter((count_t_one_side.id < 100)) +--------------PhysicalOlapScan[count_t_one_side] apply RFs: RF0 +------------filter((count_t_one_side.score > 20) and (t1.id < 100)) +--------------PhysicalOlapScan[count_t_one_side] diff --git a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_max_through_join.out b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_max_through_join.out index c0bf3d4108..7f8839733c 100644 --- a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_max_through_join.out +++ b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_max_through_join.out @@ -1,237 +1,290 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !groupby_pushdown_basic -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[LOCAL] -----------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_left_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_right_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_full_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_left_semi_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[LOCAL] -----------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_left_anti_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_complex_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalOlapScan[max_t] apply RFs: RF0 ---------hashAgg[LOCAL] -----------filter((max_t.score > 10)) -------------PhysicalOlapScan[max_t] - --- !groupby_pushdown_outer_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_deep_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalOlapScan[max_t] apply RFs: RF0 ---------hashAgg[LOCAL] -----------filter((max_t.score > 10)) -------------PhysicalOlapScan[max_t] - --- !groupby_pushdown_having -- -PhysicalResultSink ---filter((max(score) > 100)) +--PhysicalDistribute[DistributionSpecGather] ----hashAgg[GLOBAL] -------hashAgg[LOCAL] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------hashAgg[LOCAL] -------------PhysicalOlapScan[max_t] -----------PhysicalOlapScan[max_t] - --- !groupby_pushdown_mixed_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_multi_table_join -- -PhysicalResultSink ---hashAgg[LOCAL] -----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() -------hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ------------hashAgg[LOCAL] --------------PhysicalOlapScan[max_t] ------------PhysicalOlapScan[max_t] -------PhysicalOlapScan[max_t] + +-- !groupby_pushdown_left_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[max_t] +------------PhysicalOlapScan[max_t] + +-- !groupby_pushdown_right_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[max_t] +------------PhysicalOlapScan[max_t] + +-- !groupby_pushdown_full_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[max_t] +------------PhysicalOlapScan[max_t] + +-- !groupby_pushdown_left_semi_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[max_t] +------------PhysicalOlapScan[max_t] + +-- !groupby_pushdown_left_anti_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[max_t] +------------PhysicalOlapScan[max_t] + +-- !groupby_pushdown_complex_conditions -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) +------------PhysicalOlapScan[max_t] +------------PhysicalOlapScan[max_t] + +-- !groupby_pushdown_with_aggregate -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[max_t] +------------PhysicalOlapScan[max_t] + +-- !groupby_pushdown_subquery -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------------PhysicalOlapScan[max_t] apply RFs: RF0 +------------hashAgg[LOCAL] +--------------filter((max_t.score > 10)) +----------------PhysicalOlapScan[max_t] + +-- !groupby_pushdown_outer_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[max_t] +------------PhysicalOlapScan[max_t] + +-- !groupby_pushdown_deep_subquery -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------------PhysicalOlapScan[max_t] apply RFs: RF0 +------------hashAgg[LOCAL] +--------------filter((max_t.score > 10)) +----------------PhysicalOlapScan[max_t] + +-- !groupby_pushdown_having -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----filter((max(score) > 100)) +------hashAgg[GLOBAL] +--------PhysicalDistribute[DistributionSpecHash] +----------hashAgg[LOCAL] +------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------------hashAgg[LOCAL] +----------------PhysicalOlapScan[max_t] +--------------PhysicalOlapScan[max_t] + +-- !groupby_pushdown_mixed_aggregates -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[max_t] +------------PhysicalOlapScan[max_t] + +-- !groupby_pushdown_multi_table_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[max_t] +----------------PhysicalOlapScan[max_t] +--------PhysicalDistribute[DistributionSpecHash] +----------PhysicalOlapScan[max_t] -- !groupby_pushdown_with_order_by -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalQuickSort[LOCAL_SORT] -------hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalQuickSort[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[max_t] +----------------PhysicalOlapScan[max_t] + +-- !groupby_pushdown_multiple_equal_conditions -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ------------hashAgg[LOCAL] --------------PhysicalOlapScan[max_t] ------------PhysicalOlapScan[max_t] --- !groupby_pushdown_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------hashAgg[LOCAL] -----------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - -- !groupby_pushdown_equal_conditions_with_aggregate -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +------------PhysicalOlapScan[max_t] +------------PhysicalOlapScan[max_t] -- !groupby_pushdown_equal_conditions_non_aggregate_selection -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[max_t] +------------PhysicalOlapScan[max_t] -- !groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------PhysicalOlapScan[max_t] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[max_t] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[max_t] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[max_t] -- !groupby_pushdown_with_where_clause -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalOlapScan[max_t] apply RFs: RF0 +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------filter((t1.score > 50)) -------------PhysicalOlapScan[max_t] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------------PhysicalOlapScan[max_t] apply RFs: RF0 +------------hashAgg[LOCAL] +--------------filter((t1.score > 50)) +----------------PhysicalOlapScan[max_t] -- !groupby_pushdown_varied_aggregates -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[max_t] +------------PhysicalOlapScan[max_t] -- !groupby_pushdown_with_order_by_limit -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[max_t] +----------------PhysicalOlapScan[max_t] + +-- !groupby_pushdown_alias_multiple_equal_conditions -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------hashJoin[INNER_JOIN] hashCondition=((t1_alias.id = t2_alias.id) and (t1_alias.name = t2_alias.name)) otherCondition=() ------------hashAgg[LOCAL] --------------PhysicalOlapScan[max_t] ------------PhysicalOlapScan[max_t] --- !groupby_pushdown_alias_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1_alias.id = t2_alias.id) and (t1_alias.name = t2_alias.name)) otherCondition=() ---------hashAgg[LOCAL] -----------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - -- !groupby_pushdown_complex_join_condition -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) +------------PhysicalOlapScan[max_t] +------------PhysicalOlapScan[max_t] -- !groupby_pushdown_function_processed_columns -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[max_t] +------------PhysicalOlapScan[max_t] -- !groupby_pushdown_nested_queries -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------filter((max_t.id < 100)) -----------PhysicalOlapScan[max_t] apply RFs: RF0 +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------filter((max_t.score > 20) and (t1.id < 100)) -------------PhysicalOlapScan[max_t] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------------filter((max_t.id < 100)) +--------------PhysicalOlapScan[max_t] apply RFs: RF0 +------------hashAgg[LOCAL] +--------------filter((max_t.score > 20) and (t1.id < 100)) +----------------PhysicalOlapScan[max_t] diff --git a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_min_through_join.out b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_min_through_join.out index 46126279ef..a4cc06ff14 100644 --- a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_min_through_join.out +++ b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_min_through_join.out @@ -1,237 +1,290 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !groupby_pushdown_basic -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[LOCAL] -----------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_left_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_right_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_full_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_left_semi_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[LOCAL] -----------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_left_anti_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_complex_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalOlapScan[min_t] apply RFs: RF0 ---------hashAgg[LOCAL] -----------filter((min_t.score > 10)) -------------PhysicalOlapScan[min_t] - --- !groupby_pushdown_outer_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_deep_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalOlapScan[min_t] apply RFs: RF0 ---------hashAgg[LOCAL] -----------filter((min_t.score > 10)) -------------PhysicalOlapScan[min_t] - --- !groupby_pushdown_having -- -PhysicalResultSink ---filter((min(score) > 100)) +--PhysicalDistribute[DistributionSpecGather] ----hashAgg[GLOBAL] -------hashAgg[LOCAL] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------hashAgg[LOCAL] -------------PhysicalOlapScan[min_t] -----------PhysicalOlapScan[min_t] - --- !groupby_pushdown_mixed_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_multi_table_join -- -PhysicalResultSink ---hashAgg[LOCAL] -----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() -------hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ------------hashAgg[LOCAL] --------------PhysicalOlapScan[min_t] ------------PhysicalOlapScan[min_t] -------PhysicalOlapScan[min_t] + +-- !groupby_pushdown_left_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[min_t] +------------PhysicalOlapScan[min_t] + +-- !groupby_pushdown_right_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[min_t] +------------PhysicalOlapScan[min_t] + +-- !groupby_pushdown_full_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[min_t] +------------PhysicalOlapScan[min_t] + +-- !groupby_pushdown_left_semi_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[min_t] +------------PhysicalOlapScan[min_t] + +-- !groupby_pushdown_left_anti_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[min_t] +------------PhysicalOlapScan[min_t] + +-- !groupby_pushdown_complex_conditions -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) +------------PhysicalOlapScan[min_t] +------------PhysicalOlapScan[min_t] + +-- !groupby_pushdown_with_aggregate -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[min_t] +------------PhysicalOlapScan[min_t] + +-- !groupby_pushdown_subquery -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------------PhysicalOlapScan[min_t] apply RFs: RF0 +------------hashAgg[LOCAL] +--------------filter((min_t.score > 10)) +----------------PhysicalOlapScan[min_t] + +-- !groupby_pushdown_outer_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[min_t] +------------PhysicalOlapScan[min_t] + +-- !groupby_pushdown_deep_subquery -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------------PhysicalOlapScan[min_t] apply RFs: RF0 +------------hashAgg[LOCAL] +--------------filter((min_t.score > 10)) +----------------PhysicalOlapScan[min_t] + +-- !groupby_pushdown_having -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----filter((min(score) > 100)) +------hashAgg[GLOBAL] +--------PhysicalDistribute[DistributionSpecHash] +----------hashAgg[LOCAL] +------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------------hashAgg[LOCAL] +----------------PhysicalOlapScan[min_t] +--------------PhysicalOlapScan[min_t] + +-- !groupby_pushdown_mixed_aggregates -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[min_t] +------------PhysicalOlapScan[min_t] + +-- !groupby_pushdown_multi_table_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[min_t] +----------------PhysicalOlapScan[min_t] +--------PhysicalDistribute[DistributionSpecHash] +----------PhysicalOlapScan[min_t] -- !groupby_pushdown_with_order_by -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalQuickSort[LOCAL_SORT] -------hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalQuickSort[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[min_t] +----------------PhysicalOlapScan[min_t] + +-- !groupby_pushdown_multiple_equal_conditions -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ------------hashAgg[LOCAL] --------------PhysicalOlapScan[min_t] ------------PhysicalOlapScan[min_t] --- !groupby_pushdown_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------hashAgg[LOCAL] -----------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - -- !groupby_pushdown_equal_conditions_with_aggregate -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +------------PhysicalOlapScan[min_t] +------------PhysicalOlapScan[min_t] -- !groupby_pushdown_equal_conditions_non_aggregate_selection -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[min_t] +------------PhysicalOlapScan[min_t] -- !groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------PhysicalOlapScan[min_t] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[min_t] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[min_t] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[min_t] -- !groupby_pushdown_with_where_clause -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalOlapScan[min_t] apply RFs: RF0 +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------filter((t1.score > 50)) -------------PhysicalOlapScan[min_t] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------------PhysicalOlapScan[min_t] apply RFs: RF0 +------------hashAgg[LOCAL] +--------------filter((t1.score > 50)) +----------------PhysicalOlapScan[min_t] -- !groupby_pushdown_varied_aggregates -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[min_t] +------------PhysicalOlapScan[min_t] -- !groupby_pushdown_with_order_by_limit -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[min_t] +----------------PhysicalOlapScan[min_t] + +-- !groupby_pushdown_alias_multiple_equal_conditions -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------hashJoin[INNER_JOIN] hashCondition=((t1_alias.id = t2_alias.id) and (t1_alias.name = t2_alias.name)) otherCondition=() ------------hashAgg[LOCAL] --------------PhysicalOlapScan[min_t] ------------PhysicalOlapScan[min_t] --- !groupby_pushdown_alias_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1_alias.id = t2_alias.id) and (t1_alias.name = t2_alias.name)) otherCondition=() ---------hashAgg[LOCAL] -----------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - -- !groupby_pushdown_complex_join_condition -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) +------------PhysicalOlapScan[min_t] +------------PhysicalOlapScan[min_t] -- !groupby_pushdown_function_processed_columns -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[min_t] +------------PhysicalOlapScan[min_t] -- !groupby_pushdown_nested_queries -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------filter((min_t.id < 100)) -----------PhysicalOlapScan[min_t] apply RFs: RF0 +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------filter((min_t.score > 20) and (t1.id < 100)) -------------PhysicalOlapScan[min_t] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------------filter((min_t.id < 100)) +--------------PhysicalOlapScan[min_t] apply RFs: RF0 +------------hashAgg[LOCAL] +--------------filter((min_t.score > 20) and (t1.id < 100)) +----------------PhysicalOlapScan[min_t] diff --git a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_sum_through_join.out b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_sum_through_join.out index 8415bcaf99..d74b311df9 100644 --- a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_sum_through_join.out +++ b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_sum_through_join.out @@ -1,250 +1,303 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !groupby_pushdown_basic -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[LOCAL] -----------PhysicalOlapScan[sum_t] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_left_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_right_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_full_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_left_semi_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[LOCAL] -----------PhysicalOlapScan[sum_t] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_left_anti_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_complex_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[LOCAL] -----------filter((sum_t.score > 10)) -------------PhysicalOlapScan[sum_t] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_outer_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_deep_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[LOCAL] -----------filter((sum_t.score > 10)) -------------PhysicalOlapScan[sum_t] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_having -- -PhysicalResultSink ---filter((sum(score) > 100)) +--PhysicalDistribute[DistributionSpecGather] ----hashAgg[GLOBAL] -------hashAgg[LOCAL] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------hashAgg[LOCAL] -------------PhysicalOlapScan[sum_t] -----------hashAgg[LOCAL] -------------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_mixed_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_multi_table_join -- -PhysicalResultSink ---hashAgg[LOCAL] -----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() -------hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ------------hashAgg[LOCAL] --------------PhysicalOlapScan[sum_t] ------------hashAgg[LOCAL] --------------PhysicalOlapScan[sum_t] -------hashAgg[GLOBAL] + +-- !groupby_pushdown_left_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------PhysicalOlapScan[sum_t] +----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[sum_t] +------------PhysicalOlapScan[sum_t] + +-- !groupby_pushdown_right_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[sum_t] +------------PhysicalOlapScan[sum_t] + +-- !groupby_pushdown_full_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[sum_t] +------------PhysicalOlapScan[sum_t] + +-- !groupby_pushdown_left_semi_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[sum_t] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[sum_t] + +-- !groupby_pushdown_left_anti_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[sum_t] +------------PhysicalOlapScan[sum_t] + +-- !groupby_pushdown_complex_conditions -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) +------------PhysicalOlapScan[sum_t] +------------PhysicalOlapScan[sum_t] + +-- !groupby_pushdown_with_aggregate -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[sum_t] +------------PhysicalOlapScan[sum_t] + +-- !groupby_pushdown_subquery -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------hashAgg[LOCAL] +--------------filter((sum_t.score > 10)) +----------------PhysicalOlapScan[sum_t] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[sum_t] + +-- !groupby_pushdown_outer_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[sum_t] +------------PhysicalOlapScan[sum_t] + +-- !groupby_pushdown_deep_subquery -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------hashAgg[LOCAL] +--------------filter((sum_t.score > 10)) +----------------PhysicalOlapScan[sum_t] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[sum_t] + +-- !groupby_pushdown_having -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----filter((sum(score) > 100)) +------hashAgg[GLOBAL] +--------PhysicalDistribute[DistributionSpecHash] +----------hashAgg[LOCAL] +------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------------hashAgg[LOCAL] +----------------PhysicalOlapScan[sum_t] +--------------hashAgg[LOCAL] +----------------PhysicalOlapScan[sum_t] + +-- !groupby_pushdown_mixed_aggregates -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[sum_t] +------------PhysicalOlapScan[sum_t] + +-- !groupby_pushdown_multi_table_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[sum_t] +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[sum_t] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[sum_t] -- !groupby_pushdown_with_order_by -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalQuickSort[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----PhysicalDistribute[DistributionSpecGather] +------PhysicalQuickSort[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] ---------------PhysicalOlapScan[sum_t] -------------hashAgg[LOCAL] ---------------PhysicalOlapScan[sum_t] +--------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[sum_t] +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[sum_t] -- !groupby_pushdown_multiple_equal_conditions -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------PhysicalOlapScan[sum_t] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[sum_t] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[sum_t] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[sum_t] -- !groupby_pushdown_equal_conditions_with_aggregate -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +------------PhysicalOlapScan[sum_t] +------------PhysicalOlapScan[sum_t] -- !groupby_pushdown_equal_conditions_non_aggregate_selection -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------PhysicalOlapScan[sum_t] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[sum_t] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[sum_t] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[sum_t] -- !groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +------------PhysicalOlapScan[sum_t] +------------PhysicalOlapScan[sum_t] -- !groupby_pushdown_with_where_clause -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------filter((t1.score > 50)) -------------PhysicalOlapScan[sum_t] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[sum_t] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------hashAgg[LOCAL] +--------------filter((t1.score > 50)) +----------------PhysicalOlapScan[sum_t] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[sum_t] -- !groupby_pushdown_varied_aggregates -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[sum_t] +------------PhysicalOlapScan[sum_t] -- !groupby_pushdown_with_order_by_limit -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] ---------------PhysicalOlapScan[sum_t] -------------hashAgg[LOCAL] ---------------PhysicalOlapScan[sum_t] +--------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[sum_t] +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[sum_t] -- !groupby_pushdown_alias_multiple_equal_conditions -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1_alias.id = t2_alias.id) and (t1_alias.name = t2_alias.name)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------PhysicalOlapScan[sum_t] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[sum_t] +----------hashJoin[INNER_JOIN] hashCondition=((t1_alias.id = t2_alias.id) and (t1_alias.name = t2_alias.name)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[sum_t] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[sum_t] -- !groupby_pushdown_complex_join_condition -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) +------------PhysicalOlapScan[sum_t] +------------PhysicalOlapScan[sum_t] -- !groupby_pushdown_function_processed_columns -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[sum_t] +------------PhysicalOlapScan[sum_t] -- !groupby_pushdown_nested_queries -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------filter((sum_t.score > 20) and (t1.id < 100)) -------------PhysicalOlapScan[sum_t] apply RFs: RF0 ---------hashAgg[LOCAL] -----------filter((sum_t.id < 100)) -------------PhysicalOlapScan[sum_t] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------------hashAgg[LOCAL] +--------------filter((sum_t.score > 20) and (t1.id < 100)) +----------------PhysicalOlapScan[sum_t] apply RFs: RF0 +------------hashAgg[LOCAL] +--------------filter((sum_t.id < 100)) +----------------PhysicalOlapScan[sum_t] diff --git a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_sum_through_join_one_side.out b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_sum_through_join_one_side.out index b11f8ba92c..120d293e37 100644 --- a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_sum_through_join_one_side.out +++ b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_sum_through_join_one_side.out @@ -1,237 +1,290 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !groupby_pushdown_basic -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[LOCAL] -----------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_left_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_right_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_full_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_left_semi_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[LOCAL] -----------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_left_anti_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_complex_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalOlapScan[sum_t_one_side] apply RFs: RF0 ---------hashAgg[LOCAL] -----------filter((sum_t_one_side.score > 10)) -------------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_outer_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_deep_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalOlapScan[sum_t_one_side] apply RFs: RF0 ---------hashAgg[LOCAL] -----------filter((sum_t_one_side.score > 10)) -------------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_having -- -PhysicalResultSink ---filter((sum(score) > 100)) +--PhysicalDistribute[DistributionSpecGather] ----hashAgg[GLOBAL] -------hashAgg[LOCAL] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------hashAgg[LOCAL] -------------PhysicalOlapScan[sum_t_one_side] -----------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_mixed_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_multi_table_join -- -PhysicalResultSink ---hashAgg[LOCAL] -----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() -------hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ------------hashAgg[LOCAL] --------------PhysicalOlapScan[sum_t_one_side] ------------PhysicalOlapScan[sum_t_one_side] -------PhysicalOlapScan[sum_t_one_side] + +-- !groupby_pushdown_left_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[sum_t_one_side] +------------PhysicalOlapScan[sum_t_one_side] + +-- !groupby_pushdown_right_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[sum_t_one_side] +------------PhysicalOlapScan[sum_t_one_side] + +-- !groupby_pushdown_full_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[sum_t_one_side] +------------PhysicalOlapScan[sum_t_one_side] + +-- !groupby_pushdown_left_semi_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[sum_t_one_side] +------------PhysicalOlapScan[sum_t_one_side] + +-- !groupby_pushdown_left_anti_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[sum_t_one_side] +------------PhysicalOlapScan[sum_t_one_side] + +-- !groupby_pushdown_complex_conditions -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) +------------PhysicalOlapScan[sum_t_one_side] +------------PhysicalOlapScan[sum_t_one_side] + +-- !groupby_pushdown_with_aggregate -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[sum_t_one_side] +------------PhysicalOlapScan[sum_t_one_side] + +-- !groupby_pushdown_subquery -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------------PhysicalOlapScan[sum_t_one_side] apply RFs: RF0 +------------hashAgg[LOCAL] +--------------filter((sum_t_one_side.score > 10)) +----------------PhysicalOlapScan[sum_t_one_side] + +-- !groupby_pushdown_outer_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[sum_t_one_side] +------------PhysicalOlapScan[sum_t_one_side] + +-- !groupby_pushdown_deep_subquery -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------------PhysicalOlapScan[sum_t_one_side] apply RFs: RF0 +------------hashAgg[LOCAL] +--------------filter((sum_t_one_side.score > 10)) +----------------PhysicalOlapScan[sum_t_one_side] + +-- !groupby_pushdown_having -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----filter((sum(score) > 100)) +------hashAgg[GLOBAL] +--------PhysicalDistribute[DistributionSpecHash] +----------hashAgg[LOCAL] +------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------------hashAgg[LOCAL] +----------------PhysicalOlapScan[sum_t_one_side] +--------------PhysicalOlapScan[sum_t_one_side] + +-- !groupby_pushdown_mixed_aggregates -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[sum_t_one_side] +------------PhysicalOlapScan[sum_t_one_side] + +-- !groupby_pushdown_multi_table_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[sum_t_one_side] +----------------PhysicalOlapScan[sum_t_one_side] +--------PhysicalDistribute[DistributionSpecHash] +----------PhysicalOlapScan[sum_t_one_side] -- !groupby_pushdown_with_order_by -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalQuickSort[LOCAL_SORT] -------hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalQuickSort[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[sum_t_one_side] +----------------PhysicalOlapScan[sum_t_one_side] + +-- !groupby_pushdown_multiple_equal_conditions -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ------------hashAgg[LOCAL] --------------PhysicalOlapScan[sum_t_one_side] ------------PhysicalOlapScan[sum_t_one_side] --- !groupby_pushdown_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------hashAgg[LOCAL] -----------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - -- !groupby_pushdown_equal_conditions_with_aggregate -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +------------PhysicalOlapScan[sum_t_one_side] +------------PhysicalOlapScan[sum_t_one_side] -- !groupby_pushdown_equal_conditions_non_aggregate_selection -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[sum_t_one_side] +------------PhysicalOlapScan[sum_t_one_side] -- !groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------PhysicalOlapScan[sum_t_one_side] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[sum_t_one_side] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[sum_t_one_side] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[sum_t_one_side] -- !groupby_pushdown_with_where_clause -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalOlapScan[sum_t_one_side] apply RFs: RF0 +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------filter((t1.score > 50)) -------------PhysicalOlapScan[sum_t_one_side] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------------PhysicalOlapScan[sum_t_one_side] apply RFs: RF0 +------------hashAgg[LOCAL] +--------------filter((t1.score > 50)) +----------------PhysicalOlapScan[sum_t_one_side] -- !groupby_pushdown_varied_aggregates -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[sum_t_one_side] +------------PhysicalOlapScan[sum_t_one_side] -- !groupby_pushdown_with_order_by_limit -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------------hashAgg[LOCAL] +------------------PhysicalOlapScan[sum_t_one_side] +----------------PhysicalOlapScan[sum_t_one_side] + +-- !groupby_pushdown_alias_multiple_equal_conditions -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------hashJoin[INNER_JOIN] hashCondition=((t1_alias.id = t2_alias.id) and (t1_alias.name = t2_alias.name)) otherCondition=() ------------hashAgg[LOCAL] --------------PhysicalOlapScan[sum_t_one_side] ------------PhysicalOlapScan[sum_t_one_side] --- !groupby_pushdown_alias_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1_alias.id = t2_alias.id) and (t1_alias.name = t2_alias.name)) otherCondition=() ---------hashAgg[LOCAL] -----------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - -- !groupby_pushdown_complex_join_condition -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) +------------PhysicalOlapScan[sum_t_one_side] +------------PhysicalOlapScan[sum_t_one_side] -- !groupby_pushdown_function_processed_columns -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[sum_t_one_side] +------------PhysicalOlapScan[sum_t_one_side] -- !groupby_pushdown_nested_queries -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------filter((sum_t_one_side.id < 100)) -----------PhysicalOlapScan[sum_t_one_side] apply RFs: RF0 +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] -----------filter((sum_t_one_side.score > 20) and (t1.id < 100)) -------------PhysicalOlapScan[sum_t_one_side] +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------------filter((sum_t_one_side.id < 100)) +--------------PhysicalOlapScan[sum_t_one_side] apply RFs: RF0 +------------hashAgg[LOCAL] +--------------filter((sum_t_one_side.score > 20) and (t1.id < 100)) +----------------PhysicalOlapScan[sum_t_one_side] 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 4c765dcf37..a673508edb 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 @@ -1,31 +1,40 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !inner_join -- PhysicalResultSink ---NestedLoopJoin[CROSS_JOIN] -----PhysicalOlapScan[t] -----PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----NestedLoopJoin[CROSS_JOIN] +------PhysicalOlapScan[t] +------PhysicalDistribute[DistributionSpecReplicated] +--------PhysicalOlapScan[t] -- !left_outer_join -- PhysicalResultSink ---NestedLoopJoin[LEFT_OUTER_JOIN] -----PhysicalOlapScan[t] -----PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----NestedLoopJoin[LEFT_OUTER_JOIN] +------PhysicalOlapScan[t] +------PhysicalDistribute[DistributionSpecReplicated] +--------PhysicalOlapScan[t] -- !right_outer_join -- PhysicalResultSink --NestedLoopJoin[RIGHT_OUTER_JOIN] -----PhysicalOlapScan[t] -----PhysicalOlapScan[t] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalOlapScan[t] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalOlapScan[t] -- !full_outer_join -- PhysicalResultSink --NestedLoopJoin[FULL_OUTER_JOIN] -----PhysicalOlapScan[t] -----PhysicalOlapScan[t] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalOlapScan[t] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalOlapScan[t] -- !left_semi_join -- PhysicalResultSink ---PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----PhysicalOlapScan[t] -- !left_anti_join -- PhysicalResultSink @@ -34,14 +43,18 @@ PhysicalResultSink -- !right_semi_join -- PhysicalResultSink --NestedLoopJoin[RIGHT_SEMI_JOIN] -----PhysicalOlapScan[t] -----PhysicalOlapScan[t] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalOlapScan[t] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalOlapScan[t] -- !right_anti_join -- PhysicalResultSink --NestedLoopJoin[RIGHT_ANTI_JOIN] -----PhysicalOlapScan[t] -----PhysicalOlapScan[t] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalOlapScan[t] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalOlapScan[t] -- !inner_join -- 1 1 a 1 1 a diff --git a/regression-test/data/nereids_rules_p0/eliminate_not_null/eliminate_not_null.out b/regression-test/data/nereids_rules_p0/eliminate_not_null/eliminate_not_null.out index 929e4ce0d6..9c3c820d44 100644 --- a/regression-test/data/nereids_rules_p0/eliminate_not_null/eliminate_not_null.out +++ b/regression-test/data/nereids_rules_p0/eliminate_not_null/eliminate_not_null.out @@ -1,55 +1,66 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !eliminate_not_null_basic_comparison -- PhysicalResultSink ---filter(( not score IS NULL) and (t.score > 13)) -----PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----filter(( not score IS NULL) and (t.score > 13)) +------PhysicalOlapScan[t] -- !eliminate_not_null_in_clause -- PhysicalResultSink ---filter(( not id IS NULL) and id IN (1, 2, 3)) -----PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----filter(( not id IS NULL) and id IN (1, 2, 3)) +------PhysicalOlapScan[t] -- !eliminate_not_null_not_equal -- PhysicalResultSink ---filter(( not (score = 13)) and ( not score IS NULL)) -----PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----filter(( not (score = 13)) and ( not score IS NULL)) +------PhysicalOlapScan[t] -- !eliminate_not_null_string_function -- PhysicalResultSink ---filter(( not name IS NULL) and (length(name) > 0)) -----PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----filter(( not name IS NULL) and (length(name) > 0)) +------PhysicalOlapScan[t] -- !eliminate_not_null_aggregate -- PhysicalResultSink ---hashAgg[LOCAL] -----filter(( not score IS NULL) and (t.score > 0)) -------PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[LOCAL] +------filter(( not score IS NULL) and (t.score > 0)) +--------PhysicalOlapScan[t] -- !eliminate_not_null_between -- PhysicalResultSink ---filter(( not score IS NULL) and (t.score <= 10) and (t.score >= 1)) -----PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----filter(( not score IS NULL) and (t.score <= 10) and (t.score >= 1)) +------PhysicalOlapScan[t] -- !eliminate_not_null_math_function -- PhysicalResultSink ---filter(( not score IS NULL) and (abs(score) = 5)) -----PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----filter(( not score IS NULL) and (abs(score) = 5)) +------PhysicalOlapScan[t] -- !eliminate_not_null_complex_logic -- PhysicalResultSink ---filter(( not score IS NULL) and ((t.score > 5) OR (t.id < 10))) -----PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----filter(( not score IS NULL) and ((t.score > 5) OR (t.id < 10))) +------PhysicalOlapScan[t] -- !eliminate_not_null_date_function -- PhysicalResultSink ---filter(( not name IS NULL) and (year(cast(name as DATEV2)) = 2022)) -----PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----filter(( not name IS NULL) and (year(cast(name as DATEV2)) = 2022)) +------PhysicalOlapScan[t] -- !eliminate_not_null_with_subquery -- PhysicalResultSink ---hashJoin[LEFT_SEMI_JOIN] hashCondition=((t.score = t.score)) otherCondition=() build RFs:RF0 score->[score] -----filter(( not score IS NULL) and (t.score > 0)) -------PhysicalOlapScan[t] apply RFs: RF0 -----filter((t.score > 0)) -------PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_SEMI_JOIN] hashCondition=((t.score = t.score)) otherCondition=() build RFs:RF0 score->[score] +------filter(( not score IS NULL) and (t.score > 0)) +--------PhysicalOlapScan[t] apply RFs: RF0 +------PhysicalDistribute[DistributionSpecReplicated] +--------filter((t.score > 0)) +----------PhysicalOlapScan[t] 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 3211d71aa2..138eb0e62d 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 @@ -1,7 +1,7 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !left_outer -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] --------PhysicalOlapScan[t] apply RFs: RF0 @@ -10,7 +10,7 @@ PhysicalResultSink -- !right_outer -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] --------PhysicalOlapScan[t] apply RFs: RF0 @@ -19,7 +19,7 @@ PhysicalResultSink -- !full_outer_join -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] --------PhysicalOlapScan[t] apply RFs: RF0 @@ -28,7 +28,7 @@ PhysicalResultSink -- !full_outer_join -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] --------PhysicalOlapScan[t] apply RFs: RF0 @@ -37,7 +37,7 @@ PhysicalResultSink -- !full_outer_join -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] --------filter((t1.score > 10)) @@ -47,7 +47,7 @@ PhysicalResultSink -- !left_outer -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] --------filter((t1.score > 10)) @@ -57,7 +57,7 @@ PhysicalResultSink -- !multiple_left_outer_1 -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() --------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] @@ -68,7 +68,7 @@ PhysicalResultSink -- !multiple_left_outer_2 -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() --------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] @@ -79,7 +79,7 @@ PhysicalResultSink -- !multiple_right_outer_1 -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] --------PhysicalOlapScan[t] apply RFs: RF1 @@ -90,7 +90,7 @@ PhysicalResultSink -- !multiple_right_outer_2 -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] --------PhysicalOlapScan[t] apply RFs: RF1 @@ -101,7 +101,7 @@ PhysicalResultSink -- !multiple_full_outer_1 -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() --------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] @@ -112,19 +112,19 @@ PhysicalResultSink -- !multiple_full_outer_2 -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() --------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ----------PhysicalOlapScan[t] apply RFs: RF0 ----------filter((t2.score > 10)) ------------PhysicalOlapScan[t] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalOlapScan[t] -- !left_outer_join_non_null_assertion -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] --------PhysicalOlapScan[t] apply RFs: RF0 @@ -133,7 +133,7 @@ PhysicalResultSink -- !right_outer_join_non_null_assertion -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] --------PhysicalOlapScan[t] apply RFs: RF0 @@ -142,7 +142,7 @@ PhysicalResultSink -- !full_outer_join_compound_conditions -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------filter(((t1.score > 5) OR (t2.score > 5))) --------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() @@ -151,7 +151,7 @@ PhysicalResultSink -- !multiple_joins_complex_conditions -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] --------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] @@ -163,19 +163,19 @@ PhysicalResultSink -- !using_non_equijoin_conditions -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[LEFT_OUTER_JOIN] hashCondition=((expr_cast(score as BIGINT) = expr_(score + 10))) otherCondition=() --------PhysicalProject ----------filter(( not id IS NULL)) ------------PhysicalOlapScan[t] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalProject ------------PhysicalOlapScan[t] -- !joining_multiple_tables_with_aggregate_functions -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------filter((count(id) > 1)) --------hashAgg[LOCAL] @@ -187,7 +187,7 @@ PhysicalResultSink -- !using_subqueries -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() --------filter(( not id IS NULL)) @@ -197,7 +197,7 @@ PhysicalResultSink -- !left_outer -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] --------filter(( not name IS NULL)) @@ -207,7 +207,7 @@ PhysicalResultSink -- !right_outer -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] --------filter(( not name IS NULL)) @@ -217,7 +217,7 @@ PhysicalResultSink -- !full_outer -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] --------filter(( not name IS NULL)) @@ -227,7 +227,7 @@ PhysicalResultSink -- !self_left_outer -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((t1.id = t1_alias.id)) otherCondition=() build RFs:RF0 id->[id] --------PhysicalOlapScan[t] apply RFs: RF0 @@ -236,7 +236,7 @@ PhysicalResultSink -- !right_outer_aggregate -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----hashAgg[LOCAL] ------PhysicalProject --------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() @@ -247,20 +247,20 @@ PhysicalResultSink -- !full_outer_multiple_tables -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------filter(name IS NULL) --------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() --------------PhysicalOlapScan[t] --------------PhysicalOlapScan[t] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------PhysicalOlapScan[t] -- !left_outer_with_subquery -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] --------PhysicalOlapScan[t] apply RFs: RF0 @@ -270,22 +270,22 @@ PhysicalResultSink -- !complex_join_conditions -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((expr_cast(score as BIGINT) = expr_(score * 2))) otherCondition=((t1.id < t2.id)) --------PhysicalProject ----------PhysicalOlapScan[t] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalProject ------------PhysicalOlapScan[t] -- !multiple_outer_with_window_function -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------PhysicalWindow --------PhysicalQuickSort[LOCAL_SORT] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() --------------PhysicalProject ----------------PhysicalOlapScan[t] @@ -294,7 +294,7 @@ PhysicalResultSink -- !join_different_tables_non_null -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] --------PhysicalOlapScan[t] apply RFs: RF0 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 939ba89631..b0c3f55fbc 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 @@ -1,23 +1,23 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !pushdown_inner_join -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------NestedLoopJoin[INNER_JOIN](id1 > id2) --------PhysicalProject ----------PhysicalOlapScan[t1] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalProject ------------PhysicalOlapScan[t2] -- !pushdown_left_outer_join -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------NestedLoopJoin[LEFT_OUTER_JOIN](id1 > id2) --------PhysicalProject ----------PhysicalOlapScan[t1] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalProject ------------PhysicalOlapScan[t2] @@ -25,10 +25,10 @@ PhysicalResultSink PhysicalResultSink --PhysicalProject ----NestedLoopJoin[RIGHT_OUTER_JOIN](id1 > id2) -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalProject ----------PhysicalOlapScan[t1] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalProject ----------PhysicalOlapScan[t2] @@ -36,21 +36,21 @@ PhysicalResultSink PhysicalResultSink --PhysicalProject ----NestedLoopJoin[FULL_OUTER_JOIN](id1 > id2) -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalProject ----------PhysicalOlapScan[t1] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalProject ----------PhysicalOlapScan[t2] -- !pushdown_left_semi_join -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------NestedLoopJoin[LEFT_SEMI_JOIN](id1 > t2.id) --------PhysicalProject ----------PhysicalOlapScan[t1] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalProject ------------PhysicalOlapScan[t2] @@ -58,10 +58,10 @@ PhysicalResultSink PhysicalResultSink --PhysicalProject ----NestedLoopJoin[RIGHT_SEMI_JOIN](t1.id > id2) -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalProject ----------PhysicalOlapScan[t1] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalProject ----------PhysicalOlapScan[t2] @@ -69,67 +69,67 @@ PhysicalResultSink PhysicalResultSink --PhysicalProject ----NestedLoopJoin[RIGHT_ANTI_JOIN](t1.id > id2) -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalProject ----------PhysicalOlapScan[t1] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalProject ----------PhysicalOlapScan[t2] -- !pushdown_left_anti_join -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------NestedLoopJoin[LEFT_ANTI_JOIN](id1 > t2.id) --------PhysicalProject ----------PhysicalOlapScan[t1] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalProject ------------PhysicalOlapScan[t2] -- !pushdown_cross_join -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------NestedLoopJoin[INNER_JOIN](id1 > t2.id) --------PhysicalProject ----------PhysicalOlapScan[t1] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalProject ------------PhysicalOlapScan[t2] -- !pushdown_multiple_joins -- PhysicalResultSink ---PhysicalDistribute +--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 +----------PhysicalDistribute[DistributionSpecHash] ------------PhysicalProject --------------PhysicalOlapScan[t2] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[t3] -- !pushdown_multiple_joins -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[LEFT_SEMI_JOIN] hashCondition=((id3 = t4.id)) otherCondition=() --------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((id2 = id3)) otherCondition=() -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashJoin[INNER_JOIN] hashCondition=((id1 = id2)) otherCondition=() --------------PhysicalProject ----------------PhysicalOlapScan[t1] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------PhysicalOlapScan[t2] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------PhysicalProject --------------PhysicalOlapScan[t3] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[t4] diff --git a/regression-test/data/nereids_rules_p0/filter_push_down/push_down_expression_in_hash_join.out b/regression-test/data/nereids_rules_p0/filter_push_down/push_down_expression_in_hash_join.out index 63535e28cb..d570f6f4ee 100644 --- a/regression-test/data/nereids_rules_p0/filter_push_down/push_down_expression_in_hash_join.out +++ b/regression-test/data/nereids_rules_p0/filter_push_down/push_down_expression_in_hash_join.out @@ -1,154 +1,154 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !push_arithmetic_inner_join -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((expr_cast(id as BIGINT) = expr_(cast(id as BIGINT) - 1))) otherCondition=() --------PhysicalProject ----------PhysicalOlapScan[t1] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalProject ------------PhysicalOlapScan[t2] -- !push_arithmetic_left_semi_join -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[LEFT_SEMI_JOIN] hashCondition=((expr_cast(id as BIGINT) = expr_(cast(id as BIGINT) - 1))) otherCondition=() --------PhysicalProject ----------PhysicalOlapScan[t1] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalProject ------------PhysicalOlapScan[t2] -- !push_arithmetic_right_semi_join -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((expr_cast(id as BIGINT) = expr_(cast(id as BIGINT) - 1))) otherCondition=() ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[t1] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[t2] -- !push_arithmetic_left_outer_join -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[LEFT_OUTER_JOIN] hashCondition=((expr_cast(id as BIGINT) = expr_(cast(id as BIGINT) - 1))) otherCondition=() --------PhysicalProject ----------PhysicalOlapScan[t1] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalProject ------------PhysicalOlapScan[t2] -- !push_arithmetic_right_outer_join -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((expr_cast(id as BIGINT) = expr_(cast(id as BIGINT) - 1))) otherCondition=() ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[t1] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[t2] -- !push_arithmetic_full_outer_join -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[FULL_OUTER_JOIN] hashCondition=((expr_cast(id as BIGINT) = expr_(cast(id as BIGINT) - 1))) otherCondition=() ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[t1] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[t2] -- !push_arithmetic_left_anti_join -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[LEFT_ANTI_JOIN] hashCondition=((expr_cast(id as BIGINT) = expr_(cast(id as BIGINT) - 1))) otherCondition=() --------PhysicalProject ----------PhysicalOlapScan[t1] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalProject ------------PhysicalOlapScan[t2] -- !push_arithmetic_right_anti_join -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((expr_cast(id as BIGINT) = expr_(cast(id as BIGINT) - 1))) otherCondition=() ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[t1] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[t2] -- !pushdown_null_aware_anti_join_combined -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[NULL_AWARE_LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() --------PhysicalOlapScan[t1] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalProject ------------filter((t2.id > 0)) --------------PhysicalOlapScan[t2] -- !pushdown_inner_join_subquery -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((expr_cast(id as BIGINT) = expr_(sum(id) - 1))) otherCondition=() --------PhysicalProject ----------PhysicalOlapScan[t1] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalProject ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------PhysicalOlapScan[t2] -- !pushdown_left_semi_join_subquery -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[LEFT_SEMI_JOIN] hashCondition=((expr_(id + 1) = expr_cast(id as BIGINT))) otherCondition=() --------PhysicalProject ----------PhysicalOlapScan[t1] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalProject ------------PhysicalOlapScan[t2] -- !pushdown_left_outer_join_subquery -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------NestedLoopJoin[INNER_JOIN]((cast(id as BIGINT) = (sum(id) - 1)) OR id IS NULL) --------PhysicalOlapScan[t1] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------PhysicalOlapScan[t2] -- !pushdown_left_anti_join_subquery -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[NULL_AWARE_LEFT_ANTI_JOIN] hashCondition=((expr_(id + 1) = expr_cast(id as BIGINT))) otherCondition=() --------PhysicalProject ----------PhysicalOlapScan[t1] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalProject ------------PhysicalOlapScan[t2] 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 f0ba5cc35d..9c5aa03f4d 100644 --- a/regression-test/data/nereids_rules_p0/filter_push_down/push_down_filter_other_condition.out +++ b/regression-test/data/nereids_rules_p0/filter_push_down/push_down_filter_other_condition.out @@ -1,253 +1,333 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !pushdown_inner_join -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -----filter((t1.id > 1)) -------PhysicalOlapScan[t1] apply RFs: RF0 -----filter((t2.id > 1)) -------PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------filter((t1.id > 1)) +--------PhysicalOlapScan[t1] apply RFs: RF0 +------PhysicalDistribute[DistributionSpecHash] +--------filter((t2.id > 1)) +----------PhysicalOlapScan[t2] -- !pushdown_left_semi_join -- PhysicalResultSink ---hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -----filter((t1.id > 1)) -------PhysicalOlapScan[t1] apply RFs: RF0 -----filter((t2.id > 1)) -------PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------filter((t1.id > 1)) +--------PhysicalOlapScan[t1] apply RFs: RF0 +------PhysicalDistribute[DistributionSpecHash] +--------filter((t2.id > 1)) +----------PhysicalOlapScan[t2] -- !pushdown_right_semi_join -- PhysicalResultSink ---hashJoin[RIGHT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -----filter((t1.id > 1)) -------PhysicalOlapScan[t1] apply RFs: RF0 -----filter((t2.id > 1)) -------PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[RIGHT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------filter((t1.id > 1)) +--------PhysicalOlapScan[t1] apply RFs: RF0 +------PhysicalDistribute[DistributionSpecHash] +--------filter((t2.id > 1)) +----------PhysicalOlapScan[t2] -- !pushdown_left_outer_join -- PhysicalResultSink ---hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.id > 1)) -----PhysicalOlapScan[t1] -----filter((t2.id > 1)) -------PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.id > 1)) +------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecHash] +--------filter((t2.id > 1)) +----------PhysicalOlapScan[t2] -- !pushdown_right_outer_join -- PhysicalResultSink ---hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----filter((t1.id > 1)) -------PhysicalOlapScan[t1] -----PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------PhysicalDistribute[DistributionSpecHash] +--------filter((t1.id > 1)) +----------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t2] -- !pushdown_full_outer_join -- PhysicalResultSink ---hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.id > 1)) -----PhysicalOlapScan[t1] -----PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.id > 1)) +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t2] -- !pushdown_left_anti_join -- PhysicalResultSink ---hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.id > 1)) -----PhysicalOlapScan[t1] -----filter((t2.id > 1)) -------PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.id > 1)) +------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecHash] +--------filter((t2.id > 1)) +----------PhysicalOlapScan[t2] -- !pushdown_right_anti_join -- PhysicalResultSink ---hashJoin[RIGHT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----filter((t1.id > 1)) -------PhysicalOlapScan[t1] -----PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[RIGHT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------PhysicalDistribute[DistributionSpecHash] +--------filter((t1.id > 1)) +----------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t2] -- !pushdown_cross_join -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -----filter((t1.id > 1)) -------PhysicalOlapScan[t1] apply RFs: RF0 -----filter((t2.id > 1)) -------PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------filter((t1.id > 1)) +--------PhysicalOlapScan[t1] apply RFs: RF0 +------PhysicalDistribute[DistributionSpecHash] +--------filter((t2.id > 1)) +----------PhysicalOlapScan[t2] -- !pushdown_inner_join_combined -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] -----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -------filter((t1.id < 10) and (t1.id > 1)) ---------PhysicalOlapScan[t1] apply RFs: RF0 -------filter((t2.id < 10) and (t2.id > 1)) ---------PhysicalOlapScan[t2] apply RFs: RF1 -----filter((t3.id < 10) and (t3.id > 1)) -------PhysicalOlapScan[t3] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] +------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +--------filter((t1.id < 10) and (t1.id > 1)) +----------PhysicalOlapScan[t1] apply RFs: RF0 +--------PhysicalDistribute[DistributionSpecHash] +----------filter((t2.id < 10) and (t2.id > 1)) +------------PhysicalOlapScan[t2] apply RFs: RF1 +------PhysicalDistribute[DistributionSpecHash] +--------filter((t3.id < 10) and (t3.id > 1)) +----------PhysicalOlapScan[t3] -- !pushdown_left_semi_join_combined -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] -----hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -------filter((t1.id < 10) and (t1.id > 1)) ---------PhysicalOlapScan[t1] apply RFs: RF0 RF1 -------filter((t2.id < 10) and (t2.id > 1)) ---------PhysicalOlapScan[t2] -----filter((t3.id < 10) and (t3.id > 1)) -------PhysicalOlapScan[t3] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] +------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +--------filter((t1.id < 10) and (t1.id > 1)) +----------PhysicalOlapScan[t1] apply RFs: RF0 RF1 +--------PhysicalDistribute[DistributionSpecHash] +----------filter((t2.id < 10) and (t2.id > 1)) +------------PhysicalOlapScan[t2] +------PhysicalDistribute[DistributionSpecHash] +--------filter((t3.id < 10) and (t3.id > 1)) +----------PhysicalOlapScan[t3] -- !pushdown_right_semi_join_combined -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] -----hashJoin[RIGHT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -------filter((t1.id < 10) and (t1.id > 1)) ---------PhysicalOlapScan[t1] apply RFs: RF0 -------filter((t2.id < 10) and (t2.id > 1)) ---------PhysicalOlapScan[t2] apply RFs: RF1 -----filter((t3.id < 10) and (t3.id > 1)) -------PhysicalOlapScan[t3] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] +------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +--------filter((t1.id < 10) and (t1.id > 1)) +----------PhysicalOlapScan[t1] apply RFs: RF0 +--------PhysicalDistribute[DistributionSpecHash] +----------filter((t2.id < 10) and (t2.id > 1)) +------------PhysicalOlapScan[t2] apply RFs: RF1 +------PhysicalDistribute[DistributionSpecHash] +--------filter((t3.id < 10) and (t3.id > 1)) +----------PhysicalOlapScan[t3] -- !pushdown_left_outer_join_combined -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] -----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -------filter((t1.id < 10) and (t1.id > 1)) ---------PhysicalOlapScan[t1] apply RFs: RF0 -------filter((t2.id < 10) and (t2.id > 1)) ---------PhysicalOlapScan[t2] apply RFs: RF1 -----filter((t3.id < 10) and (t3.id > 1)) -------PhysicalOlapScan[t3] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] +------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +--------filter((t1.id < 10) and (t1.id > 1)) +----------PhysicalOlapScan[t1] apply RFs: RF0 +--------PhysicalDistribute[DistributionSpecHash] +----------filter((t2.id < 10) and (t2.id > 1)) +------------PhysicalOlapScan[t2] apply RFs: RF1 +------PhysicalDistribute[DistributionSpecHash] +--------filter((t3.id < 10) and (t3.id > 1)) +----------PhysicalOlapScan[t3] -- !pushdown_right_outer_join_combined -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] -----hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -------filter((t1.id < 10) and (t1.id > 1)) ---------PhysicalOlapScan[t1] apply RFs: RF0 -------filter((t2.id < 10)) ---------PhysicalOlapScan[t2] apply RFs: RF1 -----filter((t3.id < 10)) -------PhysicalOlapScan[t3] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] +------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +--------PhysicalDistribute[DistributionSpecHash] +----------filter((t1.id < 10) and (t1.id > 1)) +------------PhysicalOlapScan[t1] apply RFs: RF0 +--------PhysicalDistribute[DistributionSpecHash] +----------filter((t2.id < 10)) +------------PhysicalOlapScan[t2] apply RFs: RF1 +------PhysicalDistribute[DistributionSpecHash] +--------filter((t3.id < 10)) +----------PhysicalOlapScan[t3] -- !pushdown_full_outer_join_combined -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] -----hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -------filter((t1.id < 10) and (t1.id > 1)) ---------PhysicalOlapScan[t1] apply RFs: RF0 -------filter((t2.id < 10)) ---------PhysicalOlapScan[t2] apply RFs: RF1 -----filter((t3.id < 10)) -------PhysicalOlapScan[t3] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] +------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +--------PhysicalDistribute[DistributionSpecHash] +----------filter((t1.id < 10) and (t1.id > 1)) +------------PhysicalOlapScan[t1] apply RFs: RF0 +--------PhysicalDistribute[DistributionSpecHash] +----------filter((t2.id < 10)) +------------PhysicalOlapScan[t2] apply RFs: RF1 +------PhysicalDistribute[DistributionSpecHash] +--------filter((t3.id < 10)) +----------PhysicalOlapScan[t3] -- !pushdown_left_anti_join_combined -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF0 id->[id] -----hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.id > 1)) -------filter((t1.id < 10)) ---------PhysicalOlapScan[t1] apply RFs: RF0 -------filter((t2.id < 10) and (t2.id > 1)) ---------PhysicalOlapScan[t2] -----filter((t3.id < 10)) -------PhysicalOlapScan[t3] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF0 id->[id] +------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.id > 1)) +--------filter((t1.id < 10)) +----------PhysicalOlapScan[t1] apply RFs: RF0 +--------PhysicalDistribute[DistributionSpecHash] +----------filter((t2.id < 10) and (t2.id > 1)) +------------PhysicalOlapScan[t2] +------PhysicalDistribute[DistributionSpecHash] +--------filter((t3.id < 10)) +----------PhysicalOlapScan[t3] -- !pushdown_right_anti_join_combined -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] -----hashJoin[RIGHT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -------filter((t1.id < 10) and (t1.id > 1)) ---------PhysicalOlapScan[t1] apply RFs: RF0 -------filter((t2.id < 10)) ---------PhysicalOlapScan[t2] apply RFs: RF1 -----filter((t3.id < 10)) -------PhysicalOlapScan[t3] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] +------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +--------PhysicalDistribute[DistributionSpecHash] +----------filter((t1.id < 10) and (t1.id > 1)) +------------PhysicalOlapScan[t1] apply RFs: RF0 +--------PhysicalDistribute[DistributionSpecHash] +----------filter((t2.id < 10)) +------------PhysicalOlapScan[t2] apply RFs: RF1 +------PhysicalDistribute[DistributionSpecHash] +--------filter((t3.id < 10)) +----------PhysicalOlapScan[t3] -- !pushdown_cross_join_combined -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF0 id->[id] -----NestedLoopJoin[CROSS_JOIN] -------PhysicalOlapScan[t1] -------filter((t2.id < 10)) ---------PhysicalOlapScan[t2] apply RFs: RF0 -----filter((t3.id < 10)) -------PhysicalOlapScan[t3] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF0 id->[id] +------PhysicalDistribute[DistributionSpecHash] +--------NestedLoopJoin[CROSS_JOIN] +----------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecReplicated] +------------filter((t2.id < 10)) +--------------PhysicalOlapScan[t2] apply RFs: RF0 +------PhysicalDistribute[DistributionSpecHash] +--------filter((t3.id < 10)) +----------PhysicalOlapScan[t3] -- !pushdown_null_aware_anti_join_combined -- PhysicalResultSink ---hashJoin[NULL_AWARE_LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----PhysicalOlapScan[t1] -----filter((t2.id > 0)) -------PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[NULL_AWARE_LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecReplicated] +--------filter((t2.id > 0)) +----------PhysicalOlapScan[t2] -- !pushdown_inner_join_subquery -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((expr_cast(id as BIGINT) = sum(id))) otherCondition=() build RFs:RF0 sum(id)->[id] -----filter((cast(id as BIGINT) = 1) and (t1.id = 1)) -------PhysicalOlapScan[t1] apply RFs: RF0 -----filter((sum(id) = 1)) -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((expr_cast(id as BIGINT) = sum(id))) otherCondition=() build RFs:RF0 sum(id)->[id] +------PhysicalDistribute[DistributionSpecHash] +--------filter((cast(id as BIGINT) = 1) and (t1.id = 1)) +----------PhysicalOlapScan[t1] apply RFs: RF0 +------PhysicalDistribute[DistributionSpecHash] +--------filter((sum(id) = 1)) +----------hashAgg[GLOBAL] +------------PhysicalDistribute[DistributionSpecGather] +--------------hashAgg[LOCAL] +----------------PhysicalOlapScan[t2] -- !pushdown_left_semi_join_subquery -- PhysicalResultSink ---hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -----filter((t1.id > 1)) -------PhysicalOlapScan[t1] apply RFs: RF0 -----filter((t2.id > 1)) -------PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------filter((t1.id > 1)) +--------PhysicalOlapScan[t1] apply RFs: RF0 +------PhysicalDistribute[DistributionSpecHash] +--------filter((t2.id > 1)) +----------PhysicalOlapScan[t2] -- !pushdown_left_outer_join_subquery -- PhysicalResultSink ---filter(((cast(id as BIGINT) = sum(id)) OR id IS NULL)) -----NestedLoopJoin[LEFT_OUTER_JOIN](t1.id = 1) -------PhysicalOlapScan[t1] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----filter(((cast(id as BIGINT) = sum(id)) OR id IS NULL)) +------NestedLoopJoin[LEFT_OUTER_JOIN](t1.id = 1) +--------PhysicalOlapScan[t1] +--------PhysicalDistribute[DistributionSpecReplicated] +----------hashAgg[GLOBAL] +------------PhysicalDistribute[DistributionSpecGather] +--------------hashAgg[LOCAL] +----------------PhysicalOlapScan[t2] -- !pushdown_left_anti_join_subquery -- PhysicalResultSink ---NestedLoopJoin[LEFT_ANTI_JOIN](((t1.id = t2.id) OR id IS NULL) OR id IS NULL)(t1.id > 1) -----PhysicalOlapScan[t1] -----PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----NestedLoopJoin[LEFT_ANTI_JOIN](((t1.id = t2.id) OR id IS NULL) OR id IS NULL)(t1.id > 1) +------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecReplicated] +--------PhysicalOlapScan[t2] -- !pushdown_cross_subquery -- PhysicalResultSink ---NestedLoopJoin[LEFT_SEMI_JOIN] -----filter((t1.id > 1)) -------PhysicalOlapScan[t1] -----PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----NestedLoopJoin[LEFT_SEMI_JOIN] +------filter((t1.id > 1)) +--------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecReplicated] +--------PhysicalOlapScan[t2] -- !pushdown_inner_join_subquery_outer -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -----filter((t1.id > 1)) -------PhysicalOlapScan[t1] apply RFs: RF0 -----filter((t2.id > 1)) -------PhysicalAssertNumRows ---------PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------filter((t1.id > 1)) +--------PhysicalOlapScan[t1] apply RFs: RF0 +------PhysicalDistribute[DistributionSpecHash] +--------filter((t2.id > 1)) +----------PhysicalAssertNumRows +------------PhysicalDistribute[DistributionSpecGather] +--------------PhysicalOlapScan[t2] -- !pushdown_left_semi_join_subquery_outer -- PhysicalResultSink ---hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -----filter((t1.id > 1)) -------PhysicalOlapScan[t1] apply RFs: RF0 -----filter((t2.id > 1)) -------PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------filter((t1.id > 1)) +--------PhysicalOlapScan[t1] apply RFs: RF0 +------PhysicalDistribute[DistributionSpecHash] +--------filter((t2.id > 1)) +----------PhysicalOlapScan[t2] -- !pushdown_left_outer_join_subquery_outer -- PhysicalResultSink ---NestedLoopJoin[INNER_JOIN]((t1.id = t2.id) OR (id IS NULL AND (t1.id > 1))) -----PhysicalOlapScan[t1] -----PhysicalAssertNumRows -------PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----NestedLoopJoin[INNER_JOIN]((t1.id = t2.id) OR (id IS NULL AND (t1.id > 1))) +------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecReplicated] +--------PhysicalAssertNumRows +----------PhysicalDistribute[DistributionSpecGather] +------------PhysicalOlapScan[t2] -- !pushdown_left_anti_join_subquery_outer -- PhysicalResultSink ---hashJoin[NULL_AWARE_LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----filter((t1.id > 1)) -------PhysicalOlapScan[t1] -----filter((t2.id > 1)) -------PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[NULL_AWARE_LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------filter((t1.id > 1)) +--------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecReplicated] +--------filter((t2.id > 1)) +----------PhysicalOlapScan[t2] -- !pushdown_cross_join_subquery_outer -- PhysicalResultSink ---NestedLoopJoin[CROSS_JOIN] -----filter((t1.id > 1)) -------PhysicalOlapScan[t1] -----PhysicalLimit[GLOBAL] -------PhysicalLimit[LOCAL] ---------PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----NestedLoopJoin[CROSS_JOIN] +------filter((t1.id > 1)) +--------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecReplicated] +--------PhysicalLimit[GLOBAL] +----------PhysicalDistribute[DistributionSpecGather] +------------PhysicalLimit[LOCAL] +--------------PhysicalOlapScan[t2] diff --git a/regression-test/data/nereids_rules_p0/filter_push_down/push_filter_inside_join.out b/regression-test/data/nereids_rules_p0/filter_push_down/push_filter_inside_join.out index 355b4b231f..5acf85a076 100644 --- a/regression-test/data/nereids_rules_p0/filter_push_down/push_filter_inside_join.out +++ b/regression-test/data/nereids_rules_p0/filter_push_down/push_filter_inside_join.out @@ -1,103 +1,140 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !pushdown_cross_join -- PhysicalResultSink ---NestedLoopJoin[INNER_JOIN](t1.msg > t2.msg) -----PhysicalOlapScan[t1] -----PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----NestedLoopJoin[INNER_JOIN](t1.msg > t2.msg) +------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecReplicated] +--------PhysicalOlapScan[t2] -- !pushdown_cross_join -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.msg = t2.msg)) otherCondition=() -----PhysicalOlapScan[t1] -----PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.msg = t2.msg)) otherCondition=() +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t2] -- !pushdown_inner_join -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.msg > t2.msg)) -----PhysicalOlapScan[t1] -----PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.msg > t2.msg)) +------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t2] -- !pushdown_left_join -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.msg > t2.msg)) -----PhysicalOlapScan[t1] -----PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.msg > t2.msg)) +------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t2] -- !pushdown_right_join -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t2.msg < t1.msg)) -----PhysicalOlapScan[t1] -----PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t2.msg < t1.msg)) +------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t2] -- !pushdown_full_join -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.msg < t2.msg)) -----PhysicalOlapScan[t1] -----PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.msg < t2.msg)) +------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t2] -- !pushdown_cross_join -- PhysicalResultSink ---NestedLoopJoin[INNER_JOIN](t1.msg < t2.msg) -----PhysicalOlapScan[t1] -----PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----NestedLoopJoin[INNER_JOIN](t1.msg < t2.msg) +------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecReplicated] +--------PhysicalOlapScan[t2] -- !pushdown_inner_join_hash -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.msg = t2.msg)) otherCondition=() -----PhysicalOlapScan[t1] -----PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.msg = t2.msg)) otherCondition=() +------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t2] -- !pushdown_left_join_hash -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.msg = t2.msg)) otherCondition=() -----PhysicalOlapScan[t1] -----PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.msg = t2.msg)) otherCondition=() +------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t2] -- !pushdown_right_join_hash -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t2.msg = t1.msg)) otherCondition=() -----PhysicalOlapScan[t1] -----PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t2.msg = t1.msg)) otherCondition=() +------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t2] -- !pushdown_full_join_hash -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.msg = t2.msg)) otherCondition=() -----PhysicalOlapScan[t1] -----PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.msg = t2.msg)) otherCondition=() +------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t2] -- !pushdown_cross_join_combine -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.msg = t2.msg)) otherCondition=(((cast(msg as DOUBLE) + cast(msg as DOUBLE)) = cast('' as DOUBLE))) -----PhysicalOlapScan[t1] -----PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.msg = t2.msg)) otherCondition=(((cast(msg as DOUBLE) + cast(msg as DOUBLE)) = cast('' as DOUBLE))) +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t2] -- !pushdown_inner_join_combine -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.msg = t2.msg)) otherCondition=(((cast(msg as DOUBLE) + cast(msg as DOUBLE)) = cast('' as DOUBLE))) -----PhysicalOlapScan[t1] -----PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.msg = t2.msg)) otherCondition=(((cast(msg as DOUBLE) + cast(msg as DOUBLE)) = cast('' as DOUBLE))) +------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t2] -- !pushdown_left_join_combine -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.msg = t2.msg)) otherCondition=(((cast(msg as DOUBLE) + cast(msg as DOUBLE)) = cast('' as DOUBLE))) -----PhysicalOlapScan[t1] -----PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.msg = t2.msg)) otherCondition=(((cast(msg as DOUBLE) + cast(msg as DOUBLE)) = cast('' as DOUBLE))) +------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t2] -- !pushdown_right_join_combine -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t2.msg = t1.msg)) otherCondition=(((cast(msg as DOUBLE) + cast(msg as DOUBLE)) = cast('' as DOUBLE))) -----PhysicalOlapScan[t1] -----PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t2.msg = t1.msg)) otherCondition=(((cast(msg as DOUBLE) + cast(msg as DOUBLE)) = cast('' as DOUBLE))) +------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t2] -- !pushdown_full_join_combine -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.msg = t2.msg)) otherCondition=(((cast(msg as DOUBLE) + cast(msg as DOUBLE)) = cast('' as DOUBLE))) -----PhysicalOlapScan[t1] -----PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.msg = t2.msg)) otherCondition=(((cast(msg as DOUBLE) + cast(msg as DOUBLE)) = cast('' as DOUBLE))) +------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t2] -- !pushdown_cross_join_combine -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.msg = t2.msg)) otherCondition=(((cast(msg as DOUBLE) + cast(msg as DOUBLE)) = cast('' as DOUBLE))) -----PhysicalOlapScan[t1] -----PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.msg = t2.msg)) otherCondition=(((cast(msg as DOUBLE) + cast(msg as DOUBLE)) = cast('' as DOUBLE))) +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t2] diff --git a/regression-test/data/nereids_rules_p0/infer_set_operator_distinct/infer_set_operator_distinct.out b/regression-test/data/nereids_rules_p0/infer_set_operator_distinct/infer_set_operator_distinct.out index 74018f96d5..786072eae0 100644 --- a/regression-test/data/nereids_rules_p0/infer_set_operator_distinct/infer_set_operator_distinct.out +++ b/regression-test/data/nereids_rules_p0/infer_set_operator_distinct/infer_set_operator_distinct.out @@ -1,329 +1,329 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !union_distinct -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------PhysicalUnion -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------PhysicalOlapScan[t1] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------PhysicalOlapScan[t2] -- !union_complex_conditions -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------PhysicalUnion -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------filter((t1.score > 10)) ------------------PhysicalOlapScan[t1] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------filter((t2.name = 'Test')) ------------------PhysicalOlapScan[t2] -- !multi_union -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------PhysicalUnion -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------PhysicalOlapScan[t1] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------PhysicalOlapScan[t2] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------PhysicalOlapScan[t3] -- !except_distinct -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalExcept -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------PhysicalProject ----------PhysicalOlapScan[t1] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------PhysicalProject ----------PhysicalOlapScan[t2] -- !except_with_filter -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalExcept -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------PhysicalProject ----------filter((t1.id > 100)) ------------PhysicalOlapScan[t1] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------PhysicalProject ----------filter((t2.id < 50)) ------------PhysicalOlapScan[t2] -- !intersect_distinct -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalIntersect -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------PhysicalProject ----------PhysicalOlapScan[t1] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------PhysicalProject ----------PhysicalOlapScan[t2] -- !intersect_with_aggregate -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalIntersect -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------PhysicalOlapScan[t1] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------PhysicalOlapScan[t2] -- !mixed_set_operators -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalIntersect ------PhysicalExcept --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------PhysicalOlapScan[t1] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------PhysicalOlapScan[t2] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[t3] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------PhysicalProject ----------PhysicalOlapScan[t4] -- !join_with_union -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------PhysicalUnion -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ------------------PhysicalOlapScan[t1] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[t2] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------PhysicalOlapScan[t3] -- !set_operator_with_subquery -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------PhysicalUnion -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------filter((t1.score > 10)) ------------------PhysicalOlapScan[t1] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------filter((t2.score < 5)) ------------------PhysicalOlapScan[t2] -- !nested_union -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------PhysicalUnion -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------PhysicalOlapScan[t1] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------PhysicalOlapScan[t2] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------PhysicalOlapScan[t3] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------PhysicalOlapScan[t4] -- !union_order_limit -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------PhysicalUnion -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------PhysicalOlapScan[t1] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalTopN[MERGE_SORT] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecGather] ------------------PhysicalTopN[LOCAL_SORT] --------------------PhysicalOlapScan[t2] -- !union_inner_join_combination -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------PhysicalUnion -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ------------------PhysicalOlapScan[t1] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[t2] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------PhysicalOlapScan[t3] -- !union_left_join_combination -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------PhysicalUnion -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ------------------PhysicalOlapScan[t1] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[t2] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------PhysicalOlapScan[t3] -- !union_right_join_combination -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------PhysicalUnion -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ------------------PhysicalProject --------------------PhysicalOlapScan[t2] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalOlapScan[t1] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------PhysicalOlapScan[t3] -- !union_full_join_combination -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------PhysicalUnion ------------PhysicalProject --------------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalOlapScan[t1] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[t2] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------PhysicalOlapScan[t3] -- !union_left_semi_join_combination -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------PhysicalUnion -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ------------------PhysicalOlapScan[t1] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[t2] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------PhysicalOlapScan[t3] -- !except_with_subquery -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalExcept -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------PhysicalProject ----------PhysicalOlapScan[t1] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------PhysicalProject ----------filter((t2.score > 10)) ------------PhysicalOlapScan[t2] -- !intersect_different_types -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalIntersect -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------PhysicalProject ----------PhysicalOlapScan[t1] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------PhysicalProject ----------PhysicalOlapScan[t2] -- !union_complex_aggregate -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------PhysicalUnion -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecGather] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------filter((t1.id > 100)) --------------------------PhysicalOlapScan[t1] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecGather] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------filter((t2.id < 50)) @@ -331,40 +331,40 @@ PhysicalResultSink -- !union_all_distinct -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalUnion -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecExecutionAny] --------PhysicalProject ----------PhysicalOlapScan[t1] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecExecutionAny] --------PhysicalProject ----------PhysicalOlapScan[t2] -- !except_complex_subquery -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalExcept -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------PhysicalProject ----------PhysicalOlapScan[t1] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------PhysicalProject ----------filter((t2.score > 20)) ------------PhysicalOlapScan[t2] -- !agg_not_output_groupby -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------PhysicalUnion -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------PhysicalOlapScan[t1] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecExecutionAny] --------------PhysicalProject ----------------hashAgg[LOCAL] ------------------PhysicalProject 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 b0d6a4a0d2..4f845e5b40 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 @@ -2,185 +2,228 @@ -- !limit_project -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------PhysicalOlapScan[t1] -- !limit_offset_project -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------PhysicalOlapScan[t1] -- !limit_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[t1] ---------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t2] -- !limit_semi_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[t1] ---------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t2] -- !right_semi_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[t1] ---------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t2] -- !left_anti_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[t1] ---------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t2] -- !right_anti_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[t1] ---------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t2] -- !full_outer_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[t1] ---------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t2] -- !left_outer_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalLimit[LOCAL] -----------PhysicalOlapScan[t1] ---------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------PhysicalLimit[LOCAL] +------------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t2] -- !right_outer_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalOlapScan[t1] apply RFs: RF0 ---------PhysicalLimit[LOCAL] -----------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t1] apply RFs: RF0 +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalLimit[LOCAL] +--------------PhysicalOlapScan[t2] -- !cross_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------NestedLoopJoin[CROSS_JOIN] ---------PhysicalLimit[LOCAL] -----------PhysicalOlapScan[t1] ---------PhysicalLimit[LOCAL] -----------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------NestedLoopJoin[CROSS_JOIN] +----------PhysicalLimit[LOCAL] +------------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecReplicated] +------------PhysicalLimit[LOCAL] +--------------PhysicalOlapScan[t2] -- !limit_offset_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[t1] ---------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t2] -- !limit_distinct -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashAgg[LOCAL] ---------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashAgg[LOCAL] +----------PhysicalOlapScan[t1] -- !limit_offset_agg -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[LOCAL] ---------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[LOCAL] +----------PhysicalOlapScan[t1] -- !limit_distinct -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashAgg[LOCAL] ---------NestedLoopJoin[CROSS_JOIN] -----------PhysicalLimit[LOCAL] -------------hashAgg[LOCAL] ---------------PhysicalOlapScan[t1] -----------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashAgg[LOCAL] +----------NestedLoopJoin[CROSS_JOIN] +------------PhysicalLimit[LOCAL] +--------------hashAgg[LOCAL] +----------------PhysicalOlapScan[t1] +------------PhysicalDistribute[DistributionSpecReplicated] +--------------PhysicalOlapScan[t2] -- !limit_distinct -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashAgg[LOCAL] ---------NestedLoopJoin[CROSS_JOIN] -----------PhysicalLimit[LOCAL] -------------hashAgg[LOCAL] ---------------PhysicalOlapScan[t1] -----------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashAgg[LOCAL] +----------NestedLoopJoin[CROSS_JOIN] +------------PhysicalLimit[LOCAL] +--------------hashAgg[LOCAL] +----------------PhysicalOlapScan[t1] +------------PhysicalDistribute[DistributionSpecReplicated] +--------------PhysicalOlapScan[t2] -- !limit_distinct -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashAgg[LOCAL] ---------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalLimit[LOCAL] -------------hashAgg[LOCAL] ---------------PhysicalOlapScan[t1] -----------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalLimit[LOCAL] +--------------hashAgg[LOCAL] +----------------PhysicalOlapScan[t1] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalOlapScan[t2] -- !limit_distinct -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashAgg[LOCAL] ---------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalLimit[LOCAL] -------------hashAgg[LOCAL] ---------------PhysicalOlapScan[t1] -----------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashAgg[LOCAL] +----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalLimit[LOCAL] +--------------hashAgg[LOCAL] +----------------PhysicalOlapScan[t1] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalOlapScan[t2] -- !limit_offset_agg -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[LOCAL] ---------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[LOCAL] +----------PhysicalOlapScan[t1] -- !limit_set_operation -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------PhysicalUnion -------------PhysicalLimit[LOCAL] ---------------hashAgg[LOCAL] -----------------PhysicalOlapScan[t1] -------------PhysicalLimit[LOCAL] ---------------hashAgg[LOCAL] -----------------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------PhysicalUnion +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalLimit[LOCAL] +--------------------hashAgg[LOCAL] +----------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalLimit[LOCAL] +--------------------hashAgg[LOCAL] +----------------------PhysicalOlapScan[t2] -- !limit_offset_set_operation -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------PhysicalIntersect ---------PhysicalOlapScan[t1] ---------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------PhysicalIntersect +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t2] -- !limit_window -- PhysicalResultSink @@ -188,9 +231,10 @@ PhysicalResultSink ----PhysicalLimit[LOCAL] ------PhysicalWindow --------PhysicalQuickSort[MERGE_SORT] -----------PhysicalQuickSort[LOCAL_SORT] -------------PhysicalPartitionTopN ---------------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecGather] +------------PhysicalQuickSort[LOCAL_SORT] +--------------PhysicalPartitionTopN +----------------PhysicalOlapScan[t1] -- !limit_offset_window -- PhysicalResultSink @@ -198,61 +242,71 @@ PhysicalResultSink ----PhysicalLimit[LOCAL] ------PhysicalWindow --------PhysicalQuickSort[MERGE_SORT] -----------PhysicalQuickSort[LOCAL_SORT] -------------PhysicalPartitionTopN ---------------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecGather] +------------PhysicalQuickSort[LOCAL_SORT] +--------------PhysicalPartitionTopN +----------------PhysicalOlapScan[t1] -- !limit_filter -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------filter((t1.id = 1)) ---------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------filter((t1.id = 1)) +----------PhysicalOlapScan[t1] -- !limit_offset_filter -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------filter((t1.id = 1)) ---------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------filter((t1.id = 1)) +----------PhysicalOlapScan[t1] -- !limit_project_filter -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------filter((t1.id > 100)) ---------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------filter((t1.id > 100)) +----------PhysicalOlapScan[t1] -- !limit_join_filter -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------filter((t1.id > 100)) -----------PhysicalOlapScan[t1] apply RFs: RF0 ---------filter((t2.id > 100)) -----------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +----------filter((t1.id > 100)) +------------PhysicalOlapScan[t1] apply RFs: RF0 +----------PhysicalDistribute[DistributionSpecHash] +------------filter((t2.id > 100)) +--------------PhysicalOlapScan[t2] -- !limit_subquery -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------PhysicalOlapScan[t1] -- !limit_subquery_filter -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------filter((t1.id > 100)) ---------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------filter((t1.id > 100)) +----------PhysicalOlapScan[t1] -- !limit_subquery_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[t1] ---------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t2] -- !limit_subquery_window -- PhysicalResultSink @@ -260,164 +314,208 @@ PhysicalResultSink ----PhysicalLimit[LOCAL] ------PhysicalWindow --------PhysicalQuickSort[MERGE_SORT] -----------PhysicalQuickSort[LOCAL_SORT] -------------PhysicalPartitionTopN ---------------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecGather] +------------PhysicalQuickSort[LOCAL_SORT] +--------------PhysicalPartitionTopN +----------------PhysicalOlapScan[t1] -- !limit_nested_subquery -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------PhysicalOlapScan[t1] -- !limit_union_filter -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------PhysicalUnion -------------PhysicalLimit[LOCAL] ---------------hashAgg[LOCAL] -----------------filter((t1.id > 100)) -------------------PhysicalOlapScan[t1] -------------PhysicalLimit[LOCAL] ---------------hashAgg[LOCAL] -----------------filter((t2.id > 100)) -------------------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------PhysicalUnion +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalLimit[LOCAL] +--------------------hashAgg[LOCAL] +----------------------filter((t1.id > 100)) +------------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalLimit[LOCAL] +--------------------hashAgg[LOCAL] +----------------------filter((t2.id > 100)) +------------------------PhysicalOlapScan[t2] -- !limit_union_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------PhysicalUnion -------------PhysicalLimit[LOCAL] ---------------hashAgg[GLOBAL] -----------------hashAgg[LOCAL] -------------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------------------PhysicalOlapScan[t1] ---------------------PhysicalOlapScan[t2] -------------PhysicalLimit[LOCAL] ---------------hashAgg[LOCAL] -----------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t3.id = t4.id)) otherCondition=() +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------PhysicalUnion +----------------PhysicalLimit[LOCAL] +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------hashAgg[LOCAL] +------------------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------PhysicalOlapScan[t1] +--------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------PhysicalOlapScan[t2] +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalLimit[LOCAL] --------------------hashAgg[LOCAL] -----------------------PhysicalOlapScan[t3] -------------------PhysicalOlapScan[t4] +----------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t3.id = t4.id)) otherCondition=() +------------------------PhysicalLimit[LOCAL] +--------------------------hashAgg[LOCAL] +----------------------------PhysicalOlapScan[t3] +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------PhysicalOlapScan[t4] -- !limit_union_window -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------PhysicalUnion -------------PhysicalLimit[LOCAL] ---------------hashAgg[GLOBAL] -----------------hashAgg[LOCAL] -------------------PhysicalWindow ---------------------PhysicalQuickSort[MERGE_SORT] -----------------------PhysicalQuickSort[LOCAL_SORT] -------------------------PhysicalOlapScan[t1] -------------PhysicalLimit[LOCAL] ---------------hashAgg[GLOBAL] -----------------hashAgg[LOCAL] -------------------PhysicalWindow ---------------------PhysicalQuickSort[MERGE_SORT] -----------------------PhysicalQuickSort[LOCAL_SORT] -------------------------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashAgg[GLOBAL] +----------hashAgg[LOCAL] +------------PhysicalUnion +--------------PhysicalLimit[LOCAL] +----------------hashAgg[GLOBAL] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------hashAgg[LOCAL] +----------------------PhysicalWindow +------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------PhysicalOlapScan[t1] +--------------PhysicalLimit[LOCAL] +----------------hashAgg[GLOBAL] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------hashAgg[LOCAL] +----------------------PhysicalWindow +------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------PhysicalOlapScan[t2] -- !limit_subquery_join_filter -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------filter((t1.id > 100)) -----------PhysicalOlapScan[t1] apply RFs: RF0 ---------filter((t2.id > 100)) -----------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +----------filter((t1.id > 100)) +------------PhysicalOlapScan[t1] apply RFs: RF0 +----------PhysicalDistribute[DistributionSpecHash] +------------filter((t2.id > 100)) +--------------PhysicalOlapScan[t2] -- !limit_subquery_join_window -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------PhysicalWindow ---------PhysicalQuickSort[LOCAL_SORT] -----------PhysicalPartitionTopN -------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------------PhysicalOlapScan[t1] ---------------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------PhysicalWindow +----------PhysicalQuickSort[LOCAL_SORT] +------------PhysicalPartitionTopN +--------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalOlapScan[t2] -- !limit_subquery_union_filter -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------PhysicalUnion -------------PhysicalLimit[LOCAL] ---------------hashAgg[LOCAL] -----------------filter((t1.id > 100)) -------------------PhysicalOlapScan[t1] -------------PhysicalLimit[LOCAL] ---------------hashAgg[LOCAL] -----------------filter((t2.id > 100)) -------------------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------PhysicalUnion +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalLimit[LOCAL] +--------------------hashAgg[LOCAL] +----------------------filter((t1.id > 100)) +------------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalLimit[LOCAL] +--------------------hashAgg[LOCAL] +----------------------filter((t2.id > 100)) +------------------------PhysicalOlapScan[t2] -- !limit_subquery_union_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------PhysicalUnion -------------PhysicalLimit[LOCAL] ---------------hashAgg[LOCAL] -----------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------------PhysicalOlapScan[t1] -------------------PhysicalOlapScan[t2] -------------PhysicalLimit[LOCAL] ---------------hashAgg[LOCAL] -----------------hashJoin[INNER_JOIN] hashCondition=((t3.id = t4.id)) otherCondition=() build RFs:RF1 id->[id] -------------------PhysicalOlapScan[t3] apply RFs: RF1 -------------------PhysicalOlapScan[t4] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------PhysicalUnion +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalLimit[LOCAL] +--------------------hashAgg[LOCAL] +----------------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------------------PhysicalOlapScan[t1] +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------PhysicalOlapScan[t2] +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalLimit[LOCAL] +--------------------hashAgg[LOCAL] +----------------------hashJoin[INNER_JOIN] hashCondition=((t3.id = t4.id)) otherCondition=() build RFs:RF1 id->[id] +------------------------PhysicalOlapScan[t3] apply RFs: RF1 +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------PhysicalOlapScan[t4] -- !limit_subquery_union_window -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------PhysicalWindow ---------PhysicalPartitionTopN +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------PhysicalWindow ----------PhysicalPartitionTopN -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] -----------------PhysicalUnion -------------------PhysicalOlapScan[t1] -------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalPartitionTopN +----------------hashAgg[GLOBAL] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------hashAgg[LOCAL] +----------------------PhysicalUnion +------------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------------PhysicalOlapScan[t1] +------------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------------PhysicalOlapScan[t2] -- !limit_correlated_subquery -- PhysicalResultSink ---hashJoin[LEFT_SEMI_JOIN] hashCondition=((t2.id = t1.id)) otherCondition=() -----PhysicalOlapScan[t1] -----PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_SEMI_JOIN] hashCondition=((t2.id = t1.id)) otherCondition=() +------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t2] -- !limit_correlated_subquery_join -- PhysicalResultSink ---hashJoin[LEFT_SEMI_JOIN] hashCondition=((t3.id = t1.id)) otherCondition=() -----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------PhysicalOlapScan[t1] -------PhysicalOlapScan[t2] -----PhysicalOlapScan[t3] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_SEMI_JOIN] hashCondition=((t3.id = t1.id)) otherCondition=() +------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------PhysicalOlapScan[t1] +--------PhysicalDistribute[DistributionSpecHash] +----------PhysicalOlapScan[t2] +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t3] -- !limit_correlated_subquery_window -- PhysicalResultSink ---PhysicalWindow -----PhysicalQuickSort[LOCAL_SORT] -------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t2.id = t1.id)) otherCondition=() ---------PhysicalOlapScan[t1] ---------PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----PhysicalWindow +------PhysicalQuickSort[LOCAL_SORT] +--------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t2.id = t1.id)) otherCondition=() +----------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t2] -- !limit_cte_query -- PhysicalCteAnchor ( cteId=CTEId#0 ) @@ -426,8 +524,10 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalOlapScan[t1] --PhysicalResultSink ----PhysicalLimit[GLOBAL] -------PhysicalLimit[LOCAL] ---------PhysicalCteConsumer ( cteId=CTEId#0 ) +------PhysicalDistribute[DistributionSpecGather] +--------PhysicalLimit[LOCAL] +----------PhysicalDistribute[DistributionSpecExecutionAny] +------------PhysicalCteConsumer ( cteId=CTEId#0 ) -- !limit_cte_query_join -- PhysicalCteAnchor ( cteId=CTEId#0 ) @@ -440,10 +540,13 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalOlapScan[t2] ----PhysicalResultSink ------PhysicalLimit[GLOBAL] ---------PhysicalLimit[LOCAL] -----------hashJoin[FULL_OUTER_JOIN] hashCondition=((cte1.id = cte2.id)) otherCondition=() -------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------PhysicalCteConsumer ( cteId=CTEId#1 ) +--------PhysicalDistribute[DistributionSpecGather] +----------PhysicalLimit[LOCAL] +------------hashJoin[FULL_OUTER_JOIN] hashCondition=((cte1.id = cte2.id)) otherCondition=() +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalCteConsumer ( cteId=CTEId#0 ) +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalCteConsumer ( cteId=CTEId#1 ) -- !limit_cte_query_window -- PhysicalCteAnchor ( cteId=CTEId#0 ) @@ -455,47 +558,56 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalLimit[LOCAL] --------PhysicalWindow ----------PhysicalQuickSort[MERGE_SORT] -------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalPartitionTopN -----------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------PhysicalDistribute[DistributionSpecGather] +--------------PhysicalQuickSort[LOCAL_SORT] +----------------PhysicalPartitionTopN +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -- !limit_project_filter -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------filter((t1.id > 100)) ---------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------filter((t1.id > 100)) +----------PhysicalOlapScan[t1] -- !limit_join_filter -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------filter((t1.id > 100)) -----------PhysicalOlapScan[t1] apply RFs: RF0 ---------filter((t2.id > 100)) -----------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +----------filter((t1.id > 100)) +------------PhysicalOlapScan[t1] apply RFs: RF0 +----------PhysicalDistribute[DistributionSpecHash] +------------filter((t2.id > 100)) +--------------PhysicalOlapScan[t2] -- !limit_subquery -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------PhysicalOlapScan[t1] -- !limit_subquery_filter -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------filter((t1.id > 100)) ---------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------filter((t1.id > 100)) +----------PhysicalOlapScan[t1] -- !limit_subquery_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[t1] ---------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t2] -- !limit_subquery_window -- PhysicalResultSink @@ -503,229 +615,305 @@ PhysicalResultSink ----PhysicalLimit[LOCAL] ------PhysicalWindow --------PhysicalQuickSort[MERGE_SORT] -----------PhysicalQuickSort[LOCAL_SORT] -------------PhysicalPartitionTopN ---------------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecGather] +------------PhysicalQuickSort[LOCAL_SORT] +--------------PhysicalPartitionTopN +----------------PhysicalOlapScan[t1] -- !limit_nested_subquery -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------PhysicalOlapScan[t1] -- !limit_subquery_order_by -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------PhysicalOlapScan[t1] -- !limit_subquery_order_by_offset -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------PhysicalOlapScan[t1] -- !limit_subquery_distinct -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashAgg[LOCAL] ---------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashAgg[LOCAL] +----------PhysicalOlapScan[t1] -- !limit_cross_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------NestedLoopJoin[CROSS_JOIN] ---------PhysicalLimit[LOCAL] -----------PhysicalOlapScan[t1] ---------PhysicalLimit[LOCAL] -----------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------NestedLoopJoin[CROSS_JOIN] +----------PhysicalLimit[LOCAL] +------------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecReplicated] +------------PhysicalLimit[LOCAL] +--------------PhysicalOlapScan[t2] -- !limit_multiple_left_outer_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() ---------PhysicalLimit[LOCAL] -----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalLimit[LOCAL] ---------------PhysicalOlapScan[t1] -------------PhysicalOlapScan[t2] ---------PhysicalOlapScan[t3] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() +----------PhysicalLimit[LOCAL] +------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------------PhysicalLimit[LOCAL] +----------------PhysicalOlapScan[t1] +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalOlapScan[t2] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t3] -- !limit_multiple_right_outer_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] ---------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[t1] apply RFs: RF1 -----------PhysicalOlapScan[t2] ---------PhysicalLimit[LOCAL] -----------PhysicalOlapScan[t3] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] +----------PhysicalDistribute[DistributionSpecHash] +------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalOlapScan[t1] apply RFs: RF1 +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalOlapScan[t2] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalLimit[LOCAL] +--------------PhysicalOlapScan[t3] -- !limit_multiple_full_outer_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() ---------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[t1] -----------PhysicalOlapScan[t2] ---------PhysicalOlapScan[t3] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() +----------PhysicalDistribute[DistributionSpecHash] +------------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalOlapScan[t1] +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalOlapScan[t2] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t3] -- !limit_multiple_cross_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------NestedLoopJoin[CROSS_JOIN] ---------PhysicalLimit[LOCAL] -----------NestedLoopJoin[CROSS_JOIN] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------NestedLoopJoin[CROSS_JOIN] +----------PhysicalLimit[LOCAL] +------------NestedLoopJoin[CROSS_JOIN] +--------------PhysicalLimit[LOCAL] +----------------PhysicalOlapScan[t1] +--------------PhysicalDistribute[DistributionSpecReplicated] +----------------PhysicalLimit[LOCAL] +------------------PhysicalOlapScan[t2] +----------PhysicalDistribute[DistributionSpecReplicated] ------------PhysicalLimit[LOCAL] ---------------PhysicalOlapScan[t1] -------------PhysicalLimit[LOCAL] ---------------PhysicalOlapScan[t2] ---------PhysicalLimit[LOCAL] -----------PhysicalOlapScan[t3] +--------------PhysicalOlapScan[t3] -- !limit_left_outer_join_right_outer_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF0 id->[id] ---------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[t1] apply RFs: RF0 -----------PhysicalOlapScan[t2] ---------PhysicalLimit[LOCAL] -----------PhysicalOlapScan[t3] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF0 id->[id] +----------PhysicalDistribute[DistributionSpecHash] +------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------------PhysicalOlapScan[t1] apply RFs: RF0 +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalOlapScan[t2] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalLimit[LOCAL] +--------------PhysicalOlapScan[t3] -- !limit_left_outer_join_full_outer_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() ---------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[t1] -----------PhysicalOlapScan[t2] ---------PhysicalOlapScan[t3] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() +----------PhysicalDistribute[DistributionSpecHash] +------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------------PhysicalOlapScan[t1] +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalOlapScan[t2] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t3] -- !limit_left_outer_join_cross_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------NestedLoopJoin[CROSS_JOIN] ---------PhysicalLimit[LOCAL] -----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------NestedLoopJoin[CROSS_JOIN] +----------PhysicalLimit[LOCAL] +------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------------PhysicalLimit[LOCAL] +----------------PhysicalOlapScan[t1] +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalOlapScan[t2] +----------PhysicalDistribute[DistributionSpecReplicated] ------------PhysicalLimit[LOCAL] ---------------PhysicalOlapScan[t1] -------------PhysicalOlapScan[t2] ---------PhysicalLimit[LOCAL] -----------PhysicalOlapScan[t3] +--------------PhysicalOlapScan[t3] -- !limit_right_outer_join_full_outer_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() ---------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[t1] -----------PhysicalOlapScan[t2] ---------PhysicalOlapScan[t3] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() +----------PhysicalDistribute[DistributionSpecHash] +------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalOlapScan[t1] +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalOlapScan[t2] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t3] -- !limit_right_outer_join_cross_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------NestedLoopJoin[CROSS_JOIN] ---------PhysicalLimit[LOCAL] -----------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -------------PhysicalOlapScan[t1] apply RFs: RF0 +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------NestedLoopJoin[CROSS_JOIN] +----------PhysicalLimit[LOCAL] +------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalOlapScan[t1] apply RFs: RF0 +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalLimit[LOCAL] +------------------PhysicalOlapScan[t2] +----------PhysicalDistribute[DistributionSpecReplicated] ------------PhysicalLimit[LOCAL] ---------------PhysicalOlapScan[t2] ---------PhysicalLimit[LOCAL] -----------PhysicalOlapScan[t3] +--------------PhysicalOlapScan[t3] -- !limit_full_outer_join_cross_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------NestedLoopJoin[CROSS_JOIN] ---------PhysicalLimit[LOCAL] -----------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[t1] -------------PhysicalOlapScan[t2] ---------PhysicalLimit[LOCAL] -----------PhysicalOlapScan[t3] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------NestedLoopJoin[CROSS_JOIN] +----------PhysicalLimit[LOCAL] +------------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalOlapScan[t1] +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalOlapScan[t2] +----------PhysicalDistribute[DistributionSpecReplicated] +------------PhysicalLimit[LOCAL] +--------------PhysicalOlapScan[t3] -- !limit_left_outer_join_right_outer_join_full_outer_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t4.id)) otherCondition=() ---------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() -----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[t1] -------------PhysicalOlapScan[t2] -----------PhysicalOlapScan[t3] ---------PhysicalOlapScan[t4] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t4.id)) otherCondition=() +----------PhysicalDistribute[DistributionSpecHash] +------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() +--------------PhysicalDistribute[DistributionSpecHash] +----------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------------PhysicalOlapScan[t1] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalOlapScan[t2] +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalOlapScan[t3] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t4] -- !limit_left_outer_join_right_outer_join_cross_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------NestedLoopJoin[CROSS_JOIN] ---------PhysicalLimit[LOCAL] -----------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF0 id->[id] -------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------------PhysicalOlapScan[t1] apply RFs: RF0 ---------------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------NestedLoopJoin[CROSS_JOIN] +----------PhysicalLimit[LOCAL] +------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF0 id->[id] +--------------PhysicalDistribute[DistributionSpecHash] +----------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------------PhysicalOlapScan[t1] apply RFs: RF0 +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalOlapScan[t2] +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalLimit[LOCAL] +------------------PhysicalOlapScan[t3] +----------PhysicalDistribute[DistributionSpecReplicated] ------------PhysicalLimit[LOCAL] ---------------PhysicalOlapScan[t3] ---------PhysicalLimit[LOCAL] -----------PhysicalOlapScan[t4] +--------------PhysicalOlapScan[t4] -- !limit_left_outer_join_full_outer_join_cross_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------NestedLoopJoin[CROSS_JOIN] ---------PhysicalLimit[LOCAL] -----------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() -------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------------PhysicalOlapScan[t1] ---------------PhysicalOlapScan[t2] -------------PhysicalOlapScan[t3] ---------PhysicalLimit[LOCAL] -----------PhysicalOlapScan[t4] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------NestedLoopJoin[CROSS_JOIN] +----------PhysicalLimit[LOCAL] +------------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() +--------------PhysicalDistribute[DistributionSpecHash] +----------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------------PhysicalOlapScan[t1] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalOlapScan[t2] +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalOlapScan[t3] +----------PhysicalDistribute[DistributionSpecReplicated] +------------PhysicalLimit[LOCAL] +--------------PhysicalOlapScan[t4] -- !limit_right_outer_join_full_outer_join_cross_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------NestedLoopJoin[CROSS_JOIN] ---------PhysicalLimit[LOCAL] -----------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() -------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------------PhysicalOlapScan[t1] ---------------PhysicalOlapScan[t2] -------------PhysicalOlapScan[t3] ---------PhysicalLimit[LOCAL] -----------PhysicalOlapScan[t4] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------NestedLoopJoin[CROSS_JOIN] +----------PhysicalLimit[LOCAL] +------------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() +--------------PhysicalDistribute[DistributionSpecHash] +----------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalOlapScan[t1] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalOlapScan[t2] +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalOlapScan[t3] +----------PhysicalDistribute[DistributionSpecReplicated] +------------PhysicalLimit[LOCAL] +--------------PhysicalOlapScan[t4] -- !limit_left_outer_join_right_outer_join_full_outer_join_cross_join -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------NestedLoopJoin[CROSS_JOIN] ---------PhysicalLimit[LOCAL] -----------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t4.id)) otherCondition=() -------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() ---------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------------PhysicalOlapScan[t1] -----------------PhysicalOlapScan[t2] ---------------PhysicalOlapScan[t3] -------------PhysicalOlapScan[t4] ---------PhysicalLimit[LOCAL] -----------PhysicalOlapScan[t4] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------NestedLoopJoin[CROSS_JOIN] +----------PhysicalLimit[LOCAL] +------------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t4.id)) otherCondition=() +--------------PhysicalDistribute[DistributionSpecHash] +----------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() +------------------PhysicalDistribute[DistributionSpecHash] +--------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------------------PhysicalOlapScan[t1] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------PhysicalOlapScan[t2] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalOlapScan[t3] +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalOlapScan[t4] +----------PhysicalDistribute[DistributionSpecReplicated] +------------PhysicalLimit[LOCAL] +--------------PhysicalOlapScan[t4] 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 f157b03fc8..c95f0cfb3d 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 @@ -2,76 +2,99 @@ -- !limit_offset_sort_project -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------PhysicalOlapScan[t1] -- !limit_sort_join -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[t1] apply RFs: RF0 ---------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------PhysicalOlapScan[t1] apply RFs: RF0 +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t2] -- !limit_sort_semi_join -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[t1] apply RFs: RF0 ---------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------PhysicalOlapScan[t1] apply RFs: RF0 +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t2] -- !right_semi_join_order -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[t1] ---------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t2] -- !left_anti_join_order -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[t1] ---------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t2] -- !right_anti_join_order -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[t1] ---------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t2] -- !full_outer_join_order -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[t1] ---------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t2] -- !left_outer_join_order -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[t1] ---------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalTopN[MERGE_SORT] +--------------PhysicalDistribute[DistributionSpecGather] +----------------PhysicalTopN[LOCAL_SORT] +------------------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t2] -- !right_outer_join_order -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalOlapScan[t1] apply RFs: RF0 ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t1] apply RFs: RF0 +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalTopN[MERGE_SORT] +--------------PhysicalDistribute[DistributionSpecGather] +----------------PhysicalTopN[LOCAL_SORT] +------------------PhysicalOlapScan[t2] -- !cross_join_order -- PhysicalResultSink @@ -79,78 +102,97 @@ PhysicalResultSink ----PhysicalTopN[LOCAL_SORT] ------NestedLoopJoin[CROSS_JOIN] --------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[t1] ---------PhysicalOlapScan[t2] +----------PhysicalDistribute[DistributionSpecGather] +------------PhysicalTopN[LOCAL_SORT] +--------------PhysicalOlapScan[t1] +--------PhysicalDistribute[DistributionSpecReplicated] +----------PhysicalOlapScan[t2] -- !limit_offset_sort_join -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[t1] apply RFs: RF0 ---------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------PhysicalOlapScan[t1] apply RFs: RF0 +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t2] -- !limit_sort_agg_having -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[LOCAL] ---------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[LOCAL] +----------PhysicalOlapScan[t1] -- !limit_offset_agg_having -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[LOCAL] ---------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[LOCAL] +----------PhysicalOlapScan[t1] -- !limit_offset_sort_agg_having -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[LOCAL] ---------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[LOCAL] +----------PhysicalOlapScan[t1] -- !limit_distinct -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------NestedLoopJoin[CROSS_JOIN] -------------PhysicalOlapScan[t1] -------------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------NestedLoopJoin[CROSS_JOIN] +----------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecReplicated] +------------------PhysicalOlapScan[t2] -- !limit_distinct -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------NestedLoopJoin[CROSS_JOIN] -------------PhysicalOlapScan[t1] -------------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------NestedLoopJoin[CROSS_JOIN] +----------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecReplicated] +------------------PhysicalOlapScan[t2] -- !limit_distinct -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[t1] -------------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalOlapScan[t2] -- !limit_distinct -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[t1] -------------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalOlapScan[t2] -- !limit_window -- PhysicalResultSink @@ -158,9 +200,10 @@ PhysicalResultSink ----PhysicalLimit[LOCAL] ------PhysicalWindow --------PhysicalQuickSort[MERGE_SORT] -----------PhysicalQuickSort[LOCAL_SORT] -------------PhysicalPartitionTopN ---------------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecGather] +------------PhysicalQuickSort[LOCAL_SORT] +--------------PhysicalPartitionTopN +----------------PhysicalOlapScan[t1] -- !limit_sort_window -- PhysicalResultSink @@ -168,8 +211,9 @@ PhysicalResultSink ----PhysicalTopN[LOCAL_SORT] ------PhysicalWindow --------PhysicalQuickSort[MERGE_SORT] -----------PhysicalQuickSort[LOCAL_SORT] -------------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecGather] +------------PhysicalQuickSort[LOCAL_SORT] +--------------PhysicalOlapScan[t1] -- !limit_offset_window -- PhysicalResultSink @@ -177,9 +221,10 @@ PhysicalResultSink ----PhysicalLimit[LOCAL] ------PhysicalWindow --------PhysicalQuickSort[MERGE_SORT] -----------PhysicalQuickSort[LOCAL_SORT] -------------PhysicalPartitionTopN ---------------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecGather] +------------PhysicalQuickSort[LOCAL_SORT] +--------------PhysicalPartitionTopN +----------------PhysicalOlapScan[t1] -- !limit_offset_sort_window -- PhysicalResultSink @@ -187,76 +232,97 @@ PhysicalResultSink ----PhysicalTopN[LOCAL_SORT] ------PhysicalWindow --------PhysicalQuickSort[MERGE_SORT] -----------PhysicalQuickSort[LOCAL_SORT] -------------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecGather] +------------PhysicalQuickSort[LOCAL_SORT] +--------------PhysicalOlapScan[t1] -- !limit_sort_filter -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------filter((t1.id = 1)) ---------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------filter((t1.id = 1)) +----------PhysicalOlapScan[t1] -- !limit_offset_sort_filter -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------filter((t1.id = 1)) ---------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------filter((t1.id = 1)) +----------PhysicalOlapScan[t1] -- !limit_subquery_order_by_inside_limit_outside -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------PhysicalOlapScan[t1] -- !limit_subquery_all_inside -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------PhysicalOlapScan[t1] -- !limit_set_operation -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------PhysicalUnion -------------PhysicalOlapScan[t1] -------------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------PhysicalUnion +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalOlapScan[t2] -- !limit_outside_order_inside_set_operation -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------PhysicalUnion -------------PhysicalLimit[LOCAL] ---------------hashAgg[LOCAL] -----------------PhysicalOlapScan[t1] -------------PhysicalLimit[LOCAL] ---------------hashAgg[LOCAL] -----------------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------PhysicalUnion +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalLimit[LOCAL] +--------------------hashAgg[LOCAL] +----------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalLimit[LOCAL] +--------------------hashAgg[LOCAL] +----------------------PhysicalOlapScan[t2] -- !limit_inside_set_operation -- PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------PhysicalUnion ---------PhysicalOlapScan[t1] ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecHash] +--------hashAgg[LOCAL] +----------PhysicalUnion +------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------PhysicalOlapScan[t1] +------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------PhysicalTopN[MERGE_SORT] +----------------PhysicalDistribute[DistributionSpecGather] +------------------PhysicalTopN[LOCAL_SORT] +--------------------PhysicalOlapScan[t2] -- !limit_offset_set_operation -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalIntersect ---------PhysicalOlapScan[t1] ---------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------PhysicalIntersect +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t2] -- !limit_window -- PhysicalResultSink @@ -264,8 +330,9 @@ PhysicalResultSink ----PhysicalTopN[LOCAL_SORT] ------PhysicalWindow --------PhysicalQuickSort[MERGE_SORT] -----------PhysicalQuickSort[LOCAL_SORT] -------------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecGather] +------------PhysicalQuickSort[LOCAL_SORT] +--------------PhysicalOlapScan[t1] -- !limit_offset_window -- PhysicalResultSink @@ -273,60 +340,70 @@ PhysicalResultSink ----PhysicalTopN[LOCAL_SORT] ------PhysicalWindow --------PhysicalQuickSort[MERGE_SORT] -----------PhysicalQuickSort[LOCAL_SORT] -------------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecGather] +------------PhysicalQuickSort[LOCAL_SORT] +--------------PhysicalOlapScan[t1] -- !limit_filter -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------filter((t1.id = 1)) ---------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------filter((t1.id = 1)) +----------PhysicalOlapScan[t1] -- !limit_offset_filter -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------filter((t1.id = 1)) ---------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------filter((t1.id = 1)) +----------PhysicalOlapScan[t1] -- !limit_project_filter -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------filter((t1.id > 100)) ---------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------filter((t1.id > 100)) +----------PhysicalOlapScan[t1] -- !limit_join_filter -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------filter((t1.id > 100)) -----------PhysicalOlapScan[t1] apply RFs: RF0 ---------filter((t2.id > 100)) -----------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +----------filter((t1.id > 100)) +------------PhysicalOlapScan[t1] apply RFs: RF0 +----------PhysicalDistribute[DistributionSpecHash] +------------filter((t2.id > 100)) +--------------PhysicalOlapScan[t2] -- !limit_subquery -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------PhysicalOlapScan[t1] -- !limit_subquery_filter -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------filter((t1.id > 100)) ---------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------filter((t1.id > 100)) +----------PhysicalOlapScan[t1] -- !limit_subquery_join -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[t1] apply RFs: RF0 ---------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------PhysicalOlapScan[t1] apply RFs: RF0 +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t2] -- !limit_subquery_window -- PhysicalResultSink @@ -334,138 +411,182 @@ PhysicalResultSink ----PhysicalTopN[LOCAL_SORT] ------PhysicalWindow --------PhysicalQuickSort[MERGE_SORT] -----------PhysicalQuickSort[LOCAL_SORT] -------------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecGather] +------------PhysicalQuickSort[LOCAL_SORT] +--------------PhysicalOlapScan[t1] -- !limit_nested_subquery -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------PhysicalOlapScan[t1] -- !limit_union_filter -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------PhysicalUnion -------------filter((t1.id > 100)) ---------------PhysicalOlapScan[t1] -------------filter((t2.id > 100)) ---------------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------PhysicalUnion +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------filter((t1.id > 100)) +--------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------filter((t2.id > 100)) +--------------------PhysicalOlapScan[t2] -- !limit_union_join -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------PhysicalUnion -------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------------PhysicalOlapScan[t1] ---------------PhysicalOlapScan[t2] -------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t3.id = t4.id)) otherCondition=() ---------------PhysicalOlapScan[t3] ---------------PhysicalOlapScan[t4] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------PhysicalUnion +----------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalOlapScan[t1] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalOlapScan[t2] +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t3.id = t4.id)) otherCondition=() +--------------------PhysicalOlapScan[t3] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------PhysicalOlapScan[t4] -- !limit_union_window -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------PhysicalUnion -------------PhysicalWindow ---------------PhysicalQuickSort[MERGE_SORT] -----------------PhysicalQuickSort[LOCAL_SORT] -------------------PhysicalOlapScan[t1] -------------PhysicalWindow ---------------PhysicalQuickSort[MERGE_SORT] -----------------PhysicalQuickSort[LOCAL_SORT] -------------------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------PhysicalUnion +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalWindow +--------------------PhysicalQuickSort[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalQuickSort[LOCAL_SORT] +--------------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalWindow +--------------------PhysicalQuickSort[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalQuickSort[LOCAL_SORT] +--------------------------PhysicalOlapScan[t2] -- !limit_subquery_join_filter -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------filter((t1.id > 100)) -----------PhysicalOlapScan[t1] apply RFs: RF0 ---------filter((t2.id > 100)) -----------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +----------filter((t1.id > 100)) +------------PhysicalOlapScan[t1] apply RFs: RF0 +----------PhysicalDistribute[DistributionSpecHash] +------------filter((t2.id > 100)) +--------------PhysicalOlapScan[t2] -- !limit_subqueryjoin_window -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalWindow ---------PhysicalQuickSort[LOCAL_SORT] -----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[t1] -------------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------PhysicalWindow +----------PhysicalQuickSort[LOCAL_SORT] +------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------------PhysicalOlapScan[t1] +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalOlapScan[t2] -- !limit_subquery_union_filter -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------PhysicalUnion -------------filter((t1.id > 100)) ---------------PhysicalOlapScan[t1] -------------filter((t2.id > 100)) ---------------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------PhysicalUnion +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------filter((t1.id > 100)) +--------------------PhysicalOlapScan[t1] +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------filter((t2.id > 100)) +--------------------PhysicalOlapScan[t2] -- !limit_subquery_union_join -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------PhysicalUnion -------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------------PhysicalOlapScan[t1] ---------------PhysicalOlapScan[t2] -------------hashJoin[INNER_JOIN] hashCondition=((t3.id = t4.id)) otherCondition=() build RFs:RF1 id->[id] ---------------PhysicalOlapScan[t3] apply RFs: RF1 ---------------PhysicalOlapScan[t4] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------PhysicalUnion +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------------------PhysicalOlapScan[t1] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------PhysicalOlapScan[t2] +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------hashJoin[INNER_JOIN] hashCondition=((t3.id = t4.id)) otherCondition=() build RFs:RF1 id->[id] +--------------------PhysicalOlapScan[t3] apply RFs: RF1 +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------PhysicalOlapScan[t4] -- !limit_subquery_union_window -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalWindow ---------PhysicalQuickSort[LOCAL_SORT] -----------hashAgg[GLOBAL] -------------hashAgg[LOCAL] ---------------PhysicalUnion -----------------PhysicalOlapScan[t1] -----------------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------PhysicalWindow +----------PhysicalQuickSort[LOCAL_SORT] +------------PhysicalDistribute[DistributionSpecHash] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalUnion +----------------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------------PhysicalOlapScan[t1] +----------------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------------PhysicalOlapScan[t2] -- !limit_correlated_subquery -- PhysicalResultSink ---hashJoin[LEFT_SEMI_JOIN] hashCondition=((t2.id = t1.id)) otherCondition=() -----PhysicalOlapScan[t1] -----PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_SEMI_JOIN] hashCondition=((t2.id = t1.id)) otherCondition=() +------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t2] -- !limit_correlated_subquery_join -- PhysicalResultSink ---hashJoin[LEFT_SEMI_JOIN] hashCondition=((t3.id = t1.id)) otherCondition=() -----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------PhysicalOlapScan[t1] -------PhysicalOlapScan[t2] -----PhysicalOlapScan[t3] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_SEMI_JOIN] hashCondition=((t3.id = t1.id)) otherCondition=() +------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------PhysicalOlapScan[t1] +--------PhysicalDistribute[DistributionSpecHash] +----------PhysicalOlapScan[t2] +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t3] -- !limit_correlated_subquery_window -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalQuickSort[LOCAL_SORT] -------PhysicalWindow ---------PhysicalQuickSort[LOCAL_SORT] -----------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t2.id = t1.id)) otherCondition=() -------------PhysicalOlapScan[t1] -------------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalQuickSort[LOCAL_SORT] +--------PhysicalWindow +----------PhysicalQuickSort[LOCAL_SORT] +------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t2.id = t1.id)) otherCondition=() +--------------PhysicalOlapScan[t1] +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalOlapScan[t2] -- !limit_cte_query -- PhysicalCteAnchor ( cteId=CTEId#0 ) @@ -474,8 +595,10 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalOlapScan[t1] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalTopN[LOCAL_SORT] ---------PhysicalCteConsumer ( cteId=CTEId#0 ) +------PhysicalDistribute[DistributionSpecGather] +--------PhysicalTopN[LOCAL_SORT] +----------PhysicalDistribute[DistributionSpecExecutionAny] +------------PhysicalCteConsumer ( cteId=CTEId#0 ) -- !limit_cte_outside_query -- PhysicalCteAnchor ( cteId=CTEId#0 ) @@ -484,18 +607,22 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalOlapScan[t1] --PhysicalResultSink ----PhysicalLimit[GLOBAL] -------PhysicalLimit[LOCAL] ---------PhysicalCteConsumer ( cteId=CTEId#0 ) +------PhysicalDistribute[DistributionSpecGather] +--------PhysicalLimit[LOCAL] +----------PhysicalDistribute[DistributionSpecExecutionAny] +------------PhysicalCteConsumer ( cteId=CTEId#0 ) -- !limit_cte_outside_query -- PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalTopN[MERGE_SORT] -------PhysicalTopN[LOCAL_SORT] ---------filter((t1.id < 10)) -----------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecGather] +--------PhysicalTopN[LOCAL_SORT] +----------filter((t1.id < 10)) +------------PhysicalOlapScan[t1] --PhysicalResultSink -----PhysicalCteConsumer ( cteId=CTEId#0 ) +----PhysicalDistribute[DistributionSpecGather] +------PhysicalCteConsumer ( cteId=CTEId#0 ) -- !limit_cte_query_join -- PhysicalCteAnchor ( cteId=CTEId#0 ) @@ -508,10 +635,13 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalOlapScan[t2] ----PhysicalResultSink ------PhysicalTopN[MERGE_SORT] ---------PhysicalTopN[LOCAL_SORT] -----------hashJoin[FULL_OUTER_JOIN] hashCondition=((cte1.id = cte2.id)) otherCondition=() -------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------PhysicalCteConsumer ( cteId=CTEId#1 ) +--------PhysicalDistribute[DistributionSpecGather] +----------PhysicalTopN[LOCAL_SORT] +------------hashJoin[FULL_OUTER_JOIN] hashCondition=((cte1.id = cte2.id)) otherCondition=() +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalCteConsumer ( cteId=CTEId#0 ) +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalCteConsumer ( cteId=CTEId#1 ) -- !limit_cte_query_window -- PhysicalCteAnchor ( cteId=CTEId#0 ) @@ -523,33 +653,39 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalTopN[LOCAL_SORT] --------PhysicalWindow ----------PhysicalQuickSort[MERGE_SORT] -------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------PhysicalDistribute[DistributionSpecGather] +--------------PhysicalQuickSort[LOCAL_SORT] +----------------PhysicalCteConsumer ( cteId=CTEId#0 ) -- !limit_project_filter -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------filter((t1.id > 100)) ---------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------filter((t1.id > 100)) +----------PhysicalOlapScan[t1] -- !limit_join_filter -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------filter((t1.id > 100)) -----------PhysicalOlapScan[t1] apply RFs: RF0 ---------filter((t2.id > 100)) -----------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +----------filter((t1.id > 100)) +------------PhysicalOlapScan[t1] apply RFs: RF0 +----------PhysicalDistribute[DistributionSpecHash] +------------filter((t2.id > 100)) +--------------PhysicalOlapScan[t2] -- !limit_subquery_join -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[t1] apply RFs: RF0 ---------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------PhysicalOlapScan[t1] apply RFs: RF0 +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t2] -- !limit_subquery_window -- PhysicalResultSink @@ -557,21 +693,24 @@ PhysicalResultSink ----PhysicalTopN[LOCAL_SORT] ------PhysicalWindow --------PhysicalQuickSort[MERGE_SORT] -----------PhysicalQuickSort[LOCAL_SORT] -------------PhysicalOlapScan[t1] +----------PhysicalDistribute[DistributionSpecGather] +------------PhysicalQuickSort[LOCAL_SORT] +--------------PhysicalOlapScan[t1] -- !limit_nested_subquery -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------PhysicalOlapScan[t1] -- !limit_subquery_distinct -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[LOCAL] ---------PhysicalOlapScan[t1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[LOCAL] +----------PhysicalOlapScan[t1] -- !limit_cross_join -- PhysicalResultSink @@ -579,43 +718,62 @@ PhysicalResultSink ----PhysicalTopN[LOCAL_SORT] ------NestedLoopJoin[CROSS_JOIN] --------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[t1] ---------PhysicalOlapScan[t2] +----------PhysicalDistribute[DistributionSpecGather] +------------PhysicalTopN[LOCAL_SORT] +--------------PhysicalOlapScan[t1] +--------PhysicalDistribute[DistributionSpecReplicated] +----------PhysicalOlapScan[t2] -- !limit_multiple_left_outer_join -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------------PhysicalTopN[MERGE_SORT] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalTopN[MERGE_SORT] +--------------PhysicalDistribute[DistributionSpecGather] ----------------PhysicalTopN[LOCAL_SORT] -------------------PhysicalOlapScan[t1] ---------------PhysicalOlapScan[t2] ---------PhysicalOlapScan[t3] +------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------PhysicalTopN[MERGE_SORT] +------------------------PhysicalDistribute[DistributionSpecGather] +--------------------------PhysicalTopN[LOCAL_SORT] +----------------------------PhysicalOlapScan[t1] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------PhysicalOlapScan[t2] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t3] -- !limit_multiple_right_outer_join -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() ---------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[t1] apply RFs: RF0 RF1 -----------PhysicalOlapScan[t2] ---------PhysicalOlapScan[t3] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() +----------PhysicalDistribute[DistributionSpecHash] +------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalOlapScan[t1] apply RFs: RF0 RF1 +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalOlapScan[t2] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t3] -- !limit_multiple_full_outerjoin -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() ---------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[t1] -----------PhysicalOlapScan[t2] ---------PhysicalOlapScan[t3] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() +----------PhysicalDistribute[DistributionSpecHash] +------------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalOlapScan[t1] +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalOlapScan[t2] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t3] -- !limit_subquery_cross_join -- PhysicalResultSink @@ -623,52 +781,66 @@ PhysicalResultSink ----PhysicalTopN[LOCAL_SORT] ------NestedLoopJoin[CROSS_JOIN] --------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[t1] ---------PhysicalOlapScan[t2] +----------PhysicalDistribute[DistributionSpecGather] +------------PhysicalTopN[LOCAL_SORT] +--------------PhysicalOlapScan[t1] +--------PhysicalDistribute[DistributionSpecReplicated] +----------PhysicalOlapScan[t2] -- !limit_subquery_multiple_join -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashJoin[INNER_JOIN] hashCondition=((subq.id = t3.id)) otherCondition=() ---------hashJoin[INNER_JOIN] hashCondition=((subq.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[t1] apply RFs: RF0 RF1 -----------PhysicalOlapScan[t2] ---------PhysicalOlapScan[t3] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashJoin[INNER_JOIN] hashCondition=((subq.id = t3.id)) otherCondition=() +----------hashJoin[INNER_JOIN] hashCondition=((subq.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[t1] apply RFs: RF0 RF1 +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalOlapScan[t2] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t3] -- !limit_subquery_multiple_join_nested_subquery -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashJoin[INNER_JOIN] hashCondition=((subq2.id = t3.id)) otherCondition=() ---------hashJoin[INNER_JOIN] hashCondition=((subq2.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[t1] apply RFs: RF0 RF1 -----------PhysicalOlapScan[t2] ---------PhysicalOlapScan[t3] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashJoin[INNER_JOIN] hashCondition=((subq2.id = t3.id)) otherCondition=() +----------hashJoin[INNER_JOIN] hashCondition=((subq2.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[t1] apply RFs: RF0 RF1 +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalOlapScan[t2] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalOlapScan[t3] -- !limit_subquery_multiple_join_nested_subquery_distinct -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[LOCAL] ---------hashJoin[INNER_JOIN] hashCondition=((subq2.id = t3.id)) otherCondition=() -----------hashJoin[INNER_JOIN] hashCondition=((subq2.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[t1] apply RFs: RF0 RF1 -------------PhysicalOlapScan[t2] -----------PhysicalOlapScan[t3] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((subq2.id = t3.id)) otherCondition=() +------------hashJoin[INNER_JOIN] hashCondition=((subq2.id = t2.id)) otherCondition=() +--------------PhysicalOlapScan[t1] apply RFs: RF0 RF1 +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------PhysicalOlapScan[t3] -- !limit_subquery_multiple_join_nested_subquery_distinct_filter -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[LOCAL] ---------hashJoin[INNER_JOIN] hashCondition=((subq2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] -----------hashJoin[INNER_JOIN] hashCondition=((subq2.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -------------filter((t1.id > 100)) ---------------PhysicalOlapScan[t1] apply RFs: RF0 RF1 -------------filter((t2.id > 100)) ---------------PhysicalOlapScan[t2] -----------filter((t3.id > 100)) -------------PhysicalOlapScan[t3] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[LOCAL] +----------hashJoin[INNER_JOIN] hashCondition=((subq2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] +------------hashJoin[INNER_JOIN] hashCondition=((subq2.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +--------------filter((t1.id > 100)) +----------------PhysicalOlapScan[t1] apply RFs: RF0 RF1 +--------------PhysicalDistribute[DistributionSpecHash] +----------------filter((t2.id > 100)) +------------------PhysicalOlapScan[t2] +------------PhysicalDistribute[DistributionSpecHash] +--------------filter((t3.id > 100)) +----------------PhysicalOlapScan[t3] diff --git a/regression-test/data/nereids_rules_p0/predicate_infer/infer_predicate.out b/regression-test/data/nereids_rules_p0/predicate_infer/infer_predicate.out index 7f26b8da9d..daee36163a 100644 --- a/regression-test/data/nereids_rules_p0/predicate_infer/infer_predicate.out +++ b/regression-test/data/nereids_rules_p0/predicate_infer/infer_predicate.out @@ -1,334 +1,394 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !infer_predicate_basic_join -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----filter((t1.score > 10)) +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------filter((t1.score > 10)) +--------PhysicalOlapScan[t] ------PhysicalOlapScan[t] -----PhysicalOlapScan[t] -- !infer_predicate_join_with_filter -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -----filter((t1.score > 10)) -------PhysicalOlapScan[t] apply RFs: RF0 -----filter((t2.name = 'Alice')) -------PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------filter((t1.score > 10)) +--------PhysicalOlapScan[t] apply RFs: RF0 +------filter((t2.name = 'Alice')) +--------PhysicalOlapScan[t] -- !infer_predicate_left_join -- PhysicalResultSink ---hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----filter((t1.score > 20)) +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------filter((t1.score > 20)) +--------PhysicalOlapScan[t] ------PhysicalOlapScan[t] -----PhysicalOlapScan[t] -- !infer_predicate_right_join -- PhysicalResultSink ---hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -----PhysicalOlapScan[t] apply RFs: RF0 -----filter((t2.score > 20)) -------PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------PhysicalOlapScan[t] apply RFs: RF0 +------filter((t2.score > 20)) +--------PhysicalOlapScan[t] -- !infer_predicate_full_outer_join -- PhysicalResultSink ---filter(((t1.name = 'Test') OR (t2.name = 'Test'))) -----hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------PhysicalOlapScan[t] -------PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----filter(((t1.name = 'Test') OR (t2.name = 'Test'))) +------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------PhysicalOlapScan[t] +--------PhysicalOlapScan[t] -- !infer_predicate_left_semi_join -- PhysicalResultSink ---hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----filter((t1.score > 20)) +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------filter((t1.score > 20)) +--------PhysicalOlapScan[t] ------PhysicalOlapScan[t] -----PhysicalOlapScan[t] -- !infer_predicate_left_anti_join -- PhysicalResultSink ---hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----filter((t1.score > 20)) +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------filter((t1.score > 20)) +--------PhysicalOlapScan[t] ------PhysicalOlapScan[t] -----PhysicalOlapScan[t] -- !infer_predicate_from_subquery -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -----filter((t1.id = 1)) -------PhysicalOlapScan[t] apply RFs: RF0 -----filter((t2.id = 1)) -------PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------filter((t1.id = 1)) +--------PhysicalOlapScan[t] apply RFs: RF0 +------filter((t2.id = 1)) +--------PhysicalOlapScan[t] -- !infer_predicate_multi_level_join -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] -----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -------PhysicalOlapScan[t] apply RFs: RF0 -------PhysicalOlapScan[t] apply RFs: RF1 -----filter((t3.name = 'Test')) -------PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] +------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +--------PhysicalOlapScan[t] apply RFs: RF0 +--------PhysicalOlapScan[t] apply RFs: RF1 +------filter((t3.name = 'Test')) +--------PhysicalOlapScan[t] -- !infer_predicate_join_with_project_limit -- PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ----PhysicalLimit[GLOBAL] -------PhysicalLimit[LOCAL] ---------PhysicalOlapScan[t] apply RFs: RF0 -----filter((t2.score > 20)) -------PhysicalOlapScan[t] +------PhysicalDistribute[DistributionSpecGather] +--------PhysicalLimit[LOCAL] +----------PhysicalOlapScan[t] apply RFs: RF0 +----PhysicalDistribute[DistributionSpecReplicated] +------filter((t2.score > 20)) +--------PhysicalOlapScan[t] -- !infer_predicate_with_union -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t.id = t3.id)) otherCondition=() -----hashAgg[GLOBAL] -------hashAgg[LOCAL] ---------PhysicalUnion -----------filter((t1.id = 1)) -------------PhysicalOlapScan[t] -----------PhysicalOlapScan[t] -----PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t.id = t3.id)) otherCondition=() +------hashAgg[GLOBAL] +--------PhysicalDistribute[DistributionSpecHash] +----------hashAgg[LOCAL] +------------PhysicalUnion +--------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------filter((t1.id = 1)) +------------------PhysicalOlapScan[t] +--------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------PhysicalOlapScan[t] +------PhysicalDistribute[DistributionSpecReplicated] +--------PhysicalOlapScan[t] -- !infer_predicate_with_except -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t.id = t3.id)) otherCondition=() -----PhysicalExcept -------PhysicalOlapScan[t] -------PhysicalOlapScan[t] -----PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t.id = t3.id)) otherCondition=() +------PhysicalExcept +--------PhysicalDistribute[DistributionSpecHash] +----------PhysicalOlapScan[t] +--------PhysicalDistribute[DistributionSpecHash] +----------PhysicalOlapScan[t] +------PhysicalDistribute[DistributionSpecReplicated] +--------PhysicalOlapScan[t] -- !infer_predicate_with_subquery -- PhysicalResultSink ---hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t.id)) otherCondition=() build RFs:RF0 id->[id] -----PhysicalOlapScan[t] apply RFs: RF0 -----filter((t.score > 60)) -------PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t.id)) otherCondition=() build RFs:RF0 id->[id] +------PhysicalOlapScan[t] apply RFs: RF0 +------filter((t.score > 60)) +--------PhysicalOlapScan[t] -- !infer_predicate_complex_condition -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.score > t2.score)) -----filter((t1.name = 'Test')) +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.score > t2.score)) +------filter((t1.name = 'Test')) +--------PhysicalOlapScan[t] ------PhysicalOlapScan[t] -----PhysicalOlapScan[t] -- !infer_predicate_with_window_function -- PhysicalResultSink ---PhysicalWindow -----PhysicalQuickSort[LOCAL_SORT] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ---------PhysicalOlapScan[t] apply RFs: RF0 ---------filter((t2.name = 'Charlie')) -----------PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----PhysicalWindow +------PhysicalQuickSort[LOCAL_SORT] +--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +----------PhysicalOlapScan[t] apply RFs: RF0 +----------filter((t2.name = 'Charlie')) +------------PhysicalOlapScan[t] -- !infer_predicate_with_aggregate -- PhysicalResultSink ---hashAgg[LOCAL] -----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -------filter((t1.id > 70)) ---------PhysicalOlapScan[t] apply RFs: RF0 -------filter((t2.id > 70)) ---------PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +--------filter((t1.id > 70)) +----------PhysicalOlapScan[t] apply RFs: RF0 +--------filter((t2.id > 70)) +----------PhysicalOlapScan[t] -- !infer_predicate_complex_and_or_logic -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=(((t1.score > 80) OR ((t2.name = 'Dave') AND (t1.id < 50)))) -----filter(((t1.score > 80) OR (t1.id < 50))) +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=(((t1.score > 80) OR ((t2.name = 'Dave') AND (t1.id < 50)))) +------filter(((t1.score > 80) OR (t1.id < 50))) +--------PhysicalOlapScan[t] ------PhysicalOlapScan[t] -----PhysicalOlapScan[t] -- !infer_predicate_multiple_join_filter -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() build RFs:RF0 id->[id];RF1 name->[name] -----filter((t1.score > 90)) -------PhysicalOlapScan[t] apply RFs: RF0 RF1 -----filter((t2.score < 60)) -------PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() build RFs:RF0 id->[id];RF1 name->[name] +------filter((t1.score > 90)) +--------PhysicalOlapScan[t] apply RFs: RF0 RF1 +------filter((t2.score < 60)) +--------PhysicalOlapScan[t] -- !infer_predicate_join_with_not_exists -- PhysicalResultSink ---hashJoin[LEFT_ANTI_JOIN] hashCondition=((t2.id = t1.id)) otherCondition=() -----PhysicalOlapScan[t] -----filter((t2.score > 100)) +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_ANTI_JOIN] hashCondition=((t2.id = t1.id)) otherCondition=() ------PhysicalOlapScan[t] +------filter((t2.score > 100)) +--------PhysicalOlapScan[t] -- !infer_predicate_complex_subquery -- PhysicalResultSink ---hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -----PhysicalOlapScan[t] apply RFs: RF0 -----filter((t2.name = 'Frank') and (t2.score > 110)) -------PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------PhysicalOlapScan[t] apply RFs: RF0 +------filter((t2.name = 'Frank') and (t2.score > 110)) +--------PhysicalOlapScan[t] -- !infer_predicate_join_with_function_processed -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((expr_length(name) = expr_length(name))) otherCondition=() -----filter((t1.score > 120)) -------PhysicalOlapScan[t] -----PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((expr_length(name) = expr_length(name))) otherCondition=() +------filter((t1.score > 120)) +--------PhysicalOlapScan[t] +------PhysicalDistribute[DistributionSpecReplicated] +--------PhysicalOlapScan[t] -- !infer_predicate_nested_subqueries -- PhysicalResultSink ---filter((t.score > 130) and (t1.id < 70) and (t2.name = 'George')) -----PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----filter((t.score > 130) and (t1.id < 70) and (t2.name = 'George')) +------PhysicalOlapScan[t] -- !infer_predicate_join_with_aggregate_having -- PhysicalResultSink ---filter((sum(score) > 140)) -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[t] ---------PhysicalOlapScan[t] - --- !infer_predicate_mixed_join_types -- -PhysicalResultSink ---hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF0 id->[id] -----hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------PhysicalOlapScan[t] apply RFs: RF0 -------PhysicalOlapScan[t] -----filter((t3.score > 150)) -------PhysicalOlapScan[t] - --- !infer_predicate_join_with_distinct -- -PhysicalResultSink ---hashAgg[LOCAL] -----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------filter((t1.score > 160)) ---------PhysicalOlapScan[t] -------PhysicalOlapScan[t] - --- !infer_predicate_join_with_case_when -- -PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----filter((if((score > 170), 'high', 'low') = 'high')) -------PhysicalOlapScan[t] -----PhysicalOlapScan[t] - --- !infer_predicate_self_join -- -PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----filter((t1.score > 10)) -------PhysicalOlapScan[t] -----PhysicalOlapScan[t] - --- !infer_predicate_complex_multitable_join -- -PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] -----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------filter((t1.score > 20)) ---------PhysicalOlapScan[t] apply RFs: RF1 -------PhysicalOlapScan[t] -----filter((t3.name = 'Helen')) -------PhysicalOlapScan[t] - --- !infer_predicate_aggregate_subquery -- -PhysicalResultSink ---filter((t_agg.total > 30)) -----hashAgg[LOCAL] -------PhysicalOlapScan[t] - --- !infer_predicate_join_with_function -- -PhysicalResultSink ---NestedLoopJoin[INNER_JOIN](abs((score - score)) < 40) -----PhysicalOlapScan[t] -----PhysicalOlapScan[t] - --- !infer_predicate_subquery_filter -- -PhysicalResultSink ---hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t.id)) otherCondition=() build RFs:RF0 id->[id] -----PhysicalOlapScan[t] apply RFs: RF0 -----filter((t.score > 50)) -------PhysicalOlapScan[t] - --- !infer_predicate_with_not_operator -- -PhysicalResultSink ---filter((t1.score <= 60)) -----PhysicalOlapScan[t] - --- !infer_predicate_complex_nested_subquery -- -PhysicalResultSink ---hashJoin[LEFT_SEMI_JOIN] hashCondition=((t.score = t.score)) otherCondition=() build RFs:RF0 score->[score] -----filter((t.score > 80) and (t1.id > 10)) -------PhysicalOlapScan[t] apply RFs: RF0 -----filter((t.score > 80)) -------PhysicalOlapScan[t] - --- !infer_predicate_multi_join_subquery_aggregate -- -PhysicalResultSink ---hashAgg[LOCAL] -----hashJoin[LEFT_SEMI_JOIN] hashCondition=((t2.id = t.id)) otherCondition=() build RFs:RF2 id->[id] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -----------PhysicalOlapScan[t] apply RFs: RF0 -----------PhysicalOlapScan[t] apply RFs: RF2 ---------PhysicalOlapScan[t] -------filter((t.score > 100)) ---------PhysicalOlapScan[t] - --- !infer_predicate_multi_join_complex_condition_not_exists -- -PhysicalResultSink ---hashJoin[LEFT_ANTI_JOIN] hashCondition=((t4.id = t3.id)) otherCondition=() -----hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------filter((t1.score > 110)) -----------PhysicalOlapScan[t] ---------PhysicalOlapScan[t] -------PhysicalOlapScan[t] -----PhysicalOlapScan[t] - --- !infer_predicate_multi_join_complex_subquery -- -PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] -----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------PhysicalOlapScan[t] apply RFs: RF1 -------PhysicalOlapScan[t] -----filter((t.score > 130)) -------PhysicalOlapScan[t] - --- !infer_predicate_multi_join_with_having_clause -- -PhysicalResultSink ---filter((sum(score) > 150)) -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() +--PhysicalDistribute[DistributionSpecGather] +----filter((sum(score) > 140)) +------hashAgg[LOCAL] --------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ----------PhysicalOlapScan[t] ----------PhysicalOlapScan[t] + +-- !infer_predicate_mixed_join_types -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF0 id->[id] +------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------PhysicalOlapScan[t] apply RFs: RF0 --------PhysicalOlapScan[t] +------filter((t3.score > 150)) +--------PhysicalOlapScan[t] + +-- !infer_predicate_join_with_distinct -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------filter((t1.score > 160)) +----------PhysicalOlapScan[t] +--------PhysicalOlapScan[t] + +-- !infer_predicate_join_with_case_when -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------filter((if((score > 170), 'high', 'low') = 'high')) +--------PhysicalOlapScan[t] +------PhysicalOlapScan[t] + +-- !infer_predicate_self_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------filter((t1.score > 10)) +--------PhysicalOlapScan[t] +------PhysicalOlapScan[t] + +-- !infer_predicate_complex_multitable_join -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] +------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------filter((t1.score > 20)) +----------PhysicalOlapScan[t] apply RFs: RF1 +--------PhysicalOlapScan[t] +------filter((t3.name = 'Helen')) +--------PhysicalOlapScan[t] + +-- !infer_predicate_aggregate_subquery -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----filter((t_agg.total > 30)) +------hashAgg[LOCAL] +--------PhysicalOlapScan[t] + +-- !infer_predicate_join_with_function -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----NestedLoopJoin[INNER_JOIN](abs((score - score)) < 40) +------PhysicalOlapScan[t] +------PhysicalDistribute[DistributionSpecReplicated] +--------PhysicalOlapScan[t] + +-- !infer_predicate_subquery_filter -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t.id)) otherCondition=() build RFs:RF0 id->[id] +------PhysicalOlapScan[t] apply RFs: RF0 +------filter((t.score > 50)) +--------PhysicalOlapScan[t] + +-- !infer_predicate_with_not_operator -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----filter((t1.score <= 60)) +------PhysicalOlapScan[t] + +-- !infer_predicate_complex_nested_subquery -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_SEMI_JOIN] hashCondition=((t.score = t.score)) otherCondition=() build RFs:RF0 score->[score] +------filter((t.score > 80) and (t1.id > 10)) +--------PhysicalOlapScan[t] apply RFs: RF0 +------PhysicalDistribute[DistributionSpecReplicated] +--------filter((t.score > 80)) +----------PhysicalOlapScan[t] + +-- !infer_predicate_multi_join_subquery_aggregate -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[LOCAL] +------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t2.id = t.id)) otherCondition=() build RFs:RF2 id->[id] +--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------------PhysicalOlapScan[t] apply RFs: RF0 +------------PhysicalOlapScan[t] apply RFs: RF2 +----------PhysicalOlapScan[t] +--------filter((t.score > 100)) +----------PhysicalOlapScan[t] + +-- !infer_predicate_multi_join_complex_condition_not_exists -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_ANTI_JOIN] hashCondition=((t4.id = t3.id)) otherCondition=() +------hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() +--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +----------filter((t1.score > 110)) +------------PhysicalOlapScan[t] +----------PhysicalOlapScan[t] +--------PhysicalOlapScan[t] +------PhysicalOlapScan[t] + +-- !infer_predicate_multi_join_complex_subquery -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] +------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------PhysicalOlapScan[t] apply RFs: RF1 +--------PhysicalOlapScan[t] +------filter((t.score > 130)) +--------PhysicalOlapScan[t] + +-- !infer_predicate_multi_join_with_having_clause -- +PhysicalResultSink +--PhysicalDistribute[DistributionSpecGather] +----filter((sum(score) > 150)) +------hashAgg[LOCAL] +--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() +----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +------------PhysicalOlapScan[t] +------------PhysicalOlapScan[t] +----------PhysicalOlapScan[t] -- !infer0 -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -----filter((t1.id = 1)) -------PhysicalOlapScan[t1] apply RFs: RF0 -----filter((t2.id = 1)) -------PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------filter((t1.id = 1)) +--------PhysicalOlapScan[t1] apply RFs: RF0 +------PhysicalDistribute[DistributionSpecHash] +--------filter((t2.id = 1)) +----------PhysicalOlapScan[t2] -- !infer1 -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] -----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -------filter((t1.id = 1)) ---------PhysicalOlapScan[t1] apply RFs: RF0 RF1 -------filter((t2.id = 1)) ---------PhysicalOlapScan[t2] -----filter((t3.id = 1)) -------PhysicalOlapScan[t] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF1 id->[id] +------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +--------filter((t1.id = 1)) +----------PhysicalOlapScan[t1] apply RFs: RF0 RF1 +--------PhysicalDistribute[DistributionSpecHash] +----------filter((t2.id = 1)) +------------PhysicalOlapScan[t2] +------PhysicalDistribute[DistributionSpecHash] +--------filter((t3.id = 1)) +----------PhysicalOlapScan[t] -- !infer2 -- PhysicalResultSink ---hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.id = 1)) -----PhysicalOlapScan[t1] -----filter((t2.id = 1)) -------PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.id = 1)) +------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecHash] +--------filter((t2.id = 1)) +----------PhysicalOlapScan[t2] -- !infer3 -- PhysicalResultSink ---hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.id = 1)) -----PhysicalOlapScan[t1] -----PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.id = 1)) +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecHash] +--------PhysicalOlapScan[t2] -- !infer4 -- PhysicalResultSink ---hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -----filter((t1.id = 1)) -------PhysicalOlapScan[t1] apply RFs: RF0 -----filter((t2.id = 1)) -------PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------filter((t1.id = 1)) +--------PhysicalOlapScan[t1] apply RFs: RF0 +------PhysicalDistribute[DistributionSpecHash] +--------filter((t2.id = 1)) +----------PhysicalOlapScan[t2] -- !infer5 -- PhysicalResultSink @@ -336,62 +396,79 @@ PhysicalResultSink ----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] ------filter((t1.id = 1)) --------PhysicalLimit[GLOBAL] -----------PhysicalLimit[LOCAL] -------------PhysicalOlapScan[t1] apply RFs: RF0 RF1 -------filter((t2.id = 1)) ---------PhysicalOlapScan[t2] -----filter((t3.id = 1)) -------PhysicalOlapScan[t] +----------PhysicalDistribute[DistributionSpecGather] +------------PhysicalLimit[LOCAL] +--------------PhysicalOlapScan[t1] apply RFs: RF0 RF1 +------PhysicalDistribute[DistributionSpecReplicated] +--------filter((t2.id = 1)) +----------PhysicalOlapScan[t2] +----PhysicalDistribute[DistributionSpecReplicated] +------filter((t3.id = 1)) +--------PhysicalOlapScan[t] -- !infer6 -- PhysicalResultSink ---hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=((t1.id = 1)) -----PhysicalOlapScan[t1] -----filter((t2.id = 1) and (t2.name = 'bob')) -------PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=((t1.id = 1)) +------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecHash] +--------filter((t2.id = 1) and (t2.name = 'bob')) +----------PhysicalOlapScan[t2] -- !infer7 -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t12.id = t34.id)) otherCondition=() build RFs:RF2 id->[id] -----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF1 id->[id] -------filter((t1.id < 9) and (t1.id > 1)) ---------PhysicalOlapScan[t1] apply RFs: RF1 RF2 -------filter((t2.id < 9) and (t2.id > 1)) ---------PhysicalOlapScan[t2] -----hashJoin[INNER_JOIN] hashCondition=((t3.id = t4.id)) otherCondition=() build RFs:RF0 id->[id] -------filter(( not (id = 3)) and (t34.id < 9) and (t34.id > 1)) ---------PhysicalOlapScan[t3] apply RFs: RF0 -------filter(( not (id = 4)) and (t4.id < 9) and (t4.id > 1)) ---------PhysicalOlapScan[t4] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t12.id = t34.id)) otherCondition=() build RFs:RF2 id->[id] +------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF1 id->[id] +--------filter((t1.id < 9) and (t1.id > 1)) +----------PhysicalOlapScan[t1] apply RFs: RF1 RF2 +--------PhysicalDistribute[DistributionSpecHash] +----------filter((t2.id < 9) and (t2.id > 1)) +------------PhysicalOlapScan[t2] +------PhysicalDistribute[DistributionSpecHash] +--------hashJoin[INNER_JOIN] hashCondition=((t3.id = t4.id)) otherCondition=() build RFs:RF0 id->[id] +----------filter(( not (id = 3)) and (t34.id < 9) and (t34.id > 1)) +------------PhysicalOlapScan[t3] apply RFs: RF0 +----------PhysicalDistribute[DistributionSpecHash] +------------filter(( not (id = 4)) and (t4.id < 9) and (t4.id > 1)) +--------------PhysicalOlapScan[t4] -- !infer8 -- PhysicalResultSink ---NestedLoopJoin[INNER_JOIN]( not (id = id)) -----filter((t1.id = 1)) -------PhysicalOlapScan[t1] -----PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----NestedLoopJoin[INNER_JOIN]( not (id = id)) +------filter((t1.id = 1)) +--------PhysicalOlapScan[t1] +------PhysicalDistribute[DistributionSpecReplicated] +--------PhysicalOlapScan[t2] -- !infer9 -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] -----filter((cast(id as BIGINT) = 2147483648)) -------PhysicalOlapScan[t1] apply RFs: RF0 -----filter((cast(id as BIGINT) = 2147483648)) -------PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id] +------filter((cast(id as BIGINT) = 2147483648)) +--------PhysicalOlapScan[t1] apply RFs: RF0 +------PhysicalDistribute[DistributionSpecHash] +--------filter((cast(id as BIGINT) = 2147483648)) +----------PhysicalOlapScan[t2] -- !infer10 -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((expr_cast(id as SMALLINT) = expr_cast(id as SMALLINT))) otherCondition=() build RFs:RF0 expr_cast(id as SMALLINT)->[id] -----filter((cast(id as BIGINT) = 2147483648)) -------PhysicalOlapScan[t1] apply RFs: RF0 -----filter((cast(id as BIGINT) = 2147483648)) -------PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((expr_cast(id as SMALLINT) = expr_cast(id as SMALLINT))) otherCondition=() build RFs:RF0 expr_cast(id as SMALLINT)->[id] +------filter((cast(id as BIGINT) = 2147483648)) +--------PhysicalOlapScan[t1] apply RFs: RF0 +------PhysicalDistribute[DistributionSpecReplicated] +--------filter((cast(id as BIGINT) = 2147483648)) +----------PhysicalOlapScan[t2] -- !infer11 -- PhysicalResultSink ---hashJoin[INNER_JOIN] hashCondition=((expr_cast(id as LARGEINT) = expr_cast(id as LARGEINT))) otherCondition=() build RFs:RF0 expr_cast(id as LARGEINT)->[id] -----filter((cast(id as BIGINT) = 2147483648)) -------PhysicalOlapScan[t1] apply RFs: RF0 -----filter((cast(id as BIGINT) = 2147483648)) -------PhysicalOlapScan[t2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[INNER_JOIN] hashCondition=((expr_cast(id as LARGEINT) = expr_cast(id as LARGEINT))) otherCondition=() build RFs:RF0 expr_cast(id as LARGEINT)->[id] +------filter((cast(id as BIGINT) = 2147483648)) +--------PhysicalOlapScan[t1] apply RFs: RF0 +------PhysicalDistribute[DistributionSpecReplicated] +--------filter((cast(id as BIGINT) = 2147483648)) +----------PhysicalOlapScan[t2] diff --git a/regression-test/data/nereids_rules_p0/push_down_limit_distinct/push_down_limit_distinct.out b/regression-test/data/nereids_rules_p0/push_down_limit_distinct/push_down_limit_distinct.out index 9ffe952038..e58bfeeb94 100644 --- a/regression-test/data/nereids_rules_p0/push_down_limit_distinct/push_down_limit_distinct.out +++ b/regression-test/data/nereids_rules_p0/push_down_limit_distinct/push_down_limit_distinct.out @@ -2,14 +2,18 @@ -- !basic -- PhysicalResultSink --PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------PhysicalUnion -------------PhysicalLimit[LOCAL] ---------------hashAgg[LOCAL] -----------------PhysicalOlapScan[t] -------------PhysicalLimit[LOCAL] ---------------hashAgg[LOCAL] -----------------PhysicalOlapScan[t] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalLimit[LOCAL] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------PhysicalUnion +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalLimit[LOCAL] +--------------------hashAgg[LOCAL] +----------------------PhysicalOlapScan[t] +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalLimit[LOCAL] +--------------------hashAgg[LOCAL] +----------------------PhysicalOlapScan[t] diff --git a/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_distinct_through_union.out b/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_distinct_through_union.out index 58dfe43639..d15bd9ed52 100644 --- a/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_distinct_through_union.out +++ b/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_distinct_through_union.out @@ -2,106 +2,148 @@ -- !push_down_topn_through_union -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------PhysicalUnion -------------PhysicalOlapScan[table2] -------------PhysicalOlapScan[table2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------PhysicalUnion +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalOlapScan[table2] +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalOlapScan[table2] -- !push_down_topn_union_with_conditions -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------PhysicalUnion -------------filter((t1.score > 10)) ---------------PhysicalOlapScan[table2] -------------filter((t2.name = 'Test')) ---------------PhysicalOlapScan[table2] -------------filter((t3.id < 5)) ---------------PhysicalOlapScan[table2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------PhysicalUnion +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------filter((t1.score > 10)) +--------------------PhysicalOlapScan[table2] +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------filter((t2.name = 'Test')) +--------------------PhysicalOlapScan[table2] +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------filter((t3.id < 5)) +--------------------PhysicalOlapScan[table2] -- !push_down_topn_union_with_order_by -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------PhysicalUnion -------------PhysicalOlapScan[table2] -------------PhysicalOlapScan[table2] -------------PhysicalOlapScan[table2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------PhysicalUnion +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalOlapScan[table2] +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalOlapScan[table2] +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalOlapScan[table2] -- !push_down_topn_nested_union -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------PhysicalUnion -------------PhysicalOlapScan[table2] -------------PhysicalOlapScan[table2] -------------PhysicalOlapScan[table2] -------------PhysicalOlapScan[table2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------PhysicalUnion +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalOlapScan[table2] +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalOlapScan[table2] +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalOlapScan[table2] +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalOlapScan[table2] -- !push_down_topn_union_after_join -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------PhysicalUnion -------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------------PhysicalOlapScan[table2] ---------------PhysicalOlapScan[table2] -------------PhysicalOlapScan[table2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------PhysicalUnion +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------------------PhysicalOlapScan[table2] +--------------------PhysicalOlapScan[table2] +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalOlapScan[table2] -- !push_down_topn_union_different_projections -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------PhysicalUnion -------------PhysicalOlapScan[table2] -------------PhysicalOlapScan[table2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------PhysicalUnion +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalOlapScan[table2] +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalOlapScan[table2] -- !push_down_topn_union_with_subquery -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------PhysicalUnion -------------filter((table2.score > 20)) ---------------PhysicalOlapScan[table2] -------------PhysicalOlapScan[table2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------PhysicalUnion +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------filter((table2.score > 20)) +--------------------PhysicalOlapScan[table2] +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalOlapScan[table2] -- !push_down_topn_union_with_limit -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------PhysicalUnion -------------PhysicalLimit[GLOBAL] ---------------PhysicalLimit[LOCAL] -----------------PhysicalOlapScan[table2] -------------PhysicalLimit[GLOBAL] ---------------PhysicalLimit[LOCAL] -----------------PhysicalOlapScan[table2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------PhysicalUnion +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalLimit[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecGather] +----------------------PhysicalLimit[LOCAL] +------------------------PhysicalOlapScan[table2] +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------PhysicalLimit[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecGather] +----------------------PhysicalLimit[LOCAL] +------------------------PhysicalOlapScan[table2] -- !push_down_topn_union_complex_conditions -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------PhysicalUnion -------------filter((t1.name = 'Test') and (t1.score > 10)) ---------------PhysicalOlapScan[table2] -------------filter((t2.id < 5) and (t2.score < 20)) ---------------PhysicalOlapScan[table2] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------PhysicalUnion +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------filter((t1.name = 'Test') and (t1.score > 10)) +--------------------PhysicalOlapScan[table2] +----------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------filter((t2.id < 5) and (t2.score < 20)) +--------------------PhysicalOlapScan[table2] diff --git a/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_through_union.out b/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_through_union.out index 72db4b9b31..5c0c8ba5ba 100644 --- a/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_through_union.out +++ b/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_through_union.out @@ -2,132 +2,185 @@ -- !push_down_topn_through_union -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalUnion ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[table1] ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[table1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------PhysicalUnion +----------PhysicalDistribute[DistributionSpecExecutionAny] +------------PhysicalTopN[MERGE_SORT] +--------------PhysicalDistribute[DistributionSpecGather] +----------------PhysicalTopN[LOCAL_SORT] +------------------PhysicalOlapScan[table1] +----------PhysicalDistribute[DistributionSpecExecutionAny] +------------PhysicalTopN[MERGE_SORT] +--------------PhysicalDistribute[DistributionSpecGather] +----------------PhysicalTopN[LOCAL_SORT] +------------------PhysicalOlapScan[table1] -- !push_down_topn_union_with_conditions -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalUnion ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------filter((t1.score > 10)) ---------------PhysicalOlapScan[table1] ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------filter((t2.name = 'Test')) ---------------PhysicalOlapScan[table1] ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------filter((t3.id < 5)) ---------------PhysicalOlapScan[table1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------PhysicalUnion +----------PhysicalDistribute[DistributionSpecExecutionAny] +------------PhysicalTopN[MERGE_SORT] +--------------PhysicalDistribute[DistributionSpecGather] +----------------PhysicalTopN[LOCAL_SORT] +------------------filter((t1.score > 10)) +--------------------PhysicalOlapScan[table1] +----------PhysicalDistribute[DistributionSpecExecutionAny] +------------PhysicalTopN[MERGE_SORT] +--------------PhysicalDistribute[DistributionSpecGather] +----------------PhysicalTopN[LOCAL_SORT] +------------------filter((t2.name = 'Test')) +--------------------PhysicalOlapScan[table1] +----------PhysicalDistribute[DistributionSpecExecutionAny] +------------PhysicalTopN[MERGE_SORT] +--------------PhysicalDistribute[DistributionSpecGather] +----------------PhysicalTopN[LOCAL_SORT] +------------------filter((t3.id < 5)) +--------------------PhysicalOlapScan[table1] -- !push_down_topn_union_with_order_by -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalUnion ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[table1] ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[table1] ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[table1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------PhysicalUnion +----------PhysicalDistribute[DistributionSpecExecutionAny] +------------PhysicalTopN[MERGE_SORT] +--------------PhysicalDistribute[DistributionSpecGather] +----------------PhysicalTopN[LOCAL_SORT] +------------------PhysicalOlapScan[table1] +----------PhysicalDistribute[DistributionSpecExecutionAny] +------------PhysicalTopN[MERGE_SORT] +--------------PhysicalDistribute[DistributionSpecGather] +----------------PhysicalTopN[LOCAL_SORT] +------------------PhysicalOlapScan[table1] +----------PhysicalDistribute[DistributionSpecExecutionAny] +------------PhysicalTopN[MERGE_SORT] +--------------PhysicalDistribute[DistributionSpecGather] +----------------PhysicalTopN[LOCAL_SORT] +------------------PhysicalOlapScan[table1] -- !push_down_topn_nested_union -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalUnion ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[table1] ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[table1] ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[table1] ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[table1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------PhysicalUnion +----------PhysicalDistribute[DistributionSpecExecutionAny] +------------PhysicalTopN[MERGE_SORT] +--------------PhysicalDistribute[DistributionSpecGather] +----------------PhysicalTopN[LOCAL_SORT] +------------------PhysicalOlapScan[table1] +----------PhysicalDistribute[DistributionSpecExecutionAny] +------------PhysicalTopN[MERGE_SORT] +--------------PhysicalDistribute[DistributionSpecGather] +----------------PhysicalTopN[LOCAL_SORT] +------------------PhysicalOlapScan[table1] +----------PhysicalDistribute[DistributionSpecExecutionAny] +------------PhysicalTopN[MERGE_SORT] +--------------PhysicalDistribute[DistributionSpecGather] +----------------PhysicalTopN[LOCAL_SORT] +------------------PhysicalOlapScan[table1] +----------PhysicalDistribute[DistributionSpecExecutionAny] +------------PhysicalTopN[MERGE_SORT] +--------------PhysicalDistribute[DistributionSpecGather] +----------------PhysicalTopN[LOCAL_SORT] +------------------PhysicalOlapScan[table1] -- !push_down_topn_union_after_join -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalUnion ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------------PhysicalOlapScan[table1] apply RFs: RF0 ---------------PhysicalOlapScan[table1] ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[table1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------PhysicalUnion +----------PhysicalDistribute[DistributionSpecExecutionAny] +------------PhysicalTopN[MERGE_SORT] +--------------PhysicalDistribute[DistributionSpecGather] +----------------PhysicalTopN[LOCAL_SORT] +------------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() +--------------------PhysicalOlapScan[table1] apply RFs: RF0 +--------------------PhysicalOlapScan[table1] +----------PhysicalDistribute[DistributionSpecExecutionAny] +------------PhysicalTopN[MERGE_SORT] +--------------PhysicalDistribute[DistributionSpecGather] +----------------PhysicalTopN[LOCAL_SORT] +------------------PhysicalOlapScan[table1] -- !push_down_topn_union_different_projections -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalUnion ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[table1] ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[table1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------PhysicalUnion +----------PhysicalDistribute[DistributionSpecExecutionAny] +------------PhysicalTopN[MERGE_SORT] +--------------PhysicalDistribute[DistributionSpecGather] +----------------PhysicalTopN[LOCAL_SORT] +------------------PhysicalOlapScan[table1] +----------PhysicalDistribute[DistributionSpecExecutionAny] +------------PhysicalTopN[MERGE_SORT] +--------------PhysicalDistribute[DistributionSpecGather] +----------------PhysicalTopN[LOCAL_SORT] +------------------PhysicalOlapScan[table1] -- !push_down_topn_union_with_subquery -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalUnion ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------filter((table1.score > 20)) ---------------PhysicalOlapScan[table1] ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[table1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------PhysicalUnion +----------PhysicalDistribute[DistributionSpecExecutionAny] +------------PhysicalTopN[MERGE_SORT] +--------------PhysicalDistribute[DistributionSpecGather] +----------------PhysicalTopN[LOCAL_SORT] +------------------filter((table1.score > 20)) +--------------------PhysicalOlapScan[table1] +----------PhysicalDistribute[DistributionSpecExecutionAny] +------------PhysicalTopN[MERGE_SORT] +--------------PhysicalDistribute[DistributionSpecGather] +----------------PhysicalTopN[LOCAL_SORT] +------------------PhysicalOlapScan[table1] -- !push_down_topn_union_with_limit -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalUnion ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalLimit[GLOBAL] ---------------PhysicalLimit[LOCAL] -----------------PhysicalOlapScan[table1] ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalLimit[GLOBAL] ---------------PhysicalLimit[LOCAL] -----------------PhysicalOlapScan[table1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------PhysicalUnion +----------PhysicalDistribute[DistributionSpecExecutionAny] +------------PhysicalTopN[MERGE_SORT] +--------------PhysicalTopN[LOCAL_SORT] +----------------PhysicalLimit[GLOBAL] +------------------PhysicalDistribute[DistributionSpecGather] +--------------------PhysicalLimit[LOCAL] +----------------------PhysicalOlapScan[table1] +----------PhysicalDistribute[DistributionSpecExecutionAny] +------------PhysicalTopN[MERGE_SORT] +--------------PhysicalTopN[LOCAL_SORT] +----------------PhysicalLimit[GLOBAL] +------------------PhysicalDistribute[DistributionSpecGather] +--------------------PhysicalLimit[LOCAL] +----------------------PhysicalOlapScan[table1] -- !push_down_topn_union_complex_conditions -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalUnion ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------filter((t1.name = 'Test') and (t1.score > 10)) ---------------PhysicalOlapScan[table1] ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------filter((t2.id < 5) and (t2.score < 20)) ---------------PhysicalOlapScan[table1] +----PhysicalDistribute[DistributionSpecGather] +------PhysicalTopN[LOCAL_SORT] +--------PhysicalUnion +----------PhysicalDistribute[DistributionSpecExecutionAny] +------------PhysicalTopN[MERGE_SORT] +--------------PhysicalDistribute[DistributionSpecGather] +----------------PhysicalTopN[LOCAL_SORT] +------------------filter((t1.name = 'Test') and (t1.score > 10)) +--------------------PhysicalOlapScan[table1] +----------PhysicalDistribute[DistributionSpecExecutionAny] +------------PhysicalTopN[MERGE_SORT] +--------------PhysicalDistribute[DistributionSpecGather] +----------------PhysicalTopN[LOCAL_SORT] +------------------filter((t2.id < 5) and (t2.score < 20)) +--------------------PhysicalOlapScan[table1] diff --git a/regression-test/data/nereids_rules_p0/transposeJoin/transposeSemiJoinAgg.out b/regression-test/data/nereids_rules_p0/transposeJoin/transposeSemiJoinAgg.out index 4865cbdc7b..1836054f25 100644 --- a/regression-test/data/nereids_rules_p0/transposeJoin/transposeSemiJoinAgg.out +++ b/regression-test/data/nereids_rules_p0/transposeJoin/transposeSemiJoinAgg.out @@ -1,81 +1,101 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !groupby_positive_case -- PhysicalResultSink ---hashAgg[LOCAL] -----hashJoin[LEFT_SEMI_JOIN] hashCondition=((T3.a = T2.a)) otherCondition=() build RFs:RF0 a->[a] -------filter((T1.__DORIS_DELETE_SIGN__ = 0)) ---------PhysicalOlapScan[T1] apply RFs: RF0 -------filter((T2.__DORIS_DELETE_SIGN__ = 0)) ---------PhysicalOlapScan[T2] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[LOCAL] +------hashJoin[LEFT_SEMI_JOIN] hashCondition=((T3.a = T2.a)) otherCondition=() build RFs:RF0 a->[a] +--------filter((T1.__DORIS_DELETE_SIGN__ = 0)) +----------PhysicalOlapScan[T1] apply RFs: RF0 +--------PhysicalDistribute[DistributionSpecHash] +----------filter((T2.__DORIS_DELETE_SIGN__ = 0)) +------------PhysicalOlapScan[T2] -- !groupby_negative_case -- PhysicalResultSink ---hashJoin[LEFT_SEMI_JOIN] hashCondition=((T3.D = expr_cast(a as BIGINT))) otherCondition=() -----hashAgg[LOCAL] -------filter((T1.__DORIS_DELETE_SIGN__ = 0)) ---------PhysicalOlapScan[T1] -----filter((T2.__DORIS_DELETE_SIGN__ = 0)) -------PhysicalOlapScan[T2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_SEMI_JOIN] hashCondition=((T3.D = expr_cast(a as BIGINT))) otherCondition=() +------hashAgg[LOCAL] +--------filter((T1.__DORIS_DELETE_SIGN__ = 0)) +----------PhysicalOlapScan[T1] +------PhysicalDistribute[DistributionSpecReplicated] +--------filter((T2.__DORIS_DELETE_SIGN__ = 0)) +----------PhysicalOlapScan[T2] -- !grouping_positive_case -- PhysicalResultSink ---hashJoin[LEFT_SEMI_JOIN] hashCondition=((T3.a = T2.a)) otherCondition=() build RFs:RF0 a->[a] -----hashAgg[GLOBAL] -------hashAgg[LOCAL] ---------PhysicalRepeat -----------filter((T1.__DORIS_DELETE_SIGN__ = 0)) -------------PhysicalOlapScan[T1] apply RFs: RF0 -----filter((T2.__DORIS_DELETE_SIGN__ = 0)) -------PhysicalOlapScan[T2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_SEMI_JOIN] hashCondition=((T3.a = T2.a)) otherCondition=() build RFs:RF0 a->[a] +------hashAgg[GLOBAL] +--------PhysicalDistribute[DistributionSpecHash] +----------hashAgg[LOCAL] +------------PhysicalRepeat +--------------filter((T1.__DORIS_DELETE_SIGN__ = 0)) +----------------PhysicalOlapScan[T1] apply RFs: RF0 +------PhysicalDistribute[DistributionSpecReplicated] +--------filter((T2.__DORIS_DELETE_SIGN__ = 0)) +----------PhysicalOlapScan[T2] -- !grouping_negative_case -- PhysicalResultSink ---hashJoin[LEFT_SEMI_JOIN] hashCondition=((T3.D = expr_cast(a as BIGINT))) otherCondition=() -----hashAgg[GLOBAL] -------hashAgg[LOCAL] ---------PhysicalRepeat -----------filter((T1.__DORIS_DELETE_SIGN__ = 0)) -------------PhysicalOlapScan[T1] -----filter((T2.__DORIS_DELETE_SIGN__ = 0)) -------PhysicalOlapScan[T2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_SEMI_JOIN] hashCondition=((T3.D = expr_cast(a as BIGINT))) otherCondition=() +------hashAgg[GLOBAL] +--------PhysicalDistribute[DistributionSpecHash] +----------hashAgg[LOCAL] +------------PhysicalRepeat +--------------filter((T1.__DORIS_DELETE_SIGN__ = 0)) +----------------PhysicalOlapScan[T1] +------PhysicalDistribute[DistributionSpecReplicated] +--------filter((T2.__DORIS_DELETE_SIGN__ = 0)) +----------PhysicalOlapScan[T2] -- !groupby_positive_case2 -- PhysicalResultSink ---hashAgg[LOCAL] -----hashJoin[LEFT_SEMI_JOIN] hashCondition=((T3.a = T2.a)) otherCondition=() build RFs:RF0 a->[a] -------filter((T1.__DORIS_DELETE_SIGN__ = 0)) ---------PhysicalOlapScan[T1] apply RFs: RF0 -------filter((T2.__DORIS_DELETE_SIGN__ = 0)) ---------PhysicalOlapScan[T2] +--PhysicalDistribute[DistributionSpecGather] +----hashAgg[LOCAL] +------hashJoin[LEFT_SEMI_JOIN] hashCondition=((T3.a = T2.a)) otherCondition=() build RFs:RF0 a->[a] +--------filter((T1.__DORIS_DELETE_SIGN__ = 0)) +----------PhysicalOlapScan[T1] apply RFs: RF0 +--------PhysicalDistribute[DistributionSpecHash] +----------filter((T2.__DORIS_DELETE_SIGN__ = 0)) +------------PhysicalOlapScan[T2] -- !groupby_negative_case2 -- PhysicalResultSink ---hashJoin[LEFT_SEMI_JOIN] hashCondition=((T3.D = expr_cast(a as BIGINT))) otherCondition=() -----hashAgg[LOCAL] -------filter((T1.__DORIS_DELETE_SIGN__ = 0)) ---------PhysicalOlapScan[T1] -----filter((T2.__DORIS_DELETE_SIGN__ = 0)) -------PhysicalOlapScan[T2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_SEMI_JOIN] hashCondition=((T3.D = expr_cast(a as BIGINT))) otherCondition=() +------hashAgg[LOCAL] +--------filter((T1.__DORIS_DELETE_SIGN__ = 0)) +----------PhysicalOlapScan[T1] +------PhysicalDistribute[DistributionSpecReplicated] +--------filter((T2.__DORIS_DELETE_SIGN__ = 0)) +----------PhysicalOlapScan[T2] -- !grouping_positive_case2 -- PhysicalResultSink ---hashJoin[LEFT_SEMI_JOIN] hashCondition=((T3.a = T2.a)) otherCondition=() build RFs:RF0 a->[a] -----hashAgg[GLOBAL] -------hashAgg[LOCAL] ---------PhysicalRepeat -----------filter((T1.__DORIS_DELETE_SIGN__ = 0)) -------------PhysicalOlapScan[T1] apply RFs: RF0 -----filter((T2.__DORIS_DELETE_SIGN__ = 0)) -------PhysicalOlapScan[T2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_SEMI_JOIN] hashCondition=((T3.a = T2.a)) otherCondition=() build RFs:RF0 a->[a] +------hashAgg[GLOBAL] +--------PhysicalDistribute[DistributionSpecHash] +----------hashAgg[LOCAL] +------------PhysicalRepeat +--------------filter((T1.__DORIS_DELETE_SIGN__ = 0)) +----------------PhysicalOlapScan[T1] apply RFs: RF0 +------PhysicalDistribute[DistributionSpecReplicated] +--------filter((T2.__DORIS_DELETE_SIGN__ = 0)) +----------PhysicalOlapScan[T2] -- !grouping_negative_case2 -- PhysicalResultSink ---hashJoin[LEFT_SEMI_JOIN] hashCondition=((T3.D = expr_cast(a as BIGINT))) otherCondition=() -----hashAgg[GLOBAL] -------hashAgg[LOCAL] ---------PhysicalRepeat -----------filter((T1.__DORIS_DELETE_SIGN__ = 0)) -------------PhysicalOlapScan[T1] -----filter((T2.__DORIS_DELETE_SIGN__ = 0)) -------PhysicalOlapScan[T2] +--PhysicalDistribute[DistributionSpecGather] +----hashJoin[LEFT_SEMI_JOIN] hashCondition=((T3.D = expr_cast(a as BIGINT))) otherCondition=() +------hashAgg[GLOBAL] +--------PhysicalDistribute[DistributionSpecHash] +----------hashAgg[LOCAL] +------------PhysicalRepeat +--------------filter((T1.__DORIS_DELETE_SIGN__ = 0)) +----------------PhysicalOlapScan[T1] +------PhysicalDistribute[DistributionSpecReplicated] +--------filter((T2.__DORIS_DELETE_SIGN__ = 0)) +----------PhysicalOlapScan[T2] diff --git a/regression-test/data/nereids_shape_check/load.out b/regression-test/data/nereids_shape_check/load.out index 1c2d58cb4b..da0b0c9646 100644 --- a/regression-test/data/nereids_shape_check/load.out +++ b/regression-test/data/nereids_shape_check/load.out @@ -1,37 +1,37 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !bc1 -- PhysicalResultSink ---PhysicalDistribute +--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 +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalOlapScan[t1] -- !bc2 -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.code = t2.ACCEPT_ORG_CODE)) otherCondition=() --------PhysicalOlapScan[t2] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalOlapScan[t1] -- !bc3 -- PhysicalResultSink ---PhysicalDistribute +--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 +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalOlapScan[t1] -- !bc4 -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.code = t2.ACCEPT_ORG_CODE)) otherCondition=() --------PhysicalOlapScan[t2] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalOlapScan[t1] diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/flat.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/flat.out index 565a8613ff..e49c7de327 100644 --- a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/flat.out +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/flat.out @@ -1,17 +1,17 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !select -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((s.s_suppkey = l.lo_suppkey)) otherCondition=() build RFs:RF2 s_suppkey->[lo_suppkey] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((c.c_custkey = l.lo_custkey)) otherCondition=() build RFs:RF1 c_custkey->[lo_custkey] ------------hashJoin[INNER_JOIN] hashCondition=((p.p_partkey = l.lo_partkey)) otherCondition=() build RFs:RF0 p_partkey->[lo_partkey] --------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------PhysicalOlapScan[part] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalOlapScan[customer] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalOlapScan[supplier] diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q1.1.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q1.1.out index 60dc87a3d6..f4ad010b88 100644 --- a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q1.1.out +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q1.1.out @@ -2,14 +2,14 @@ -- !select -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF0 d_datekey->[lo_orderdate] ------------PhysicalProject --------------filter((lineorder.lo_discount <= 3) and (lineorder.lo_discount >= 1) and (lineorder.lo_quantity < 25)) ----------------PhysicalOlapScan[lineorder] apply RFs: RF0 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalProject ----------------filter((dates.d_year = 1993)) ------------------PhysicalOlapScan[dates] diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q1.2.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q1.2.out index 4812917ba7..9e174694ae 100644 --- a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q1.2.out +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q1.2.out @@ -2,14 +2,14 @@ -- !select -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF0 d_datekey->[lo_orderdate] ------------PhysicalProject --------------filter((lineorder.lo_discount <= 6) and (lineorder.lo_discount >= 4) and (lineorder.lo_quantity <= 35) and (lineorder.lo_quantity >= 26)) ----------------PhysicalOlapScan[lineorder] apply RFs: RF0 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalProject ----------------filter((dates.d_yearmonth = 'Jan1994')) ------------------PhysicalOlapScan[dates] diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q1.3.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q1.3.out index 8b548192e5..57ed69bb69 100644 --- a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q1.3.out +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q1.3.out @@ -2,14 +2,14 @@ -- !select -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF0 d_datekey->[lo_orderdate] ------------PhysicalProject --------------filter((lineorder.lo_discount <= 7) and (lineorder.lo_discount >= 5) and (lineorder.lo_quantity <= 35) and (lineorder.lo_quantity >= 26)) ----------------PhysicalOlapScan[lineorder] apply RFs: RF0 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalProject ----------------filter((dates.d_weeknuminyear = 6) and (dates.d_year = 1994)) ------------------PhysicalOlapScan[dates] diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.1.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.1.out index 78e68e065e..744d3efb0b 100644 --- a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.1.out +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.1.out @@ -2,11 +2,11 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF2 d_datekey->[lo_orderdate] @@ -15,15 +15,15 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[lo_partkey] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((part.p_category = 'MFGR#12')) --------------------------------PhysicalOlapScan[part] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((supplier.s_region = 'AMERICA')) ------------------------------PhysicalOlapScan[supplier] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[dates] diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.2.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.2.out index ced7caab8f..d3b4e0af1a 100644 --- a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.2.out +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.2.out @@ -2,11 +2,11 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF2 d_datekey->[lo_orderdate] @@ -15,15 +15,15 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[lo_partkey] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((part.p_brand <= 'MFGR#2228') and (part.p_brand >= 'MFGR#2221')) --------------------------------PhysicalOlapScan[part] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((supplier.s_region = 'ASIA')) ------------------------------PhysicalOlapScan[supplier] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[dates] diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.3.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.3.out index 1d076944f9..9bf90ed84c 100644 --- a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.3.out +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.3.out @@ -2,11 +2,11 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF2 d_datekey->[lo_orderdate] @@ -15,15 +15,15 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[lo_partkey] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((part.p_brand = 'MFGR#2239')) --------------------------------PhysicalOlapScan[part] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((supplier.s_region = 'EUROPE')) ------------------------------PhysicalOlapScan[supplier] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[dates] diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.1.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.1.out index 2be09999c7..fe16de9d36 100644 --- a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.1.out +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.1.out @@ -2,28 +2,28 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF2 d_datekey->[lo_orderdate] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_custkey = customer.c_custkey)) otherCondition=() build RFs:RF1 c_custkey->[lo_custkey] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF0 s_suppkey->[lo_suppkey] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((supplier.s_region = 'ASIA')) --------------------------------PhysicalOlapScan[supplier] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((customer.c_region = 'ASIA')) ----------------------------PhysicalOlapScan[customer] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((dates.d_year <= 1997) and (dates.d_year >= 1992)) ------------------------PhysicalOlapScan[dates] diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.2.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.2.out index 065498fa2c..5ea0fc9c50 100644 --- a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.2.out +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.2.out @@ -2,28 +2,28 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF2 d_datekey->[lo_orderdate] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_custkey = customer.c_custkey)) otherCondition=() build RFs:RF1 c_custkey->[lo_custkey] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF0 s_suppkey->[lo_suppkey] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((supplier.s_nation = 'UNITED STATES')) --------------------------------PhysicalOlapScan[supplier] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((customer.c_nation = 'UNITED STATES')) ----------------------------PhysicalOlapScan[customer] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((dates.d_year <= 1997) and (dates.d_year >= 1992)) ------------------------PhysicalOlapScan[dates] diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.3.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.3.out index d794d87614..d17185f934 100644 --- a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.3.out +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.3.out @@ -2,10 +2,10 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF2 d_datekey->[lo_orderdate] @@ -14,15 +14,15 @@ PhysicalResultSink ----------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF0 s_suppkey->[lo_suppkey] ------------------------PhysicalProject --------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter(s_city IN ('UNITED KI1', 'UNITED KI5')) ------------------------------PhysicalOlapScan[supplier] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter(c_city IN ('UNITED KI1', 'UNITED KI5')) ----------------------------PhysicalOlapScan[customer] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((dates.d_year <= 1997) and (dates.d_year >= 1992)) ------------------------PhysicalOlapScan[dates] diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.4.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.4.out index cbac82620b..cae5ca5a1b 100644 --- a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.4.out +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.4.out @@ -2,10 +2,10 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF2 d_datekey->[lo_orderdate] @@ -14,15 +14,15 @@ PhysicalResultSink ----------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF0 s_suppkey->[lo_suppkey] ------------------------PhysicalProject --------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter(s_city IN ('UNITED KI1', 'UNITED KI5')) ------------------------------PhysicalOlapScan[supplier] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter(c_city IN ('UNITED KI1', 'UNITED KI5')) ----------------------------PhysicalOlapScan[customer] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((dates.d_yearmonth = 'Dec1997')) ------------------------PhysicalOlapScan[dates] diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q4.1.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q4.1.out index 7ca913d2e2..1f69f8036d 100644 --- a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q4.1.out +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q4.1.out @@ -2,35 +2,35 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF3 d_datekey->[lo_orderdate] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_partkey = part.p_partkey)) otherCondition=() build RFs:RF2 p_partkey->[lo_partkey] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_custkey = customer.c_custkey)) otherCondition=() build RFs:RF1 c_custkey->[lo_custkey] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF0 s_suppkey->[lo_suppkey] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 RF3 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((supplier.s_region = 'AMERICA')) --------------------------------------PhysicalOlapScan[supplier] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------filter((customer.c_region = 'AMERICA')) ----------------------------------PhysicalOlapScan[customer] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter(p_mfgr IN ('MFGR#1', 'MFGR#2')) ----------------------------PhysicalOlapScan[part] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[dates] diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q4.2.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q4.2.out index 712dc79a00..214001fa50 100644 --- a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q4.2.out +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q4.2.out @@ -2,35 +2,35 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_partkey = part.p_partkey)) otherCondition=() build RFs:RF3 p_partkey->[lo_partkey] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_custkey = customer.c_custkey)) otherCondition=() build RFs:RF2 c_custkey->[lo_custkey] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF1 d_datekey->[lo_orderdate] ------------------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF0 s_suppkey->[lo_suppkey] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 RF3 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((supplier.s_region = 'AMERICA')) --------------------------------------PhysicalOlapScan[supplier] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter(d_year IN (1997, 1998)) ------------------------------------PhysicalOlapScan[dates] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter((customer.c_region = 'AMERICA')) ------------------------------PhysicalOlapScan[customer] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter(p_mfgr IN ('MFGR#1', 'MFGR#2')) ------------------------PhysicalOlapScan[part] diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q4.3.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q4.3.out index 7373f5a095..38e0dd0adb 100644 --- a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q4.3.out +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q4.3.out @@ -2,31 +2,31 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_custkey = customer.c_custkey)) otherCondition=() build RFs:RF3 lo_custkey->[c_custkey] ------------------PhysicalProject --------------------PhysicalOlapScan[customer] apply RFs: RF3 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF2 d_datekey->[lo_orderdate] ------------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_partkey = part.p_partkey)) otherCondition=() build RFs:RF1 p_partkey->[lo_partkey] --------------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF0 s_suppkey->[lo_suppkey] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((supplier.s_nation = 'UNITED STATES')) ----------------------------------PhysicalOlapScan[supplier] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((part.p_category = 'MFGR#14')) --------------------------------PhysicalOlapScan[part] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter(d_year IN (1997, 1998)) ------------------------------PhysicalOlapScan[dates] diff --git a/regression-test/data/nereids_syntax_p0/push_filter_through_ptopn.out b/regression-test/data/nereids_syntax_p0/push_filter_through_ptopn.out index 5a8348710b..e37f73ef79 100644 --- a/regression-test/data/nereids_syntax_p0/push_filter_through_ptopn.out +++ b/regression-test/data/nereids_syntax_p0/push_filter_through_ptopn.out @@ -5,7 +5,7 @@ -- !shape_1 -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----filter((rn <= 2)) ------PhysicalWindow --------PhysicalQuickSort[LOCAL_SORT] @@ -20,7 +20,7 @@ PhysicalResultSink -- !shape_2 -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------filter((rn <= 2)) --------PhysicalWindow @@ -31,7 +31,7 @@ PhysicalResultSink -- !3 -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----filter((T.b = 2) and (rn <= 2)) ------PhysicalWindow --------PhysicalQuickSort[LOCAL_SORT] @@ -40,12 +40,12 @@ PhysicalResultSink -- !4 -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------filter((T.b = 2) and (rn <= 2)) --------PhysicalWindow ----------PhysicalPartitionTopN -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalPartitionTopN ----------------PhysicalProject ------------------PhysicalOlapScan[push_filter_through_ptopn_tbl] diff --git a/regression-test/data/nereids_syntax_p0/push_filter_through_window.out b/regression-test/data/nereids_syntax_p0/push_filter_through_window.out index 7eefeafce8..513a3a8a9e 100644 --- a/regression-test/data/nereids_syntax_p0/push_filter_through_window.out +++ b/regression-test/data/nereids_syntax_p0/push_filter_through_window.out @@ -5,7 +5,7 @@ -- !shape_1 -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalWindow ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject @@ -18,7 +18,7 @@ PhysicalResultSink -- !shape_2 -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------PhysicalWindow --------PhysicalQuickSort[LOCAL_SORT] @@ -27,7 +27,7 @@ PhysicalResultSink -- !4 -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----filter((T.b = 2)) ------PhysicalWindow --------PhysicalQuickSort[LOCAL_SORT] @@ -35,12 +35,12 @@ PhysicalResultSink -- !5 -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------filter((T.b = 2)) --------PhysicalWindow ----------PhysicalQuickSort[LOCAL_SORT] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------PhysicalOlapScan[push_filter_through_window_tbl] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query1.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query1.out index 03273f76c9..22d0b5963f 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query1.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query1.out @@ -4,40 +4,40 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] ----------------PhysicalProject ------------------PhysicalOlapScan[store_returns] apply RFs: RF0 -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((date_dim.d_year = 2000)) ----------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ctr_customer_sk->[c_customer_sk] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------PhysicalOlapScan[customer] apply RFs: RF2 ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE))) ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = ctr1.ctr_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ctr_store_sk] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((store.s_state = 'TN')) ----------------------------PhysicalOlapScan[store] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------------PhysicalProject ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query10.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query10.out index dcbbe6a350..03b3bf074e 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query10.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query10.out @@ -3,7 +3,7 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------hashAgg[LOCAL] ------------PhysicalProject @@ -13,41 +13,41 @@ PhysicalResultSink --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 c_current_cdemo_sk->[cd_demo_sk] ------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF5 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2001)) ------------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[c_current_addr_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter(ca_county IN ('Campbell County', 'Cleburne County', 'Escambia County', 'Fairfield County', 'Washtenaw County')) ----------------------------------------PhysicalOlapScan[customer_address] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2001)) --------------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2001)) ------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query11.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query11.out index 00444e09ab..f3adab2ab6 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query11.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query11.out @@ -4,57 +4,57 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((PULL_UP_UNIFIED_OUTPUT_ALIAS = customer.c_customer_sk)) otherCondition=() ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalUnion --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1998, 1999)) --------------------------------PhysicalOlapScan[date_dim] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1998, 1999)) --------------------------------PhysicalOlapScan[date_dim] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[customer] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000) > if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000))) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((t_w_firstyear.dyear = 1998) and (t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year_total > 0.00)) --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------filter((t_s_secyear.dyear = 1999) and (t_s_secyear.sale_type = 's')) ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((t_w_secyear.dyear = 1999) and (t_w_secyear.sale_type = 'w')) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((t_s_firstyear.dyear = 1998) and (t_s_firstyear.sale_type = 's') and (t_s_firstyear.year_total > 0.00)) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query12.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query12.out index fea6f65979..03682c1c40 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query12.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query12.out @@ -2,26 +2,26 @@ -- !ds_shape_12 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ws_item_sk] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_date <= '2001-07-15') and (date_dim.d_date >= '2001-06-15')) ------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------filter(i_category IN ('Books', 'Electronics', 'Men')) --------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query13.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query13.out index 69173c83ea..07764ae74a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query13.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query13.out @@ -2,38 +2,38 @@ -- !ds_shape_13 -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF4 s_store_sk->[ss_store_sk] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=(((((((customer_demographics.cd_marital_status = 'M') AND (customer_demographics.cd_education_status = 'College')) AND ((store_sales.ss_sales_price >= 100.00) AND (store_sales.ss_sales_price <= 150.00))) AND (household_demographics.hd_dep_count = 3)) OR ((((customer_demographics.cd_marital_status = 'D') AND (customer_demographics.cd_education_status = 'Primary')) AND ((store_sales.ss_sales_price >= 50.00) AND (store_sales.ss_sales_price <= 100.00))) AND (household_demographics.hd_dep_count = 1))) OR ((((customer_demographics.cd_marital_status = 'W') AND (customer_demographics.cd_education_status = '2 yr Degree')) AND ((store_sales.ss_sales_price >= 150.00) AND (store_sales.ss_sales_price <= 200.00))) AND (household_demographics.hd_dep_count = 1)))) build RFs:RF3 ss_cdemo_sk->[cd_demo_sk] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------filter(((((customer_demographics.cd_marital_status = 'M') AND (customer_demographics.cd_education_status = 'College')) OR ((customer_demographics.cd_marital_status = 'D') AND (customer_demographics.cd_education_status = 'Primary'))) OR ((customer_demographics.cd_marital_status = 'W') AND (customer_demographics.cd_education_status = '2 yr Degree')))) ----------------------PhysicalOlapScan[customer_demographics] apply RFs: RF3 -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] ----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=((((ca_state IN ('IL', 'TN', 'TX') AND ((store_sales.ss_net_profit >= 100.00) AND (store_sales.ss_net_profit <= 200.00))) OR (ca_state IN ('ID', 'OH', 'WY') AND ((store_sales.ss_net_profit >= 150.00) AND (store_sales.ss_net_profit <= 300.00)))) OR (ca_state IN ('IA', 'MS', 'SC') AND ((store_sales.ss_net_profit >= 50.00) AND (store_sales.ss_net_profit <= 250.00))))) build RFs:RF0 ca_address_sk->[ss_addr_sk] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------filter((store_sales.ss_net_profit <= 300.00) and (store_sales.ss_net_profit >= 50.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------filter(((ca_state IN ('IL', 'TN', 'TX') OR ca_state IN ('ID', 'OH', 'WY')) OR ca_state IN ('IA', 'MS', 'SC')) and (customer_address.ca_country = 'United States')) --------------------------------PhysicalOlapScan[customer_address] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_year = 2001)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter(hd_dep_count IN (1, 3)) ----------------------------PhysicalOlapScan[household_demographics] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalProject ----------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query14.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query14.out index 2d8e3809f4..8fe54c1394 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query14.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query14.out @@ -6,93 +6,93 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------hashJoin[INNER_JOIN] hashCondition=((item.i_brand_id = t.brand_id) and (item.i_category_id = t.category_id) and (item.i_class_id = t.class_id)) otherCondition=() build RFs:RF6 class_id->[i_class_id];RF7 category_id->[i_category_id];RF8 brand_id->[i_brand_id] --------PhysicalProject ----------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8 ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalIntersect ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = iss.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] ----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((d1.d_year <= 2001) and (d1.d_year >= 1999)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[item] ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = ics.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[cs_item_sk] ----------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((d2.d_year <= 2001) and (d2.d_year >= 1999)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[item] ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = iws.i_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[ws_item_sk] ----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((d3.d_year <= 2001) and (d3.d_year >= 1999)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[item] --PhysicalCteAnchor ( cteId=CTEId#1 ) ----PhysicalCteProducer ( cteId=CTEId#1 ) ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalUnion ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ss_sold_date_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[store_sales] apply RFs: RF9 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_year <= 2001) and (date_dim.d_year >= 1999)) --------------------------PhysicalOlapScan[date_dim] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF10 d_date_sk->[cs_sold_date_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF10 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_year <= 2001) and (date_dim.d_year >= 1999)) --------------------------PhysicalOlapScan[date_dim] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[ws_sold_date_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[web_sales] apply RFs: RF11 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_year <= 2001) and (date_dim.d_year >= 1999)) --------------------------PhysicalOlapScan[date_dim] ----PhysicalResultSink ------PhysicalTopN[MERGE_SORT] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalRepeat ----------------------PhysicalUnion @@ -100,78 +100,78 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------NestedLoopJoin[INNER_JOIN](cast(sales as DOUBLE) > cast(average_sales as DOUBLE)) ----------------------------PhysicalProject ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF14 i_item_sk->[ss_item_sk] ----------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((store_sales.ss_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF13 ss_item_sk->[ss_item_sk] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF12 d_date_sk->[ss_sold_date_sk] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF12 RF13 RF14 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001)) ----------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalAssertNumRows ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ------------------------PhysicalProject --------------------------NestedLoopJoin[INNER_JOIN](cast(sales as DOUBLE) > cast(average_sales as DOUBLE)) ----------------------------PhysicalProject ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF17 i_item_sk->[cs_item_sk] ----------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((catalog_sales.cs_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF16 ss_item_sk->[cs_item_sk] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF15 d_date_sk->[cs_sold_date_sk] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF15 RF16 RF17 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001)) ----------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalAssertNumRows ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ------------------------PhysicalProject --------------------------NestedLoopJoin[INNER_JOIN](cast(sales as DOUBLE) > cast(average_sales as DOUBLE)) ----------------------------PhysicalProject ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF20 i_item_sk->[ws_item_sk] ----------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF19 ss_item_sk->[ws_item_sk] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF18 d_date_sk->[ws_sold_date_sk] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF18 RF19 RF20 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001)) ----------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalAssertNumRows ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query15.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query15.out index 9e2cb3f4e9..76dbaeb392 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query15.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query15.out @@ -2,28 +2,28 @@ -- !ds_shape_15 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=(((substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274') OR ca_state IN ('CA', 'GA', 'WA')) OR (catalog_sales.cs_sales_price > 500.00))) build RFs:RF2 c_customer_sk->[cs_bill_customer_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF2 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_qoy = 2) and (date_dim.d_year = 2001)) ----------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[customer] apply RFs: RF0 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query16.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query16.out index 3fe19ee10d..e51af66591 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query16.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query16.out @@ -4,34 +4,34 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] ------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[DISTINCT_LOCAL] ------------hashAgg[GLOBAL] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF4 cs_order_number->[cs_order_number] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 --------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() build RFs:RF3 cs_order_number->[cr_order_number] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF3 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cc_call_center_sk->[cs_call_center_sk] --------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk] ----------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cs_ship_addr_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((customer_address.ca_state = 'PA')) ------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) ----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((call_center.cc_county = 'Williamson County')) --------------------------------PhysicalOlapScan[call_center] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query17.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query17.out index 6fe2631fc2..fcccba6021 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query17.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query17.out @@ -3,47 +3,47 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF8 sr_customer_sk->[cs_bill_customer_sk];RF9 sr_item_sk->[cs_item_sk] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 RF8 RF9 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) --------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF6 s_store_sk->[ss_store_sk] --------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[ss_item_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF2 sr_customer_sk->[ss_customer_sk];RF3 sr_item_sk->[ss_item_sk];RF4 sr_ticket_number->[ss_ticket_number] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 RF5 RF6 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((d1.d_quarter_name = '2001Q1')) ------------------------------------------PhysicalOlapScan[date_dim] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) ------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query18.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query18.out index 62ce64f655..bb2dd06527 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query18.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query18.out @@ -2,50 +2,50 @@ -- !ds_shape_18 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[cs_item_sk] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF2 cd_demo_sk->[cs_bill_cdemo_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 RF4 RF5 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((cd1.cd_education_status = 'Primary') and (cd1.cd_gender = 'F')) --------------------------------------------PhysicalOlapScan[customer_demographics] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() build RFs:RF1 c_current_cdemo_sk->[cd_demo_sk] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF1 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------filter(c_birth_month IN (1, 10, 11, 3, 4, 7)) ------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------filter(ca_state IN ('AL', 'CA', 'GA', 'IN', 'MO', 'MT', 'TN')) ------------------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_year = 2001)) ----------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query19.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query19.out index bd57a6ad84..6b8a3bdf11 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query19.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query19.out @@ -2,11 +2,11 @@ -- !ds_shape_19 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=(( not (substring(ca_zip, 1, 5) = substring(s_zip, 1, 5)))) build RFs:RF4 s_store_sk->[ss_store_sk] @@ -14,27 +14,27 @@ PhysicalResultSink ----------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 c_current_addr_sk->[ca_address_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ss_customer_sk->[c_customer_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer] apply RFs: RF2 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF4 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((item.i_manager_id = 14)) --------------------------------------------PhysicalOlapScan[item] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query2.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query2.out index 4ef14e4020..69e7fe08dd 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query2.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query2.out @@ -3,43 +3,43 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) --PhysicalCteProducer ( cteId=CTEId#1 ) ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = wscs.sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk,cs_sold_date_sk] --------------PhysicalUnion -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[web_sales] apply RFs: RF0 -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------PhysicalProject ------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(d_week_seq2 - 53))) otherCondition=() ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject ------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_year = 1998)) --------------------------PhysicalOlapScan[date_dim] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_week_seq = d_week_seq2)) otherCondition=() build RFs:RF1 d_week_seq->[d_week_seq] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject ------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_year = 1999)) --------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query20.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query20.out index 98b54dccc2..bb54eb96f4 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query20.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query20.out @@ -2,25 +2,25 @@ -- !ds_shape_20 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[cs_item_sk] --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_date <= '2002-07-18') and (date_dim.d_date >= '2002-06-18')) ----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(i_category IN ('Books', 'Music', 'Sports')) --------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query21.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query21.out index 7d4f150f30..404d277586 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query21.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query21.out @@ -2,11 +2,11 @@ -- !ds_shape_21 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------filter((if((inv_before > 0), (cast(inv_after as DOUBLE) / cast(inv_before as DOUBLE)), NULL) <= 1.5) and (if((inv_before > 0), (cast(inv_after as DOUBLE) / cast(inv_before as DOUBLE)), NULL) >= cast((2.000000 / 3.0) as DOUBLE))) ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF2 w_warehouse_sk->[inv_warehouse_sk] @@ -14,15 +14,15 @@ PhysicalResultSink ----------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] ------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] --------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) --------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_date <= '1999-07-22') and (date_dim.d_date >= '1999-05-23')) ------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[warehouse] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query22.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query22.out index e981e8d085..605f1264f9 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query22.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query22.out @@ -2,11 +2,11 @@ -- !ds_shape_22 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject @@ -15,11 +15,11 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_month_seq <= 1211) and (date_dim.d_month_seq >= 1200)) --------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query23.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query23.out index c7563fa6bd..f2c86958c9 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query23.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query23.out @@ -5,7 +5,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalProject ------filter((cnt > 4)) --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] @@ -13,11 +13,11 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter(d_year IN (2000, 2001, 2002, 2003)) ----------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[item] --PhysicalCteAnchor ( cteId=CTEId#2 ) @@ -25,26 +25,26 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalProject --------NestedLoopJoin[INNER_JOIN](cast(ssales as DOUBLE) > cast((0.9500 * tpcds_cmax) as DOUBLE)) ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------filter(( not ss_customer_sk IS NULL)) --------------------PhysicalOlapScan[store_sales] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecReplicated] ------------PhysicalProject --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecGather] ------------------hashAgg[LOCAL] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------filter(( not ss_customer_sk IS NULL)) ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter(d_year IN (2000, 2001, 2002, 2003)) --------------------------------------PhysicalOlapScan[date_dim] @@ -52,45 +52,45 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalLimit[GLOBAL] --------PhysicalLimit[LOCAL] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalUnion ------------------PhysicalProject --------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[cs_bill_customer_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 7) and (date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) ------------------PhysicalProject --------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF6 c_customer_sk->[ws_bill_customer_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF5 RF6 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 7) and (date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query24.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query24.out index f07e48b8f0..069b4262ea 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query24.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query24.out @@ -4,56 +4,56 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF5 sr_item_sk->[ss_item_sk];RF6 sr_ticket_number->[ss_ticket_number] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashJoin[INNER_JOIN] hashCondition=((store.s_zip = customer_address.ca_zip) and (store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ca_zip->[s_zip];RF3 c_customer_sk->[ss_customer_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF3 RF4 RF5 RF6 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((store.s_market_id = 5)) ------------------------------------PhysicalOlapScan[store] apply RFs: RF2 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=(( not (c_birth_country = upper(ca_country)))) build RFs:RF0 ca_address_sk->[c_current_addr_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer_address] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[store_returns] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalProject ------------NestedLoopJoin[INNER_JOIN](cast(paid as DOUBLE) > cast((0.05 * avg(cast(netpaid as DECIMALV3(38, 4)))) as DOUBLE)) --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject ------------------------filter((ssales.i_color = 'aquamarine')) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecGather] ----------------------hashAgg[LOCAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------------PhysicalProject ----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query25.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query25.out index 7422ef1f1b..c81ff44fa8 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query25.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query25.out @@ -2,47 +2,47 @@ -- !ds_shape_25 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF8 sr_customer_sk->[cs_bill_customer_sk];RF9 sr_item_sk->[cs_item_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 RF8 RF9 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((d3.d_moy <= 10) and (d3.d_moy >= 4) and (d3.d_year = 1999)) ------------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF6 s_store_sk->[ss_store_sk] ------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[ss_item_sk] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF2 sr_customer_sk->[ss_customer_sk];RF3 sr_item_sk->[ss_item_sk];RF4 sr_ticket_number->[ss_ticket_number] --------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 RF5 RF6 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1999)) ----------------------------------------PhysicalOlapScan[date_dim] --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((d2.d_moy <= 10) and (d2.d_moy >= 4) and (d2.d_year = 1999)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query26.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query26.out index 575ba874cd..e65c48acf4 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query26.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query26.out @@ -2,14 +2,14 @@ -- !ds_shape_26 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[cs_item_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF2 p_promo_sk->[cs_promo_sk] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] @@ -17,19 +17,19 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[cs_bill_cdemo_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 RF3 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((customer_demographics.cd_education_status = 'Unknown') and (customer_demographics.cd_gender = 'M') and (customer_demographics.cd_marital_status = 'W')) ------------------------------------PhysicalOlapScan[customer_demographics] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_year = 2002)) --------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter(((promotion.p_channel_email = 'N') OR (promotion.p_channel_event = 'N'))) ----------------------------PhysicalOlapScan[promotion] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query27.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query27.out index 65553f82be..7212284eaa 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query27.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query27.out @@ -3,16 +3,16 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalRepeat --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] @@ -20,19 +20,19 @@ PhysicalResultSink ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((customer_demographics.cd_education_status = 'Secondary') and (customer_demographics.cd_gender = 'M') and (customer_demographics.cd_marital_status = 'W')) ------------------------------------------PhysicalOlapScan[customer_demographics] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((store.s_state = 'TN')) --------------------------------------PhysicalOlapScan[store] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_year = 1999)) ------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[item] 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 d1cd54e3d2..5651a8010a 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 @@ -15,47 +15,47 @@ PhysicalResultSink ------------------------NestedLoopJoin[CROSS_JOIN] --------------------------PhysicalLimit[LOCAL] ----------------------------hashAgg[GLOBAL] -------------------------------PhysicalDistribute +------------------------------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 +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalLimit[LOCAL] ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------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 +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalLimit[LOCAL] --------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute +----------------------------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 +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalLimit[LOCAL] ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------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 +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------PhysicalLimit[LOCAL] ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------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 +----------PhysicalDistribute[DistributionSpecReplicated] ------------PhysicalLimit[LOCAL] --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------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)) diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query29.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query29.out index 9e2c83ef46..512cddbf32 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query29.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query29.out @@ -2,10 +2,10 @@ -- !ds_shape_29 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[cs_sold_date_sk] @@ -13,33 +13,33 @@ PhysicalResultSink --------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF7 sr_customer_sk->[cs_bill_customer_sk];RF8 sr_item_sk->[cs_item_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 RF8 RF9 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF6 s_store_sk->[ss_store_sk] --------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[ss_item_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF2 sr_customer_sk->[ss_customer_sk];RF3 sr_item_sk->[ss_item_sk];RF4 sr_ticket_number->[ss_ticket_number] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 RF5 RF6 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1998)) ------------------------------------------PhysicalOlapScan[date_dim] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((d2.d_moy <= 7) and (d2.d_moy >= 4) and (d2.d_year = 1998)) ------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[store] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter(d_year IN (1998, 1999, 2000)) ------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query3.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query3.out index 7704d94620..5a86e9fdb7 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query3.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query3.out @@ -2,22 +2,22 @@ -- !ds_shape_3 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((item.i_manufact_id = 816)) ----------------------------PhysicalOlapScan[item] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((dt.d_moy = 11)) --------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query30.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query30.out index 69a07ae9b7..f738fa63da 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query30.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query30.out @@ -4,45 +4,45 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[wr_returning_addr_sk] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[wr_returned_date_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[web_returns] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_year = 2000)) ----------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[customer_address] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE))) --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ctr_customer_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[c_current_addr_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[customer] apply RFs: RF2 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((customer_address.ca_state = 'AR')) ----------------------------PhysicalOlapScan[customer_address] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------------PhysicalProject --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query31.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query31.out index dc5b17ea99..11e812ae39 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query31.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query31.out @@ -4,74 +4,74 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((ss.d_year = 1999) and d_qoy IN (1, 2, 3)) ----------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[customer_address] --PhysicalCteAnchor ( cteId=CTEId#1 ) ----PhysicalCteProducer ( cteId=CTEId#1 ) ------PhysicalProject --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ws_bill_addr_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((ws.d_year = 1999) and d_qoy IN (1, 2, 3)) ------------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[customer_address] ----PhysicalResultSink ------PhysicalQuickSort[MERGE_SORT] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------PhysicalQuickSort[LOCAL_SORT] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((ws1.ca_county = ws3.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------filter((ws3.d_qoy = 3) and (ws3.d_year = 1999)) ----------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((ss2.ca_county = ss3.ca_county)) otherCondition=() ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((ss3.d_qoy = 3) and (ss3.d_year = 1999)) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ca_county = ws2.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) ----------------------hashJoin[INNER_JOIN] hashCondition=((ss1.ca_county = ws1.ca_county)) otherCondition=() ------------------------hashJoin[INNER_JOIN] hashCondition=((ss1.ca_county = ss2.ca_county)) otherCondition=() ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------filter((ss1.d_qoy = 1) and (ss1.d_year = 1999)) --------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------filter((ss2.d_qoy = 2) and (ss2.d_year = 1999)) --------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter((ws1.d_qoy = 1) and (ws1.d_year = 1999)) ------------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((ws2.d_qoy = 2) and (ws2.d_year = 1999)) ----------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query32.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query32.out index faa6c0fcb3..052f748aa9 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query32.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query32.out @@ -4,24 +4,24 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalProject --------------filter((cast(cs_ext_discount_amt as DECIMALV3(38, 5)) > (1.3 * avg(cast(cs_ext_discount_amt as DECIMALV3(9, 4))) OVER(PARTITION BY i_item_sk)))) ----------------PhysicalWindow ------------------PhysicalQuickSort[LOCAL_SORT] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((item.i_manufact_id = 722)) ------------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '2001-06-07') and (date_dim.d_date >= '2001-03-09')) --------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query33.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query33.out index 5989257c15..7202a2b63d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query33.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query33.out @@ -2,100 +2,100 @@ -- !ds_shape_33 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF3 i_manufact_id->[i_manufact_id] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((item.i_category = 'Books')) --------------------------PhysicalOlapScan[item] apply RFs: RF3 --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2001)) ------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ------------------------------------------PhysicalOlapScan[customer_address] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF7 i_manufact_id->[i_manufact_id] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((item.i_category = 'Books')) --------------------------PhysicalOlapScan[item] apply RFs: RF7 --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[cs_bill_addr_sk] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 RF6 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2001)) ------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ------------------------------------------PhysicalOlapScan[customer_address] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF11 i_manufact_id->[i_manufact_id] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((item.i_category = 'Books')) --------------------------PhysicalOlapScan[item] apply RFs: RF11 --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ws_item_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[ws_bill_addr_sk] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 RF10 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2001)) ------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ------------------------------------------PhysicalOlapScan[customer_address] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query34.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query34.out index 88706548bf..6d2b34d9ff 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query34.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query34.out @@ -2,16 +2,16 @@ -- !ds_shape_34 -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk] ------------PhysicalProject --------------PhysicalOlapScan[customer] apply RFs: RF3 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------filter((dn.cnt <= 20) and (dn.cnt >= 15)) ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] @@ -20,15 +20,15 @@ PhysicalResultSink ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((store.s_county = 'Williamson County')) --------------------------------------PhysicalOlapScan[store] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((((date_dim.d_dom >= 1) AND (date_dim.d_dom <= 3)) OR ((date_dim.d_dom >= 25) AND (date_dim.d_dom <= 28))) and d_year IN (2000, 2001, 2002)) ------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.2) and hd_buy_potential IN ('0-500', '1001-5000')) --------------------------------PhysicalOlapScan[household_demographics] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query35.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query35.out index a85e61edf0..9c06ffd145 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query35.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query35.out @@ -3,10 +3,10 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------filter(($c$1 OR $c$2)) @@ -14,44 +14,44 @@ PhysicalResultSink ----------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalProject ------------------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 1999)) --------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer_demographics] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 1999)) ------------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 1999)) ----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query36.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query36.out index 5fff3bf11a..bffc816dd4 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query36.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query36.out @@ -3,34 +3,34 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalRepeat ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((store.s_state = 'TN')) ----------------------------------------------PhysicalOlapScan[store] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((d1.d_year = 2000)) --------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query37.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query37.out index 0a59006f1b..afcbd93d21 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query37.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query37.out @@ -2,16 +2,16 @@ -- !ds_shape_37 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk] ------------------PhysicalProject --------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] ------------------------PhysicalProject @@ -19,11 +19,11 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------filter((inventory.inv_quantity_on_hand <= 500) and (inventory.inv_quantity_on_hand >= 100)) --------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((item.i_current_price <= 59.00) and (item.i_current_price >= 29.00) and i_manufact_id IN (705, 742, 777, 944)) ----------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_date <= '2002-05-28') and (date_dim.d_date >= '2002-03-29')) ------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query38.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query38.out index 160bd4fdd8..a15b4f7724 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query38.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query38.out @@ -4,62 +4,62 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalProject --------------PhysicalIntersect ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_month_seq <= 1200) and (date_dim.d_month_seq >= 1189)) ----------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_month_seq <= 1200) and (date_dim.d_month_seq >= 1189)) ----------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_month_seq <= 1200) and (date_dim.d_month_seq >= 1189)) ----------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer] 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 76c19f3714..fa42e98c19 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 @@ -5,7 +5,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalProject ------filter((if((mean = 0), 0, (stdev / mean)) > 1)) --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[inv_item_sk] @@ -13,27 +13,27 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF1 w_warehouse_sk->[inv_warehouse_sk] ----------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk] ------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_year = 2000) and d_moy IN (1, 2)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[warehouse] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[item] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] -------PhysicalDistribute +------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 +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((inv1.d_moy = 1)) --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((inv2.d_moy = 2)) --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query4.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query4.out index 81e9dc9527..133758d014 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query4.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query4.out @@ -4,80 +4,80 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((PULL_UP_UNIFIED_OUTPUT_ALIAS = customer.c_customer_sk)) otherCondition=() ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalUnion --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000)) --------------------------------PhysicalOlapScan[date_dim] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000)) --------------------------------PhysicalOlapScan[date_dim] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000)) --------------------------------PhysicalOlapScan[date_dim] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[customer] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((t_w_firstyear.dyear = 1999) and (t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year_total > 0.000000)) --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=() -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------filter((t_w_secyear.dyear = 2000) and (t_w_secyear.sale_type = 'w')) ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_c_firstyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((t_c_firstyear.dyear = 1999) and (t_c_firstyear.sale_type = 'c') and (t_c_firstyear.year_total > 0.000000)) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((t_s_secyear.dyear = 2000) and (t_s_secyear.sale_type = 's')) ----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=() -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter((t_c_secyear.dyear = 2000) and (t_c_secyear.sale_type = 'c')) ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter((t_s_firstyear.dyear = 1999) and (t_s_firstyear.sale_type = 's') and (t_s_firstyear.year_total > 0.000000)) ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query40.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query40.out index 7ede017b80..ebeb4e5e09 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query40.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query40.out @@ -2,10 +2,10 @@ -- !ds_shape_40 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF4 w_warehouse_sk->[cs_warehouse_sk] @@ -17,15 +17,15 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF4 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) --------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_date <= '2001-06-01') and (date_dim.d_date >= '2001-04-02')) ------------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[warehouse] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query41.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query41.out index 52d41d2818..75ae21d6aa 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query41.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query41.out @@ -2,21 +2,21 @@ -- !ds_shape_41 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((item.i_manufact = i1.i_manufact)) otherCondition=() build RFs:RF0 i_manufact->[i_manufact] ------------------PhysicalProject --------------------filter((i1.i_manufact_id <= 744) and (i1.i_manufact_id >= 704)) ----------------------PhysicalOlapScan[item] apply RFs: RF0 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((item_cnt > 0)) ------------------------hashAgg[GLOBAL] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject --------------------------------filter((((((((((((item.i_category = 'Women') AND i_color IN ('forest', 'lime')) AND i_units IN ('Pallet', 'Pound')) AND i_size IN ('economy', 'small')) OR ((((item.i_category = 'Women') AND i_color IN ('navy', 'slate')) AND i_units IN ('Bunch', 'Gross')) AND i_size IN ('extra large', 'petite'))) OR ((((item.i_category = 'Women') AND i_color IN ('aquamarine', 'dark')) AND i_units IN ('Tbl', 'Ton')) AND i_size IN ('economy', 'small'))) OR ((((item.i_category = 'Women') AND i_color IN ('frosted', 'plum')) AND i_units IN ('Box', 'Dram')) AND i_size IN ('extra large', 'petite'))) OR ((((item.i_category = 'Men') AND i_color IN ('powder', 'sky')) AND i_units IN ('Dozen', 'Lb')) AND i_size IN ('N/A', 'large'))) OR ((((item.i_category = 'Men') AND i_color IN ('maroon', 'smoke')) AND i_units IN ('Case', 'Ounce')) AND i_size IN ('economy', 'small'))) OR ((((item.i_category = 'Men') AND i_color IN ('papaya', 'peach')) AND i_units IN ('Bundle', 'Carton')) AND i_size IN ('N/A', 'large'))) OR ((((item.i_category = 'Men') AND i_color IN ('firebrick', 'sienna')) AND i_units IN ('Cup', 'Each')) AND i_size IN ('economy', 'small')))) diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query42.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query42.out index 8382ca8b1f..3b2b282a6b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query42.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query42.out @@ -2,21 +2,21 @@ -- !ds_shape_42 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((item.i_manager_id = 1)) --------------------------PhysicalOlapScan[item] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((dt.d_moy = 11) and (dt.d_year = 1998)) ------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query43.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query43.out index 445a381983..2de98f4e1f 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query43.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query43.out @@ -2,10 +2,10 @@ -- !ds_shape_43 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] @@ -13,11 +13,11 @@ PhysicalResultSink --------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_year = 2000)) ----------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((store.s_gmt_offset = -5.00)) ------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query44.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query44.out index e0a75dd364..5dddbe8e54 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query44.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query44.out @@ -2,69 +2,69 @@ -- !ds_shape_44 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((asceding.rnk = descending.rnk)) otherCondition=() -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() build RFs:RF1 item_sk->[i_item_sk] ------------------PhysicalProject --------------------PhysicalOlapScan[item] apply RFs: RF1 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((rnk < 11)) ------------------------PhysicalWindow --------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------PhysicalQuickSort[LOCAL_SORT] --------------------------------PhysicalPartitionTopN ----------------------------------PhysicalProject ------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DOUBLE) > cast((0.9 * rank_col) as DOUBLE)) --------------------------------------PhysicalProject ----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------hashAgg[LOCAL] ----------------------------------------------PhysicalProject ------------------------------------------------filter((ss1.ss_store_sk = 4)) --------------------------------------------------PhysicalOlapScan[store_sales] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalAssertNumRows -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------------PhysicalProject ----------------------------------------------hashAgg[GLOBAL] -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------------hashAgg[LOCAL] ----------------------------------------------------PhysicalProject ------------------------------------------------------filter((store_sales.ss_store_sk = 4) and ss_hdemo_sk IS NULL) --------------------------------------------------------PhysicalOlapScan[store_sales] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashJoin[INNER_JOIN] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() build RFs:RF0 item_sk->[i_item_sk] ----------------PhysicalProject ------------------PhysicalOlapScan[item] apply RFs: RF0 -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------filter((rnk < 11)) ----------------------PhysicalWindow ------------------------PhysicalQuickSort[MERGE_SORT] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------PhysicalQuickSort[LOCAL_SORT] ------------------------------PhysicalPartitionTopN --------------------------------PhysicalProject ----------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DOUBLE) > cast((0.9 * rank_col) as DOUBLE)) ------------------------------------PhysicalProject --------------------------------------hashAgg[GLOBAL] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------hashAgg[LOCAL] --------------------------------------------PhysicalProject ----------------------------------------------filter((ss1.ss_store_sk = 4)) ------------------------------------------------PhysicalOlapScan[store_sales] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalAssertNumRows -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------------PhysicalProject --------------------------------------------hashAgg[GLOBAL] -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------hashAgg[LOCAL] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((store_sales.ss_store_sk = 4) and ss_hdemo_sk IS NULL) diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query45.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query45.out index 1e60bc0af4..939588dcdf 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query45.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query45.out @@ -2,40 +2,40 @@ -- !ds_shape_45 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------filter((substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274') OR $c$1)) ------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ws_item_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ws_bill_customer_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_qoy = 1) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[customer_address] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[item] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter(i_item_sk IN (11, 13, 17, 19, 2, 23, 29, 3, 5, 7)) --------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query46.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query46.out index fea7c08e02..1d51cb96a2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query46.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query46.out @@ -2,22 +2,22 @@ -- !ds_shape_46 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) build RFs:RF5 ca_address_sk->[c_current_addr_sk] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ss_addr_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] ----------------------------------PhysicalProject @@ -25,22 +25,22 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter(s_city IN ('Fairview', 'Midway')) ----------------------------------------------PhysicalOlapScan[store] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter(d_dow IN (0, 6) and d_year IN (2000, 2001, 2002)) --------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter(((household_demographics.hd_dep_count = 8) OR (household_demographics.hd_vehicle_count = 0))) ----------------------------------------PhysicalOlapScan[household_demographics] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer_address] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query47.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query47.out index 13becca105..1ff72561a1 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query47.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query47.out @@ -8,9 +8,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] --------------PhysicalProject -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] @@ -19,32 +19,32 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((((date_dim.d_year = 2000) OR ((date_dim.d_year = 1999) AND (date_dim.d_moy = 12))) OR ((date_dim.d_year = 2001) AND (date_dim.d_moy = 1)))) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[item] --PhysicalResultSink ----PhysicalProject ------PhysicalTopN[MERGE_SORT] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((v1.i_brand = v1_lag.i_brand) and (v1.i_category = v1_lag.i_category) and (v1.rn = expr_(rn + 1)) and (v1.s_company_name = v1_lag.s_company_name) and (v1.s_store_name = v1_lag.s_store_name)) otherCondition=() ----------------hashJoin[INNER_JOIN] hashCondition=((v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1)) and (v1.s_company_name = v1_lead.s_company_name) and (v1.s_store_name = v1_lead.s_store_name)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000) and (v2.avg_monthly_sales > 0.0000) and (v2.d_year = 2000)) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query48.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query48.out index 1a75b584a2..2fcf8104b4 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query48.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query48.out @@ -2,7 +2,7 @@ -- !ds_shape_48 -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] @@ -10,24 +10,24 @@ PhysicalResultSink --------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=((((ca_state IN ('ND', 'NY', 'SD') AND ((store_sales.ss_net_profit >= 0.00) AND (store_sales.ss_net_profit <= 2000.00))) OR (ca_state IN ('GA', 'KS', 'MD') AND ((store_sales.ss_net_profit >= 150.00) AND (store_sales.ss_net_profit <= 3000.00)))) OR (ca_state IN ('CO', 'MN', 'NC') AND ((store_sales.ss_net_profit >= 50.00) AND (store_sales.ss_net_profit <= 25000.00))))) build RFs:RF1 ca_address_sk->[ss_addr_sk] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=((((((customer_demographics.cd_marital_status = 'S') AND (customer_demographics.cd_education_status = 'Secondary')) AND ((store_sales.ss_sales_price >= 100.00) AND (store_sales.ss_sales_price <= 150.00))) OR (((customer_demographics.cd_marital_status = 'M') AND (customer_demographics.cd_education_status = '2 yr Degree')) AND ((store_sales.ss_sales_price >= 50.00) AND (store_sales.ss_sales_price <= 100.00)))) OR (((customer_demographics.cd_marital_status = 'D') AND (customer_demographics.cd_education_status = 'Advanced Degree')) AND ((store_sales.ss_sales_price >= 150.00) AND (store_sales.ss_sales_price <= 200.00))))) build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] ------------------------PhysicalProject --------------------------filter((store_sales.ss_net_profit <= 25000.00) and (store_sales.ss_net_profit >= 0.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter(((((customer_demographics.cd_marital_status = 'S') AND (customer_demographics.cd_education_status = 'Secondary')) OR ((customer_demographics.cd_marital_status = 'M') AND (customer_demographics.cd_education_status = '2 yr Degree'))) OR ((customer_demographics.cd_marital_status = 'D') AND (customer_demographics.cd_education_status = 'Advanced Degree')))) ------------------------------PhysicalOlapScan[customer_demographics] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter(((ca_state IN ('ND', 'NY', 'SD') OR ca_state IN ('GA', 'KS', 'MD')) OR ca_state IN ('CO', 'MN', 'NC')) and (customer_address.ca_country = 'United States')) --------------------------PhysicalOlapScan[customer_address] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((date_dim.d_year = 2001)) ----------------------PhysicalOlapScan[date_dim] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalProject ----------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query49.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query49.out index ab1abc7bc9..6a040ee78b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query49.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query49.out @@ -2,24 +2,24 @@ -- !ds_shape_49 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------filter(((return_rank <= 10) OR (currency_rank <= 10))) ----------------------PhysicalWindow ------------------------PhysicalQuickSort[LOCAL_SORT] --------------------------PhysicalWindow ----------------------------PhysicalQuickSort[MERGE_SORT] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------PhysicalQuickSort[LOCAL_SORT] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number];RF2 ws_item_sk->[wr_item_sk] @@ -30,22 +30,22 @@ PhysicalResultSink ------------------------------------------------PhysicalProject --------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) ----------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) ------------------------------------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------filter(((return_rank <= 10) OR (currency_rank <= 10))) ----------------------PhysicalWindow ------------------------PhysicalQuickSort[LOCAL_SORT] --------------------------PhysicalWindow ----------------------------PhysicalQuickSort[MERGE_SORT] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------PhysicalQuickSort[LOCAL_SORT] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF4 cs_order_number->[cr_order_number];RF5 cs_item_sk->[cr_item_sk] @@ -56,22 +56,22 @@ PhysicalResultSink ------------------------------------------------PhysicalProject --------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) ----------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) ------------------------------------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------filter(((return_rank <= 10) OR (currency_rank <= 10))) ----------------------PhysicalWindow ------------------------PhysicalQuickSort[LOCAL_SORT] --------------------------PhysicalWindow ----------------------------PhysicalQuickSort[MERGE_SORT] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------PhysicalQuickSort[LOCAL_SORT] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF7 ss_ticket_number->[sr_ticket_number];RF8 ss_item_sk->[sr_item_sk] @@ -82,7 +82,7 @@ PhysicalResultSink ------------------------------------------------PhysicalProject --------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) ----------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) ------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query5.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query5.out index 9e38aadcf2..8a8f8b1180 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query5.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query5.out @@ -2,82 +2,82 @@ -- !ds_shape_5 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalUnion --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.store_sk = store.s_store_sk)) otherCondition=() --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk,sr_returned_date_sk] ------------------------------------PhysicalUnion ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk,cr_returned_date_sk] ------------------------------------PhysicalUnion ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF1 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[catalog_page] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.wsr_web_site_sk = web_site.web_site_sk)) otherCondition=() --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk,wr_returned_date_sk] ------------------------------------PhysicalUnion ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF2 wr_item_sk->[ws_item_sk];RF3 wr_order_number->[ws_order_number] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF4 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query50.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query50.out index 43aca8f6d6..40f241ec82 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query50.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query50.out @@ -2,10 +2,10 @@ -- !ds_shape_50 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------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] @@ -18,14 +18,14 @@ PhysicalResultSink --------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((d2.d_moy = 8) and (d2.d_year = 2001)) ----------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query51.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query51.out index ca96f0216a..7824ec86b7 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query51.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query51.out @@ -3,46 +3,46 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------filter((web_cumulative > store_cumulative)) --------------PhysicalWindow ----------------PhysicalQuickSort[LOCAL_SORT] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[FULL_OUTER_JOIN] hashCondition=((web.d_date = store.d_date) and (web.item_sk = store.item_sk)) otherCondition=() -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalWindow ------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_month_seq <= 1223) and (date_dim.d_month_seq >= 1212)) ----------------------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalWindow ------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_month_seq <= 1223) and (date_dim.d_month_seq >= 1212)) ----------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query52.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query52.out index 3486b154d0..e749a77bbf 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query52.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query52.out @@ -2,22 +2,22 @@ -- !ds_shape_52 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((item.i_manager_id = 1)) ----------------------------PhysicalOlapScan[item] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((dt.d_moy = 12) and (dt.d_year = 2000)) --------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query53.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query53.out index 9bde953f89..ad1f58a01a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query53.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query53.out @@ -3,16 +3,16 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------filter((if((avg_quarterly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_quarterly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_quarterly_sales), NULL) > 0.100000)) --------------PhysicalWindow ----------------PhysicalQuickSort[LOCAL_SORT] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------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] @@ -22,15 +22,15 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((((i_category IN ('Books', 'Children', 'Electronics') AND i_class IN ('personal', 'portable', 'reference', 'self-help')) AND i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')) OR ((i_category IN ('Men', 'Music', 'Women') AND i_class IN ('accessories', 'classical', 'fragrances', 'pants')) AND i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')))) ----------------------------------------------PhysicalOlapScan[item] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter(d_month_seq IN (1186, 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query54.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query54.out index 98696b80e4..a732fd81b3 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query54.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query54.out @@ -3,14 +3,14 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 ss_sold_date_sk->[d_date_sk] @@ -19,65 +19,65 @@ PhysicalResultSink --------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= (d_month_seq + 1)) ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF6 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalAssertNumRows ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------hashAgg[LOCAL] ----------------------------------------------PhysicalProject ------------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 1999)) --------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalAssertNumRows -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------hashAgg[GLOBAL] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------hashAgg[LOCAL] --------------------------------------------PhysicalProject ----------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 1999)) ------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((my_customers.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_county = store.s_county) and (customer_address.ca_state = store.s_state)) otherCondition=() build RFs:RF3 s_county->[ca_county];RF4 s_state->[ca_state] ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((my_customers.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 c_current_addr_sk->[ca_address_sk] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF2 RF3 RF4 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------hashAgg[GLOBAL] -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------------hashAgg[LOCAL] ----------------------------------------------------PhysicalProject ------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_customer_sk = cs_or_ws_sales.customer_sk)) otherCondition=() build RFs:RF1 customer_sk->[c_customer_sk] --------------------------------------------------------PhysicalProject ----------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 ---------------------------------------------------------PhysicalDistribute +--------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs_or_ws_sales.sold_date_sk = date_dim.d_date_sk)) otherCondition=() --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs_or_ws_sales.item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk,ws_item_sk] ------------------------------------------------------------------PhysicalUnion ---------------------------------------------------------------------PhysicalDistribute +--------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------------------------PhysicalProject ------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 ---------------------------------------------------------------------PhysicalDistribute +--------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------------------------PhysicalProject ------------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 -------------------------------------------------------------------PhysicalDistribute +------------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------------------------PhysicalProject ----------------------------------------------------------------------filter((item.i_category = 'Music') and (item.i_class = 'country')) ------------------------------------------------------------------------PhysicalOlapScan[item] ---------------------------------------------------------------PhysicalDistribute +--------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------------------------PhysicalProject ------------------------------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 1999)) --------------------------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query55.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query55.out index f961bf95b1..ef3c0fda10 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query55.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query55.out @@ -2,22 +2,22 @@ -- !ds_shape_55 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((item.i_manager_id = 52)) ----------------------------PhysicalOlapScan[item] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2000)) --------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query56.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query56.out index cb2499680c..e88a319658 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query56.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query56.out @@ -2,92 +2,92 @@ -- !ds_shape_56 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ss_addr_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2000)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[item] apply RFs: RF0 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter(i_color IN ('orchid', 'pink', 'powder')) ------------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------filter((customer_address.ca_gmt_offset = -6.00)) ----------------------------------PhysicalOlapScan[customer_address] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF7 ca_address_sk->[cs_bill_addr_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2000)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[item] apply RFs: RF4 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter(i_color IN ('orchid', 'pink', 'powder')) ------------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------filter((customer_address.ca_gmt_offset = -6.00)) ----------------------------------PhysicalOlapScan[customer_address] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF11 ws_bill_addr_sk->[ca_address_sk] ----------------------------PhysicalProject ------------------------------filter((customer_address.ca_gmt_offset = -6.00)) --------------------------------PhysicalOlapScan[customer_address] apply RFs: RF11 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ws_item_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2000)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[item] apply RFs: RF8 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter(i_color IN ('orchid', 'pink', 'powder')) ------------------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query57.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query57.out index 23f840ef0c..628a6aa98a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query57.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query57.out @@ -8,9 +8,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] --------------PhysicalProject -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk] @@ -19,32 +19,32 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((((date_dim.d_year = 2001) OR ((date_dim.d_year = 2000) AND (date_dim.d_moy = 12))) OR ((date_dim.d_year = 2002) AND (date_dim.d_moy = 1)))) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[call_center] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[item] --PhysicalResultSink ----PhysicalProject ------PhysicalTopN[MERGE_SORT] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((v1.cc_name = v1_lag.cc_name) and (v1.i_brand = v1_lag.i_brand) and (v1.i_category = v1_lag.i_category) and (v1.rn = expr_(rn + 1))) otherCondition=() ----------------hashJoin[INNER_JOIN] hashCondition=((v1.cc_name = v1_lead.cc_name) and (v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1))) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000) and (v2.avg_monthly_sales > 0.0000) and (v2.d_year = 2001)) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query58.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query58.out index d8287208a5..c18a9cf868 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query58.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query58.out @@ -3,97 +3,97 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((ss_items.item_id = ws_items.item_id)) otherCondition=((cast(cs_item_rev as DOUBLE) <= cast((1.1 * ws_item_rev) as DOUBLE)) and (cast(cs_item_rev as DOUBLE) >= cast((0.9 * ws_item_rev) as DOUBLE)) and (cast(ss_item_rev as DOUBLE) <= cast((1.1 * ws_item_rev) as DOUBLE)) and (cast(ss_item_rev as DOUBLE) >= cast((0.9 * ws_item_rev) as DOUBLE)) and (cast(ws_item_rev as DOUBLE) <= cast((1.1 * cs_item_rev) as DOUBLE)) and (cast(ws_item_rev as DOUBLE) <= cast((1.1 * ss_item_rev) as DOUBLE)) and (cast(ws_item_rev as DOUBLE) >= cast((0.9 * cs_item_rev) as DOUBLE)) and (cast(ws_item_rev as DOUBLE) >= cast((0.9 * ss_item_rev) as DOUBLE))) build RFs:RF13 item_id->[i_item_id] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF12 i_item_sk->[ws_item_sk] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[ws_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF11 RF12 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF10 d_date->[d_date] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF10 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF9 d_week_seq->[d_week_seq] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalAssertNumRows -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_date = '2001-06-16')) ----------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[item] apply RFs: RF13 --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((ss_items.item_id = cs_items.item_id)) otherCondition=((cast(cs_item_rev as DOUBLE) <= cast((1.1 * ss_item_rev) as DOUBLE)) and (cast(cs_item_rev as DOUBLE) >= cast((0.9 * ss_item_rev) as DOUBLE)) and (cast(ss_item_rev as DOUBLE) <= cast((1.1 * cs_item_rev) as DOUBLE)) and (cast(ss_item_rev as DOUBLE) >= cast((0.9 * cs_item_rev) as DOUBLE))) build RFs:RF8 item_id->[i_item_id] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[ss_item_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalAssertNumRows ---------------------------------------------------PhysicalDistribute +--------------------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------------------PhysicalProject ------------------------------------------------------filter((date_dim.d_date = '2001-06-16')) --------------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] apply RFs: RF8 ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[cs_item_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalAssertNumRows ---------------------------------------------------PhysicalDistribute +--------------------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------------------PhysicalProject ------------------------------------------------------filter((date_dim.d_date = '2001-06-16')) --------------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query59.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query59.out index 518f193edf..df00924922 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query59.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query59.out @@ -4,48 +4,48 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------PhysicalProject ------------------PhysicalOlapScan[store_sales] apply RFs: RF0 -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalProject ------PhysicalTopN[MERGE_SORT] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(d_week_seq2 - 52)) and (y.s_store_id1 = x.s_store_id2)) otherCondition=() -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((wss.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF4 s_store_sk->[ss_store_sk] ----------------------hashJoin[INNER_JOIN] hashCondition=((d.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF3 d_week_seq->[d_week_seq] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------------PhysicalProject ----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((d.d_month_seq <= 1206) and (d.d_month_seq >= 1195)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((wss.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] ----------------------hashJoin[INNER_JOIN] hashCondition=((d.d_week_seq = d_week_seq2)) otherCondition=() build RFs:RF1 d_week_seq->[d_week_seq] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------------PhysicalProject ----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((d.d_month_seq <= 1218) and (d.d_month_seq >= 1207)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query6.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query6.out index 8d2f765589..b09c0da2bb 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query6.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query6.out @@ -2,52 +2,52 @@ -- !ds_shape_6 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------filter((cnt >= 10)) ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((s.ss_item_sk = i.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((s.ss_sold_date_sk = d.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 RF5 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((d.d_month_seq = date_dim.d_month_seq)) otherCondition=() build RFs:RF2 d_month_seq->[d_month_seq] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF2 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalAssertNumRows -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------------hashAgg[GLOBAL] ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------hashAgg[LOCAL] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2002)) ----------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[INNER_JOIN] hashCondition=((j.i_category = i.i_category)) otherCondition=((cast(i_current_price as DECIMALV3(38, 5)) > (1.2 * avg(cast(i_current_price as DECIMALV3(9, 4)))))) build RFs:RF1 i_category->[i_category] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] apply RFs: RF1 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------hashAgg[LOCAL] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[item] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query60.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query60.out index 2d0b2f3b58..48b51f028e 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query60.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query60.out @@ -2,99 +2,99 @@ -- !ds_shape_60 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ss_addr_sk] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_moy = 10) and (date_dim.d_year = 2000)) ----------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ----------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] apply RFs: RF0 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Jewelry')) --------------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[cs_bill_addr_sk] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_moy = 10) and (date_dim.d_year = 2000)) ----------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ----------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] apply RFs: RF4 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Jewelry')) --------------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_bill_addr_sk] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 RF11 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_moy = 10) and (date_dim.d_year = 2000)) ----------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ----------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] apply RFs: RF8 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Jewelry')) --------------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query61.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query61.out index 8ae207e508..6501fbc1a2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query61.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query61.out @@ -6,20 +6,20 @@ PhysicalResultSink ------PhysicalTopN[LOCAL_SORT] --------NestedLoopJoin[CROSS_JOIN] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF10 c_current_addr_sk->[ca_address_sk] --------------------PhysicalProject ----------------------filter((customer_address.ca_gmt_offset = -7.00)) ------------------------PhysicalOlapScan[customer_address] apply RFs: RF10 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF9 ss_customer_sk->[c_customer_sk] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer] apply RFs: RF9 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF8 s_store_sk->[ss_store_sk] --------------------------------PhysicalProject @@ -28,54 +28,54 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF6 RF7 RF8 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) ----------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((item.i_category = 'Home')) --------------------------------------------PhysicalOlapScan[item] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((((promotion.p_channel_dmail = 'Y') OR (promotion.p_channel_email = 'Y')) OR (promotion.p_channel_tv = 'Y'))) ------------------------------------------PhysicalOlapScan[promotion] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((store.s_gmt_offset = -7.00)) --------------------------------------PhysicalOlapScan[store] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecReplicated] ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF4 s_store_sk->[ss_store_sk] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Home')) --------------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------filter((customer_address.ca_gmt_offset = -7.00)) ------------------------------------PhysicalOlapScan[customer_address] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((store.s_gmt_offset = -7.00)) ----------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query62.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query62.out index 38382a7656..1a451677dc 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query62.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query62.out @@ -2,10 +2,10 @@ -- !ds_shape_62 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF3 w_warehouse_sk->[ws_warehouse_sk] @@ -15,17 +15,17 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_ship_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 RF3 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_month_seq <= 1234) and (date_dim.d_month_seq >= 1223)) --------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_site] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[ship_mode] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[warehouse] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query63.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query63.out index 2acbabfdb2..d6049c12c5 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query63.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query63.out @@ -2,16 +2,16 @@ -- !ds_shape_63 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000)) ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------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] @@ -21,15 +21,15 @@ PhysicalResultSink ------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((((i_category IN ('Books', 'Children', 'Electronics') AND i_class IN ('personal', 'portable', 'reference', 'self-help')) AND i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')) OR ((i_category IN ('Men', 'Music', 'Women') AND i_class IN ('accessories', 'classical', 'fragrances', 'pants')) AND i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')))) --------------------------------------------PhysicalOlapScan[item] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter(d_month_seq IN (1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232, 1233)) ----------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query64.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query64.out index c3bbdf56e2..9a6915fe83 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query64.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query64.out @@ -4,59 +4,59 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) --PhysicalCteProducer ( cteId=CTEId#1 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((customer.c_first_shipto_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF19 d_date_sk->[c_first_shipto_date_sk] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=(( not (cd_marital_status = cd_marital_status))) build RFs:RF18 ss_customer_sk->[c_customer_sk] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = ad2.ca_address_sk)) otherCondition=() build RFs:RF17 ca_address_sk->[c_current_addr_sk] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() build RFs:RF16 cd_demo_sk->[c_current_cdemo_sk] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_first_sales_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF15 d_date_sk->[c_first_sales_date_sk] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_hdemo_sk = hd2.hd_demo_sk)) otherCondition=() build RFs:RF14 hd_demo_sk->[c_current_hdemo_sk] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[customer] apply RFs: RF14 RF15 RF16 RF17 RF18 RF19 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((hd2.hd_income_band_sk = ib2.ib_income_band_sk)) otherCondition=() build RFs:RF13 ib_income_band_sk->[hd_income_band_sk] ------------------------------------------------PhysicalProject --------------------------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF13 -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------PhysicalProject ----------------------------------------------------PhysicalOlapScan[income_band] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[customer_demographics] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer_address] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF11 ss_item_sk->[sr_item_sk];RF12 ss_ticket_number->[sr_ticket_number] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_returns] apply RFs: RF11 RF12 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF10 cs_item_sk->[ss_item_sk] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF9 p_promo_sk->[ss_promo_sk] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF8 cd_demo_sk->[ss_cdemo_sk] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = ad1.ca_address_sk)) otherCondition=() build RFs:RF7 ca_address_sk->[ss_addr_sk] -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[ss_item_sk] ----------------------------------------------------PhysicalProject ------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] @@ -68,36 +68,36 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) ------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------------------------------------------PhysicalProject ----------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 RF5 RF6 RF7 RF8 RF9 RF10 ---------------------------------------------------------------------PhysicalDistribute +--------------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------------------------------PhysicalProject ------------------------------------------------------------------------filter(d_year IN (1999, 2000)) --------------------------------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------------------------------------PhysicalDistribute +----------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------------------------PhysicalProject --------------------------------------------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF4 -------------------------------------------------------------PhysicalDistribute +------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------PhysicalOlapScan[income_band] ---------------------------------------------------------PhysicalDistribute +--------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------PhysicalOlapScan[store] -----------------------------------------------------PhysicalDistribute +----------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------------PhysicalProject --------------------------------------------------------filter((item.i_current_price <= 58.00) and (item.i_current_price >= 49.00) and i_color IN ('blush', 'lace', 'lawn', 'misty', 'orange', 'pink')) ----------------------------------------------------------PhysicalOlapScan[item] -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------------PhysicalProject ----------------------------------------------------PhysicalOlapScan[customer_address] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[customer_demographics] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[promotion] --------------------------------PhysicalProject ----------------------------------filter((sale > (2 * refund))) ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF0 cr_order_number->[cs_order_number];RF1 cr_item_sk->[cs_item_sk] @@ -105,20 +105,20 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) ------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[catalog_returns] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((cs1.item_sk = cs2.item_sk) and (cs1.store_name = cs2.store_name) and (cs1.store_zip = cs2.store_zip)) otherCondition=((cs2.cnt <= cs1.cnt)) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((cs1.syear = 1999)) --------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((cs2.syear = 2000)) --------------------PhysicalCteConsumer ( cteId=CTEId#1 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query65.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query65.out index 325fea04dd..f989ea968c 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query65.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query65.out @@ -2,45 +2,45 @@ -- !ds_shape_65 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] ------------------hashJoin[INNER_JOIN] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DOUBLE) <= cast((0.1 * ave) as DOUBLE))) build RFs:RF2 ss_store_sk->[ss_store_sk] --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_month_seq <= 1187) and (date_dim.d_month_seq >= 1176)) ------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_month_seq <= 1187) and (date_dim.d_month_seq >= 1176)) ----------------------------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[store] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query66.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query66.out index d1d3def692..0dea0ff843 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query66.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query66.out @@ -2,15 +2,15 @@ -- !ds_shape_66 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF3 w_warehouse_sk->[ws_warehouse_sk] @@ -21,24 +21,24 @@ PhysicalResultSink ------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF0 sm_ship_mode_sk->[ws_ship_mode_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 RF3 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter(sm_carrier IN ('BOXBUNDLES', 'ORIENTAL')) --------------------------------------------PhysicalOlapScan[ship_mode] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_year = 2001)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((cast(t_time as BIGINT) <= 71770) and (time_dim.t_time >= 42970)) --------------------------------------PhysicalOlapScan[time_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[warehouse] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF7 w_warehouse_sk->[cs_warehouse_sk] @@ -49,19 +49,19 @@ PhysicalResultSink ------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF4 sm_ship_mode_sk->[cs_ship_mode_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 RF6 RF7 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter(sm_carrier IN ('BOXBUNDLES', 'ORIENTAL')) --------------------------------------------PhysicalOlapScan[ship_mode] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_year = 2001)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((cast(t_time as BIGINT) <= 71770) and (time_dim.t_time >= 42970)) --------------------------------------PhysicalOlapScan[time_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[warehouse] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query67.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query67.out index f0f7bc4db0..8704ff806e 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query67.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query67.out @@ -2,16 +2,16 @@ -- !ds_shape_67 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------filter((rk <= 100)) ----------PhysicalWindow ------------PhysicalPartitionTopN ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalPartitionTopN ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalRepeat ----------------------------PhysicalProject @@ -22,14 +22,14 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_month_seq <= 1228) and (date_dim.d_month_seq >= 1217)) ----------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query68.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query68.out index f6085d61fb..a8a295480f 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query68.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query68.out @@ -2,26 +2,26 @@ -- !ds_shape_68 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) build RFs:RF5 c_current_addr_sk->[ca_address_sk] ------------PhysicalProject --------------PhysicalOlapScan[customer_address] apply RFs: RF5 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[customer] apply RFs: RF4 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ss_addr_sk->[ca_address_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] ----------------------------------PhysicalProject @@ -30,15 +30,15 @@ PhysicalResultSink ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter((date_dim.d_dom <= 2) and (date_dim.d_dom >= 1) and d_year IN (1998, 1999, 2000)) ------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter(s_city IN ('Fairview', 'Midway')) --------------------------------------------PhysicalOlapScan[store] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter(((household_demographics.hd_dep_count = 3) OR (household_demographics.hd_vehicle_count = 4))) ----------------------------------------PhysicalOlapScan[household_demographics] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query69.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query69.out index c77fe59eb2..5d1577d849 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query69.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query69.out @@ -3,55 +3,55 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF7 c_customer_sk->[ss_customer_sk] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2002)) --------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject ----------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[cs_ship_customer_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2002)) ------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF3 c_current_cdemo_sk->[cd_demo_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF3 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ws_bill_customer_sk] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2002)) --------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------filter(ca_state IN ('IL', 'ME', 'TX')) ------------------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query7.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query7.out index 379ab9b02e..11d575eff5 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query7.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query7.out @@ -2,14 +2,14 @@ -- !ds_shape_7 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF2 p_promo_sk->[ss_promo_sk] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] @@ -17,19 +17,19 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((customer_demographics.cd_education_status = 'College') and (customer_demographics.cd_gender = 'F') and (customer_demographics.cd_marital_status = 'W')) ------------------------------------PhysicalOlapScan[customer_demographics] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_year = 2001)) --------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter(((promotion.p_channel_email = 'N') OR (promotion.p_channel_event = 'N'))) ----------------------------PhysicalOlapScan[promotion] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query70.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query70.out index c97bf0d80a..1123317f15 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query70.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query70.out @@ -3,15 +3,15 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalRepeat ----------------------------PhysicalProject @@ -20,35 +20,35 @@ PhysicalResultSink ----------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((d1.d_month_seq <= 1231) and (d1.d_month_seq >= 1220)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((store.s_state = tmp1.s_state)) otherCondition=() build RFs:RF2 s_state->[s_state] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store] apply RFs: RF2 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((ranking <= 5)) ------------------------------------------PhysicalWindow --------------------------------------------PhysicalPartitionTopN -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------PhysicalPartitionTopN --------------------------------------------------PhysicalProject ----------------------------------------------------hashAgg[GLOBAL] -------------------------------------------------------PhysicalDistribute +------------------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------------------hashAgg[LOCAL] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] --------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------------------------------PhysicalProject ------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------------------------------------------------PhysicalDistribute +----------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------------------------PhysicalProject --------------------------------------------------------------------filter((date_dim.d_month_seq <= 1231) and (date_dim.d_month_seq >= 1220)) ----------------------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------------------------------PhysicalDistribute +--------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------------------------PhysicalProject ------------------------------------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query71.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query71.out index 9bdb925a31..697c9da869 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query71.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query71.out @@ -2,49 +2,49 @@ -- !ds_shape_71 -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((tmp.time_sk = time_dim.t_time_sk)) otherCondition=() --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((tmp.sold_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ws_item_sk,cs_item_sk,ss_item_sk] ------------------------PhysicalUnion ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF3 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2002)) --------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF3 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2002)) --------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2002)) --------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((item.i_manager_id = 1)) ------------------------------PhysicalOlapScan[item] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter(t_meal_time IN ('breakfast', 'dinner')) --------------------------PhysicalOlapScan[time_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query72.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query72.out index 88b80237c4..6ec1d4a151 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query72.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query72.out @@ -2,64 +2,64 @@ -- !ds_shape_72 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((warehouse.w_warehouse_sk = inventory.inv_warehouse_sk)) otherCondition=() build RFs:RF10 w_warehouse_sk->[inv_warehouse_sk] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = inventory.inv_item_sk) and (inventory.inv_date_sk = d2.d_date_sk)) otherCondition=((inventory.inv_quantity_on_hand < catalog_sales.cs_quantity)) build RFs:RF8 d_date_sk->[inv_date_sk];RF9 cs_item_sk->[inv_item_sk] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalOlapScan[inventory] apply RFs: RF8 RF9 RF10 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_week_seq = d2.d_week_seq)) otherCondition=() build RFs:RF7 d_week_seq->[d_week_seq] ----------------------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((catalog_returns.cr_item_sk = catalog_sales.cs_item_sk) and (catalog_returns.cr_order_number = catalog_sales.cs_order_number)) otherCondition=() build RFs:RF5 cs_item_sk->[cr_item_sk];RF6 cs_order_number->[cr_order_number] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF5 RF6 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[cs_item_sk] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF3 cd_demo_sk->[cs_bill_cdemo_sk] -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[cs_bill_hdemo_sk] --------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_ship_date_sk = d3.d_date_sk) and (catalog_sales.cs_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_ship_date_sk];RF1 d_date_sk->[cs_sold_date_sk] -----------------------------------------------------PhysicalDistribute +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------------PhysicalProject --------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 -----------------------------------------------------PhysicalDistribute +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------------NestedLoopJoin[INNER_JOIN](d3.d_date > days_add(d_date, INTERVAL 5 DAY)) --------------------------------------------------------PhysicalProject ----------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------------------------PhysicalDistribute +--------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((d1.d_year = 1998)) --------------------------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF7 ---------------------------------------------------PhysicalDistribute +--------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------------PhysicalProject ------------------------------------------------------filter((household_demographics.hd_buy_potential = '1001-5000')) --------------------------------------------------------PhysicalOlapScan[household_demographics] -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------PhysicalProject --------------------------------------------------filter((customer_demographics.cd_marital_status = 'S')) ----------------------------------------------------PhysicalOlapScan[customer_demographics] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[promotion] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[warehouse] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query73.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query73.out index 68ad77810a..aa6067b108 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query73.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query73.out @@ -2,16 +2,16 @@ -- !ds_shape_73 -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((dj.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk] ------------PhysicalProject --------------PhysicalOlapScan[customer] apply RFs: RF3 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------filter((dj.cnt <= 5) and (dj.cnt >= 1)) ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] @@ -21,15 +21,15 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_dom <= 2) and (date_dim.d_dom >= 1) and d_year IN (2000, 2001, 2002)) ----------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((store.s_county = 'Williamson County')) ------------------------------------PhysicalOlapScan[store] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1) and hd_buy_potential IN ('1001-5000', '5001-10000')) --------------------------------PhysicalOlapScan[household_demographics] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query74.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query74.out index 9351a1e3ec..e7772ca5ec 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query74.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query74.out @@ -4,57 +4,57 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((PULL_UP_UNIFIED_OUTPUT_ALIAS = customer.c_customer_sk)) otherCondition=() ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalUnion --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000)) --------------------------------PhysicalOlapScan[date_dim] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000)) --------------------------------PhysicalOlapScan[date_dim] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[customer] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(13, 8)) / year_total), NULL) > if((year_total > 0.00), (cast(year_total as DECIMALV3(13, 8)) / year_total), NULL))) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year = 1999) and (t_w_firstyear.year_total > 0.00)) --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=() ----------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((t_s_firstyear.sale_type = 's') and (t_s_firstyear.year = 1999) and (t_s_firstyear.year_total > 0.00)) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((t_s_secyear.sale_type = 's') and (t_s_secyear.year = 2000)) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000)) ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query75.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query75.out index f1b93b839d..d583989b3e 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query75.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query75.out @@ -3,13 +3,13 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalUnion -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------PhysicalProject ----------------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF2 cs_order_number->[cr_order_number];RF3 cs_item_sk->[cr_item_sk] ------------------------PhysicalProject @@ -20,15 +20,15 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Sports')) --------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter(d_year IN (2001, 2002)) ----------------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------PhysicalProject ----------------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF6 ss_ticket_number->[sr_ticket_number];RF7 ss_item_sk->[sr_item_sk] ------------------------PhysicalProject @@ -39,15 +39,15 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Sports')) --------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter(d_year IN (2001, 2002)) ----------------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------PhysicalProject ----------------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF10 ws_order_number->[wr_order_number];RF11 ws_item_sk->[wr_item_sk] ------------------------PhysicalProject @@ -58,24 +58,24 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF8 i_item_sk->[ws_item_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Sports')) --------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter(d_year IN (2001, 2002)) ----------------------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((curr_yr.i_brand_id = prev_yr.i_brand_id) and (curr_yr.i_category_id = prev_yr.i_category_id) and (curr_yr.i_class_id = prev_yr.i_class_id) and (curr_yr.i_manufact_id = prev_yr.i_manufact_id)) otherCondition=(((cast(cast(sales_cnt as DECIMALV3(17, 2)) as DECIMALV3(23, 8)) / cast(sales_cnt as DECIMALV3(17, 2))) < 0.900000)) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------filter((curr_yr.d_year = 2002)) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------filter((prev_yr.d_year = 2001)) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query76.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query76.out index 3f46749fc6..23da060435 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query76.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query76.out @@ -2,51 +2,51 @@ -- !ds_shape_76 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] ----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------PhysicalProject --------------------------filter(ss_customer_sk IS NULL) ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[item] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 ws_item_sk->[i_item_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] apply RFs: RF3 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------filter(ws_promo_sk IS NULL) --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[cs_item_sk] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter(cs_bill_customer_sk IS NULL) ------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query77.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query77.out index 3d92651cb7..6c6f651e93 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query77.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query77.out @@ -2,11 +2,11 @@ -- !ds_shape_77 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalUnion @@ -14,7 +14,7 @@ PhysicalResultSink ----------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((ss.s_store_sk = sr.s_store_sk)) otherCondition=() ------------------------PhysicalProject --------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] @@ -22,16 +22,16 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_date <= '2000-09-09') and (date_dim.d_date >= '2000-08-10')) ----------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store] ------------------------PhysicalProject --------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[sr_store_sk] @@ -39,37 +39,37 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF1 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_date <= '2000-09-09') and (date_dim.d_date >= '2000-08-10')) ----------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store] --------------------PhysicalProject ----------------------NestedLoopJoin[CROSS_JOIN] ------------------------PhysicalProject --------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_date <= '2000-09-09') and (date_dim.d_date >= '2000-08-10')) ------------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------hashAgg[GLOBAL] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashAgg[LOCAL] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cr_returned_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_date <= '2000-09-09') and (date_dim.d_date >= '2000-08-10')) --------------------------------------------PhysicalOlapScan[date_dim] @@ -77,7 +77,7 @@ PhysicalResultSink ----------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((ws.wp_web_page_sk = wr.wp_web_page_sk)) otherCondition=() ------------------------PhysicalProject --------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF9 wp_web_page_sk->[ws_web_page_sk] @@ -85,16 +85,16 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_date <= '2000-09-09') and (date_dim.d_date >= '2000-08-10')) ----------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_page] ------------------------PhysicalProject --------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF7 wp_web_page_sk->[wr_web_page_sk] @@ -102,11 +102,11 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[wr_returned_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 RF7 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_date <= '2000-09-09') and (date_dim.d_date >= '2000-08-10')) ----------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_page] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query78.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query78.out index 80cfb60d51..f646302500 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query78.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query78.out @@ -2,7 +2,7 @@ -- !ds_shape_78 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------filter(((coalesce(ws_qty, 0) > 0) OR (coalesce(cs_qty, 0) > 0))) @@ -11,14 +11,14 @@ PhysicalResultSink ----------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((ws.ws_customer_sk = ss.ss_customer_sk) and (ws.ws_item_sk = ss.ss_item_sk) and (ws.ws_sold_year = ss.ss_sold_year)) otherCondition=() ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((store_returns.sr_ticket_number = store_sales.ss_ticket_number) and (store_sales.ss_item_sk = store_returns.sr_item_sk)) otherCondition=() ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_year = 1998)) --------------------------------------PhysicalOlapScan[date_dim] @@ -26,14 +26,14 @@ PhysicalResultSink --------------------------------PhysicalOlapScan[store_returns] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((web_returns.wr_order_number = web_sales.ws_order_number) and (web_sales.ws_item_sk = web_returns.wr_item_sk)) otherCondition=() ------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_year = 1998)) --------------------------------------PhysicalOlapScan[date_dim] @@ -41,14 +41,14 @@ PhysicalResultSink --------------------------------PhysicalOlapScan[web_returns] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((catalog_returns.cr_order_number = catalog_sales.cs_order_number) and (catalog_sales.cs_item_sk = catalog_returns.cr_item_sk)) otherCondition=() --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_year = 1998)) ----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query79.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query79.out index 9faec387ef..4f0ef60be4 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query79.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query79.out @@ -2,14 +2,14 @@ -- !ds_shape_79 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((ms.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------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] @@ -18,19 +18,19 @@ PhysicalResultSink ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_dow = 1) and d_year IN (2000, 2001, 2002)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter(((household_demographics.hd_dep_count = 7) OR (household_demographics.hd_vehicle_count > -1))) ----------------------------------PhysicalOlapScan[household_demographics] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((store.s_number_employees <= 295) and (store.s_number_employees >= 200)) --------------------------------PhysicalOlapScan[store] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query8.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query8.out index d3da9091cd..28aa0fc244 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query8.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query8.out @@ -2,10 +2,10 @@ -- !ds_shape_8 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((expr_substring(s_zip, 1, 2) = expr_substring(ca_zip, 1, 2))) otherCondition=() @@ -15,31 +15,31 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_qoy = 2) and (date_dim.d_year = 1998)) --------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalIntersect -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) ------------------------------PhysicalOlapScan[customer_address] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter((cnt > 10)) ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 c_current_addr_sk->[ca_address_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF0 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------filter((customer.c_preferred_cust_flag = 'Y')) ----------------------------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query80.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query80.out index cb9d14fbfa..88976f6717 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query80.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query80.out @@ -2,114 +2,114 @@ -- !ds_shape_80 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalUnion --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF4 ss_item_sk->[sr_item_sk];RF5 ss_ticket_number->[sr_ticket_number] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF4 RF5 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF1 p_promo_sk->[ss_promo_sk] ----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------------------------PhysicalProject --------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((date_dim.d_date <= '2002-09-13') and (date_dim.d_date >= '2002-08-14')) ------------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((promotion.p_channel_tv = 'N')) ----------------------------------------------------PhysicalOlapScan[promotion] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------filter((item.i_current_price > 50.00)) ----------------------------------------------PhysicalOlapScan[item] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_catalog_page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() build RFs:RF11 cp_catalog_page_sk->[cs_catalog_page_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF9 cs_item_sk->[cr_item_sk];RF10 cs_order_number->[cr_order_number] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF9 RF10 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF8 i_item_sk->[cs_item_sk] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF7 p_promo_sk->[cs_promo_sk] ----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[cs_sold_date_sk] ------------------------------------------------PhysicalProject --------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF6 RF7 RF8 RF11 -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((date_dim.d_date <= '2002-09-13') and (date_dim.d_date >= '2002-08-14')) ------------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((promotion.p_channel_tv = 'N')) ----------------------------------------------------PhysicalOlapScan[promotion] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------filter((item.i_current_price > 50.00)) ----------------------------------------------PhysicalOlapScan[item] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[catalog_page] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF16 ws_item_sk->[wr_item_sk];RF17 ws_order_number->[wr_order_number] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF16 RF17 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF15 web_site_sk->[ws_web_site_sk] --------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF14 i_item_sk->[ws_item_sk] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF13 p_promo_sk->[ws_promo_sk] ----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF12 d_date_sk->[ws_sold_date_sk] ------------------------------------------------PhysicalProject --------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF12 RF13 RF14 RF15 -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((date_dim.d_date <= '2002-09-13') and (date_dim.d_date >= '2002-08-14')) ------------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((promotion.p_channel_tv = 'N')) ----------------------------------------------------PhysicalOlapScan[promotion] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------filter((item.i_current_price > 50.00)) ----------------------------------------------PhysicalOlapScan[item] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query81.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query81.out index 790f28564f..fd5bbc4f40 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query81.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query81.out @@ -4,46 +4,46 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[cr_returning_addr_sk] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cr_returned_date_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_year = 2001)) ----------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[customer_address] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE))) --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ctr_customer_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[c_current_addr_sk] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer] apply RFs: RF2 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((customer_address.ca_state = 'TN')) ----------------------------PhysicalOlapScan[customer_address] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------------PhysicalProject --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query82.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query82.out index d2ccfa12d1..be138099e1 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query82.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query82.out @@ -2,16 +2,16 @@ -- !ds_shape_82 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] ------------------PhysicalProject --------------------PhysicalOlapScan[store_sales] apply RFs: RF2 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] ------------------------PhysicalProject @@ -19,11 +19,11 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------filter((inventory.inv_quantity_on_hand <= 500) and (inventory.inv_quantity_on_hand >= 100)) --------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((item.i_current_price <= 88.00) and (item.i_current_price >= 58.00) and i_manufact_id IN (259, 485, 559, 580)) ----------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_date <= '2001-03-14') and (date_dim.d_date >= '2001-01-13')) ------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query83.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query83.out index 4884777998..7bff21f917 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query83.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query83.out @@ -3,90 +3,90 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((sr_items.item_id = cr_items.item_id)) otherCondition=() build RFs:RF13 item_id->[i_item_id] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF12 i_item_sk->[cr_item_sk] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[cr_returned_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF11 RF12 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF10 d_date->[d_date] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF10 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF9 d_week_seq->[d_week_seq] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter(d_date IN ('2001-07-13', '2001-09-10', '2001-11-16')) ------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[item] apply RFs: RF13 --------------hashJoin[INNER_JOIN] hashCondition=((sr_items.item_id = wr_items.item_id)) otherCondition=() build RFs:RF8 item_id->[i_item_id] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[sr_item_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[sr_returned_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 RF7 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalProject ------------------------------------------------filter(d_date IN ('2001-07-13', '2001-09-10', '2001-11-16')) --------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[item] apply RFs: RF8 ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[wr_item_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[wr_returned_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[web_returns] apply RFs: RF2 RF3 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalProject ------------------------------------------------filter(d_date IN ('2001-07-13', '2001-09-10', '2001-11-16')) --------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query84.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query84.out index 92577d97ae..0f6c39c0d1 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query84.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query84.out @@ -2,33 +2,33 @@ -- !ds_shape_84 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF4 cd_demo_sk->[sr_cdemo_sk] ------------PhysicalProject --------------PhysicalOlapScan[store_returns] apply RFs: RF4 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF3 c_current_cdemo_sk->[cd_demo_sk] ------------------PhysicalProject --------------------PhysicalOlapScan[customer_demographics] apply RFs: RF3 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[c_current_hdemo_sk] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer] apply RFs: RF1 RF2 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((customer_address.ca_city = 'Woodland')) ----------------------------------PhysicalOlapScan[customer_address] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------hashJoin[INNER_JOIN] hashCondition=((income_band.ib_income_band_sk = household_demographics.hd_income_band_sk)) otherCondition=() build RFs:RF0 ib_income_band_sk->[hd_income_band_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((cast(ib_upper_bound as BIGINT) <= 110306) and (income_band.ib_lower_bound >= 60306)) ----------------------------------PhysicalOlapScan[income_band] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query85.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query85.out index 6d3a45d8a5..b120d3ff5e 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query85.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query85.out @@ -2,11 +2,11 @@ -- !ds_shape_85 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((reason.r_reason_sk = web_returns.wr_reason_sk)) otherCondition=() build RFs:RF9 r_reason_sk->[wr_reason_sk] @@ -15,20 +15,20 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------filter(((ca_state IN ('IA', 'NC', 'TX') OR ca_state IN ('GA', 'WI', 'WV')) OR ca_state IN ('KY', 'OK', 'VA')) and (customer_address.ca_country = 'United States')) ----------------------------PhysicalOlapScan[customer_address] apply RFs: RF8 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF7 ws_web_page_sk->[wp_web_page_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_page] apply RFs: RF7 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((cd1.cd_education_status = cd2.cd_education_status) and (cd1.cd_marital_status = cd2.cd_marital_status) and (cd2.cd_demo_sk = web_returns.wr_returning_cdemo_sk)) otherCondition=() build RFs:RF4 cd_marital_status->[cd_marital_status];RF5 cd_education_status->[cd_education_status];RF6 wr_returning_cdemo_sk->[cd_demo_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF4 RF5 RF6 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk)) otherCondition=((((((cd1.cd_marital_status = 'D') AND (cd1.cd_education_status = 'Primary')) AND ((web_sales.ws_sales_price >= 100.00) AND (web_sales.ws_sales_price <= 150.00))) OR (((cd1.cd_marital_status = 'S') AND (cd1.cd_education_status = 'College')) AND ((web_sales.ws_sales_price >= 50.00) AND (web_sales.ws_sales_price <= 100.00)))) OR (((cd1.cd_marital_status = 'U') AND (cd1.cd_education_status = 'Advanced Degree')) AND ((web_sales.ws_sales_price >= 150.00) AND (web_sales.ws_sales_price <= 200.00))))) build RFs:RF3 cd_demo_sk->[wr_refunded_cdemo_sk] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF1 ws_item_sk->[wr_item_sk];RF2 ws_order_number->[wr_order_number] ------------------------------------------------PhysicalProject @@ -37,15 +37,15 @@ PhysicalResultSink --------------------------------------------------PhysicalProject ----------------------------------------------------filter((web_sales.ws_net_profit <= 300.00) and (web_sales.ws_net_profit >= 50.00) and (web_sales.ws_sales_price <= 200.00) and (web_sales.ws_sales_price >= 50.00)) ------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 ---------------------------------------------------PhysicalDistribute +--------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------------PhysicalProject ------------------------------------------------------filter((date_dim.d_year = 1998)) --------------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------filter(((((cd1.cd_marital_status = 'D') AND (cd1.cd_education_status = 'Primary')) OR ((cd1.cd_marital_status = 'S') AND (cd1.cd_education_status = 'College'))) OR ((cd1.cd_marital_status = 'U') AND (cd1.cd_education_status = 'Advanced Degree')))) ------------------------------------------------PhysicalOlapScan[customer_demographics] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[reason] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query86.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query86.out index b846663916..66cf7a9899 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query86.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query86.out @@ -3,15 +3,15 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalRepeat ----------------------------PhysicalProject @@ -20,11 +20,11 @@ PhysicalResultSink ----------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((d1.d_month_seq <= 1197) and (d1.d_month_seq >= 1186)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query87.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query87.out index 8d28654a2a..bb52cda658 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query87.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query87.out @@ -2,62 +2,62 @@ -- !ds_shape_87 -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------PhysicalExcept ------------PhysicalProject --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_month_seq <= 1213) and (date_dim.d_month_seq >= 1202)) ------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[customer] ------------PhysicalProject --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_month_seq <= 1213) and (date_dim.d_month_seq >= 1202)) ------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[customer] ------------PhysicalProject --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_month_seq <= 1213) and (date_dim.d_month_seq >= 1202)) ------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[customer] 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 60fa7263b8..da83a96f51 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 @@ -10,7 +10,7 @@ PhysicalResultSink --------------NestedLoopJoin[CROSS_JOIN] ----------------NestedLoopJoin[CROSS_JOIN] ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------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] @@ -19,21 +19,21 @@ PhysicalResultSink --------------------------------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 +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) ----------------------------------------PhysicalOlapScan[time_dim] ---------------------------------PhysicalDistribute +--------------------------------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 +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((store.s_store_name = 'ese')) ----------------------------------PhysicalOlapScan[store] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------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] @@ -42,21 +42,21 @@ PhysicalResultSink ----------------------------------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 +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute < 30)) ------------------------------------------PhysicalOlapScan[time_dim] -----------------------------------PhysicalDistribute +----------------------------------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 +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((store.s_store_name = 'ese')) ------------------------------------PhysicalOlapScan[store] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------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] @@ -65,21 +65,21 @@ PhysicalResultSink --------------------------------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: RF15 RF16 RF17 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute >= 30)) ----------------------------------------PhysicalOlapScan[time_dim] ---------------------------------PhysicalDistribute +--------------------------------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 +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((store.s_store_name = 'ese')) ----------------------------------PhysicalOlapScan[store] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------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] @@ -88,21 +88,21 @@ PhysicalResultSink ------------------------------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: RF12 RF13 RF14 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute < 30)) --------------------------------------PhysicalOlapScan[time_dim] -------------------------------PhysicalDistribute +------------------------------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 +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((store.s_store_name = 'ese')) --------------------------------PhysicalOlapScan[store] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------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] @@ -111,21 +111,21 @@ PhysicalResultSink ----------------------------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: RF9 RF10 RF11 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute >= 30)) ------------------------------------PhysicalOlapScan[time_dim] -----------------------------PhysicalDistribute +----------------------------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 +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((store.s_store_name = 'ese')) ------------------------------PhysicalOlapScan[store] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecReplicated] ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------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] @@ -134,21 +134,21 @@ PhysicalResultSink --------------------------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: RF6 RF7 RF8 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute < 30)) ----------------------------------PhysicalOlapScan[time_dim] ---------------------------PhysicalDistribute +--------------------------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 +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((store.s_store_name = 'ese')) ----------------------------PhysicalOlapScan[store] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------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] @@ -157,21 +157,21 @@ PhysicalResultSink ------------------------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: RF3 RF4 RF5 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute >= 30)) --------------------------------PhysicalOlapScan[time_dim] -------------------------PhysicalDistribute +------------------------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 +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((store.s_store_name = 'ese')) --------------------------PhysicalOlapScan[store] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecReplicated] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------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] @@ -180,15 +180,15 @@ PhysicalResultSink ----------------------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 +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((time_dim.t_hour = 12) and (time_dim.t_minute < 30)) ------------------------------PhysicalOlapScan[time_dim] -----------------------PhysicalDistribute +----------------------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 +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((store.s_store_name = 'ese')) ------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query89.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query89.out index f1b4e84536..f1160eea69 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query89.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query89.out @@ -3,16 +3,16 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------filter((if(( not (avg_monthly_sales = 0.0000)), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000)) --------------PhysicalWindow ----------------PhysicalQuickSort[LOCAL_SORT] ------------------PhysicalProject ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------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] @@ -22,15 +22,15 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter(((i_category IN ('Books', 'Children', 'Electronics') AND i_class IN ('audio', 'history', 'school-uniforms')) OR (i_category IN ('Men', 'Shoes', 'Sports') AND i_class IN ('pants', 'tennis', 'womens')))) ----------------------------------------------PhysicalOlapScan[item] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_year = 2001)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query9.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query9.out index 5b3610bc2e..6f64f57ee2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query9.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query9.out @@ -1,7 +1,7 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_9 -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------NestedLoopJoin[CROSS_JOIN] --------NestedLoopJoin[CROSS_JOIN] @@ -22,122 +22,122 @@ PhysicalResultSink --------------------------------------PhysicalProject ----------------------------------------filter((reason.r_reason_sk = 1)) ------------------------------------------PhysicalOlapScan[reason] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalAssertNumRows ------------------------------------------hashAgg[GLOBAL] ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------------hashAgg[LOCAL] ------------------------------------------------PhysicalProject --------------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ----------------------------------------------------PhysicalOlapScan[store_sales] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalAssertNumRows --------------------------------------hashAgg[GLOBAL] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------------hashAgg[LOCAL] --------------------------------------------PhysicalProject ----------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ------------------------------------------------PhysicalOlapScan[store_sales] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalAssertNumRows ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ----------------------------------------------PhysicalOlapScan[store_sales] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalAssertNumRows ----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------hashAgg[LOCAL] ----------------------------------------PhysicalProject ------------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21)) --------------------------------------------PhysicalOlapScan[store_sales] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalAssertNumRows --------------------------------hashAgg[GLOBAL] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------hashAgg[LOCAL] --------------------------------------PhysicalProject ----------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21)) ------------------------------------------PhysicalOlapScan[store_sales] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalAssertNumRows ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21)) ----------------------------------------PhysicalOlapScan[store_sales] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalAssertNumRows ----------------------------hashAgg[GLOBAL] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------hashAgg[LOCAL] ----------------------------------PhysicalProject ------------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41)) --------------------------------------PhysicalOlapScan[store_sales] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalAssertNumRows --------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject ----------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41)) ------------------------------------PhysicalOlapScan[store_sales] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalAssertNumRows ------------------------hashAgg[GLOBAL] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject --------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41)) ----------------------------------PhysicalOlapScan[store_sales] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalAssertNumRows ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecGather] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61)) --------------------------------PhysicalOlapScan[store_sales] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalAssertNumRows --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecGather] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61)) ------------------------------PhysicalOlapScan[store_sales] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------PhysicalAssertNumRows ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecGather] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61)) ----------------------------PhysicalOlapScan[store_sales] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalAssertNumRows ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecGather] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) --------------------------PhysicalOlapScan[store_sales] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecReplicated] ------------PhysicalAssertNumRows --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecGather] ------------------hashAgg[LOCAL] --------------------PhysicalProject ----------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) ------------------------PhysicalOlapScan[store_sales] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalAssertNumRows ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) 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 0507bf60bb..3313e04f0d 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 @@ -6,7 +6,7 @@ PhysicalResultSink ------PhysicalProject --------NestedLoopJoin[CROSS_JOIN] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF5 hd_demo_sk->[ws_ship_hdemo_sk] @@ -15,21 +15,21 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] 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] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) --------------------------------PhysicalOlapScan[web_page] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((time_dim.t_hour <= 13) and (time_dim.t_hour >= 12)) ------------------------------PhysicalOlapScan[time_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((household_demographics.hd_dep_count = 6)) --------------------------PhysicalOlapScan[household_demographics] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecReplicated] ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ws_ship_hdemo_sk] @@ -38,15 +38,15 @@ PhysicalResultSink --------------------------hashJoin[INNER_JOIN] 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] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) ----------------------------------PhysicalOlapScan[web_page] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((time_dim.t_hour <= 15) and (time_dim.t_hour >= 14)) --------------------------------PhysicalOlapScan[time_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((household_demographics.hd_dep_count = 6)) ----------------------------PhysicalOlapScan[household_demographics] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query91.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query91.out index bd6110b917..595d1fe0dc 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query91.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query91.out @@ -2,11 +2,11 @@ -- !ds_shape_91 -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF5 cc_call_center_sk->[cr_call_center_sk] @@ -16,30 +16,30 @@ PhysicalResultSink --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returning_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cr_returning_customer_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF3 RF4 RF5 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF2 c_current_addr_sk->[ca_address_sk] --------------------------------PhysicalProject ----------------------------------filter((customer_address.ca_gmt_offset = -7.00)) ------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF2 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[c_current_hdemo_sk] ------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[c_current_cdemo_sk] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF1 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------filter((((customer_demographics.cd_marital_status = 'M') AND (customer_demographics.cd_education_status = 'Unknown')) OR ((customer_demographics.cd_marital_status = 'W') AND (customer_demographics.cd_education_status = 'Advanced Degree')))) --------------------------------------------PhysicalOlapScan[customer_demographics] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((hd_buy_potential like 'Unknown%')) ------------------------------------------PhysicalOlapScan[household_demographics] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) ------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[call_center] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query92.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query92.out index a55fa8e72f..e094e85ecb 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query92.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query92.out @@ -4,24 +4,24 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalProject --------------filter((cast(ws_ext_discount_amt as DECIMALV3(38, 5)) > (1.3 * avg(cast(ws_ext_discount_amt as DECIMALV3(9, 4))) OVER(PARTITION BY i_item_sk)))) ----------------PhysicalWindow ------------------PhysicalQuickSort[LOCAL_SORT] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((item.i_manufact_id = 714)) ------------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '2000-05-01') and (date_dim.d_date >= '2000-02-01')) --------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query93.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query93.out index 72211e070b..68052ea4a3 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query93.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query93.out @@ -2,10 +2,10 @@ -- !ds_shape_93 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_item_sk = store_sales.ss_item_sk) and (store_returns.sr_ticket_number = store_sales.ss_ticket_number)) otherCondition=() build RFs:RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] @@ -14,7 +14,7 @@ PhysicalResultSink ------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_reason_sk = reason.r_reason_sk)) otherCondition=() build RFs:RF0 r_reason_sk->[sr_reason_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[store_returns] apply RFs: RF0 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((reason.r_reason_desc = 'reason 58')) --------------------------PhysicalOlapScan[reason] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query94.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query94.out index 4e6d82d7ab..4868b244dc 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query94.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query94.out @@ -4,34 +4,34 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] ------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[DISTINCT_LOCAL] ------------hashAgg[GLOBAL] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF4 ws_order_number->[ws_order_number] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 --------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() build RFs:RF3 ws_order_number->[wr_order_number] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[web_returns] apply RFs: RF3 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_sk] --------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_ship_date_sk] ----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((customer_address.ca_state = 'OK')) ------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_date <= '2002-06-30') and (date_dim.d_date >= '2002-05-01')) ----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((web_site.web_company_name = 'pri')) --------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query95.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query95.out index c50e58dd00..1a77a97a8b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query95.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query95.out @@ -4,17 +4,17 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF6 RF7 ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[DISTINCT_GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecGather] ------------hashAgg[DISTINCT_LOCAL] --------------hashAgg[GLOBAL] ----------------hashAgg[LOCAL] @@ -22,31 +22,31 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF5 wr_order_number->[ws_order_number];RF7 wr_order_number->[ws_order_number,ws_order_number] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[web_returns] ----------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF4 ws_order_number->[ws_order_number];RF6 ws_order_number->[ws_order_number,ws_order_number] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] ----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_ship_date_sk] ------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((customer_address.ca_state = 'VA')) --------------------------------------PhysicalOlapScan[customer_address] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_date <= '2001-05-31') and (date_dim.d_date >= '2001-04-01')) ------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((web_site.web_company_name = 'pri')) ----------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query96.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query96.out index 414dc98426..7dc3835f27 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query96.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query96.out @@ -4,7 +4,7 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------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] @@ -13,15 +13,15 @@ PhysicalResultSink --------------------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 +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) ----------------------------PhysicalOlapScan[time_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((household_demographics.hd_dep_count = 0)) --------------------------PhysicalOlapScan[household_demographics] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((store.s_store_name = 'ese')) ----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query97.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query97.out index bb1f3c8efc..0085c066b3 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query97.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query97.out @@ -4,33 +4,33 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[FULL_OUTER_JOIN] hashCondition=((ssci.customer_sk = csci.customer_sk) and (ssci.item_sk = csci.item_sk)) otherCondition=() ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------PhysicalProject ------------------------------filter(( not ss_sold_date_sk IS NULL)) --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_month_seq <= 1210) and (date_dim.d_month_seq >= 1199)) ----------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject ------------------------------filter(( not cs_sold_date_sk IS NULL)) --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_month_seq <= 1210) and (date_dim.d_month_seq >= 1199)) ----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query98.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query98.out index aa5c96dcda..aab98ee8d6 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query98.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query98.out @@ -2,25 +2,25 @@ -- !ds_shape_98 -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_date <= '1999-03-07') and (date_dim.d_date >= '1999-02-05')) ----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(i_category IN ('Jewelry', 'Men', 'Sports')) --------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query99.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query99.out index de2a69823d..b8d1afb99a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query99.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query99.out @@ -2,10 +2,10 @@ -- !ds_shape_99 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF3 w_warehouse_sk->[cs_warehouse_sk] @@ -15,17 +15,17 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_ship_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 RF3 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_month_seq <= 1205) and (date_dim.d_month_seq >= 1194)) --------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[call_center] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[ship_mode] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[warehouse] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query1.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query1.out index 400e67a5da..d0f8900a56 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query1.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query1.out @@ -4,39 +4,39 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] ----------------PhysicalProject ------------------PhysicalOlapScan[store_returns] apply RFs: RF0 -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((date_dim.d_year = 2000)) ----------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE))) --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = ctr1.ctr_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ctr_store_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ctr_customer_sk] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((store.s_state = 'SD')) ------------------------PhysicalOlapScan[store] --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query10.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query10.out index 853ad14be7..b07426b5f3 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query10.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query10.out @@ -3,10 +3,10 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------filter(($c$1 OR $c$2)) @@ -14,42 +14,42 @@ PhysicalResultSink ----------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() ------------------------PhysicalProject --------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) ----------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[c_current_addr_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County')) ------------------------------------------PhysicalOlapScan[customer_address] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalOlapScan[customer_demographics] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) ------------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) ----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query11.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query11.out index 45403c6abb..6922272ef0 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query11.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query11.out @@ -4,58 +4,58 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((PULL_UP_UNIFIED_OUTPUT_ALIAS = customer.c_customer_sk)) otherCondition=() ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalUnion --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (2001, 2002)) --------------------------------PhysicalOlapScan[date_dim] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (2001, 2002)) --------------------------------PhysicalOlapScan[date_dim] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[customer] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000) > if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000))) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((t_w_secyear.dyear = 2002) and (t_w_secyear.sale_type = 'w')) --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((t_w_firstyear.dyear = 2001) and (t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year_total > 0.00)) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ------------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((t_s_secyear.dyear = 2002) and (t_s_secyear.sale_type = 's')) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((t_s_firstyear.dyear = 2001) and (t_s_firstyear.sale_type = 's') and (t_s_firstyear.year_total > 0.00)) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query12.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query12.out index b87354dbb9..602833b969 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query12.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query12.out @@ -2,14 +2,14 @@ -- !ds_shape_12 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] @@ -17,11 +17,11 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter(i_category IN ('Books', 'Men', 'Sports')) ------------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '1998-05-06') and (date_dim.d_date >= '1998-04-06')) --------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query13.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query13.out index cb98071908..9689a10568 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query13.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query13.out @@ -2,7 +2,7 @@ -- !ds_shape_13 -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] @@ -12,26 +12,26 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() ----------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter((store_sales.ss_net_profit <= 300.00) and (store_sales.ss_net_profit >= 50.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) ------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF2 RF3 RF4 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter(((((customer_demographics.cd_marital_status = 'D') AND (customer_demographics.cd_education_status = 'Unknown')) OR ((customer_demographics.cd_marital_status = 'S') AND (customer_demographics.cd_education_status = 'College'))) OR ((customer_demographics.cd_marital_status = 'M') AND (customer_demographics.cd_education_status = '4 yr Degree')))) ------------------------------PhysicalOlapScan[customer_demographics] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter(((ca_state IN ('KS', 'MI', 'SD') OR ca_state IN ('CO', 'MO', 'ND')) OR ca_state IN ('NH', 'OH', 'TX')) and (customer_address.ca_country = 'United States')) ------------------------PhysicalOlapScan[customer_address] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter(hd_dep_count IN (1, 3)) ----------------------PhysicalOlapScan[household_demographics] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalProject ----------------filter((date_dim.d_year = 2001)) ------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query14.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query14.out index ad7cd03a05..23ded84d53 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query14.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query14.out @@ -5,91 +5,91 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((item.i_brand_id = t.brand_id) and (item.i_category_id = t.category_id) and (item.i_class_id = t.class_id)) otherCondition=() --------PhysicalIntersect -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = iss.i_item_sk)) otherCondition=() --------------------PhysicalProject ----------------------PhysicalOlapScan[store_sales] apply RFs: RF1 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((d1.d_year <= 2002) and (d1.d_year >= 2000)) ----------------------PhysicalOlapScan[date_dim] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = ics.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((d2.d_year <= 2002) and (d2.d_year >= 2000)) ----------------------PhysicalOlapScan[date_dim] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = iws.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ws_item_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((d3.d_year <= 2002) and (d3.d_year >= 2000)) ----------------------PhysicalOlapScan[date_dim] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[item] --PhysicalCteAnchor ( cteId=CTEId#1 ) ----PhysicalCteProducer ( cteId=CTEId#1 ) ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalUnion ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ss_sold_date_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[store_sales] apply RFs: RF9 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_year <= 2002) and (date_dim.d_year >= 2000)) --------------------------PhysicalOlapScan[date_dim] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF10 d_date_sk->[cs_sold_date_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF10 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_year <= 2002) and (date_dim.d_year >= 2000)) --------------------------PhysicalOlapScan[date_dim] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[ws_sold_date_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[web_sales] apply RFs: RF11 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_year <= 2002) and (date_dim.d_year >= 2000)) --------------------------PhysicalOlapScan[date_dim] ----PhysicalResultSink ------PhysicalTopN[MERGE_SORT] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalRepeat ----------------------PhysicalUnion @@ -97,81 +97,81 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------NestedLoopJoin[INNER_JOIN](cast(sales as DOUBLE) > cast(average_sales as DOUBLE)) ----------------------------PhysicalProject ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF14 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF13 i_item_sk->[ss_item_sk] --------------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((store_sales.ss_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF12 ss_item_sk->[ss_item_sk] -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------PhysicalProject --------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF12 RF13 RF14 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[item] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) ----------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalAssertNumRows ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ------------------------PhysicalProject --------------------------NestedLoopJoin[INNER_JOIN](cast(sales as DOUBLE) > cast(average_sales as DOUBLE)) ----------------------------PhysicalProject ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF17 d_date_sk->[cs_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF16 i_item_sk->[cs_item_sk] --------------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((catalog_sales.cs_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF15 ss_item_sk->[cs_item_sk] -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------PhysicalProject --------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF15 RF16 RF17 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[item] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) ----------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalAssertNumRows ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ------------------------PhysicalProject --------------------------NestedLoopJoin[INNER_JOIN](cast(sales as DOUBLE) > cast(average_sales as DOUBLE)) ----------------------------PhysicalProject ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF20 d_date_sk->[ws_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF19 i_item_sk->[ws_item_sk] --------------------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF18 ws_item_sk->[ss_item_sk] -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------PhysicalProject --------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF19 RF20 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[item] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) ----------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalAssertNumRows ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query15.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query15.out index bbb8d5a8a8..d1254304e0 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query15.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query15.out @@ -2,28 +2,28 @@ -- !ds_shape_15 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=(((substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274') OR ca_state IN ('CA', 'GA', 'WA')) OR (catalog_sales.cs_sales_price > 500.00))) -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer_address] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((date_dim.d_qoy = 1) and (date_dim.d_year = 2001)) ------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query16.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query16.out index b08f9d6273..4e0cd864a3 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query16.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query16.out @@ -4,7 +4,7 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] ------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[DISTINCT_LOCAL] ------------hashAgg[GLOBAL] --------------hashAgg[LOCAL] @@ -12,27 +12,27 @@ PhysicalResultSink ------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() --------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk] ----------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF2 cs_order_number->[cs_order_number] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[cs_ship_addr_sk] ----------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_ship_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF3 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) ------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((customer_address.ca_state = 'WV')) ----------------------------------PhysicalOlapScan[customer_address] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) ----------------------------PhysicalOlapScan[call_center] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------PhysicalOlapScan[catalog_returns] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query17.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query17.out index 494457b7ea..f128eebed4 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query17.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query17.out @@ -3,10 +3,10 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() @@ -19,32 +19,32 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 cs_bill_customer_sk->[sr_customer_sk];RF4 cs_item_sk->[sr_item_sk] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_customer_sk->[ss_customer_sk];RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF5 --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF3 RF4 RF6 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((d1.d_quarter_name = '2001Q1')) ----------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) ------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) --------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[item] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query18.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query18.out index 163baee3ed..cad0cb8d52 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query18.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query18.out @@ -2,11 +2,11 @@ -- !ds_shape_18 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject @@ -16,32 +16,32 @@ PhysicalResultSink --------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF1 cd_demo_sk->[cs_bill_cdemo_sk] --------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[cs_bill_customer_sk] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF5 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------filter(c_birth_month IN (1, 10, 2, 4, 7, 8)) ----------------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((cd1.cd_education_status = 'Advanced Degree') and (cd1.cd_gender = 'F')) --------------------------------------------PhysicalOlapScan[customer_demographics] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[customer_demographics] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter(ca_state IN ('GA', 'IN', 'ME', 'NC', 'OK', 'WA', 'WY')) ----------------------------------PhysicalOlapScan[customer_address] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[item] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_year = 1998)) ----------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query19.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query19.out index 6f689dce19..4beb8a586f 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query19.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query19.out @@ -2,11 +2,11 @@ -- !ds_shape_19 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=(( not (substring(ca_zip, 1, 5) = substring(s_zip, 1, 5)))) @@ -16,24 +16,24 @@ PhysicalResultSink --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] ----------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[customer] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((item.i_manager_id = 2)) ----------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) ------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query2.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query2.out index efb7635e7d..2bff71e94a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query2.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query2.out @@ -3,41 +3,41 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) --PhysicalCteProducer ( cteId=CTEId#1 ) ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = wscs.sold_date_sk)) otherCondition=() --------------PhysicalUnion -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[web_sales] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[catalog_sales] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------PhysicalProject ------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_week_seq = d_week_seq2)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq] --------------hashJoin[INNER_JOIN] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(d_week_seq2 - 53))) otherCondition=() -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF1 d_week_seq->[d_week_seq] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------------PhysicalProject --------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_year = 1998)) ----------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------PhysicalProject ------------------filter((date_dim.d_year = 1999)) --------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query20.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query20.out index 6ce86e33fe..ace2a6c74a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query20.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query20.out @@ -2,14 +2,14 @@ -- !ds_shape_20 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] @@ -17,11 +17,11 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter(i_category IN ('Books', 'Shoes', 'Women')) ------------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '2002-02-25') and (date_dim.d_date >= '2002-01-26')) --------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query21.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query21.out index 6d13207954..d36e180e88 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query21.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query21.out @@ -2,11 +2,11 @@ -- !ds_shape_21 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------filter((if((inv_before > 0), (cast(inv_after as DOUBLE) / cast(inv_before as DOUBLE)), NULL) <= 1.5) and (if((inv_before > 0), (cast(inv_after as DOUBLE) / cast(inv_before as DOUBLE)), NULL) >= cast((2.000000 / 3.0) as DOUBLE))) ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[inv_date_sk] @@ -14,14 +14,14 @@ PhysicalResultSink ----------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() ------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] --------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) --------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[warehouse] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_date <= '2002-03-29') and (date_dim.d_date >= '2002-01-28')) --------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query22.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query22.out index c4c5c91428..32f891229a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query22.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query22.out @@ -2,11 +2,11 @@ -- !ds_shape_22 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject @@ -14,10 +14,10 @@ PhysicalResultSink ----------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() ------------------------PhysicalProject --------------------------PhysicalOlapScan[inventory] apply RFs: RF1 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[item] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_month_seq <= 1199) and (date_dim.d_month_seq >= 1188)) ----------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query23.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query23.out index 0ee8af28ef..35b12755dc 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query23.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query23.out @@ -5,17 +5,17 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalProject ------filter((cnt > 4)) --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() --------------------PhysicalProject ----------------------PhysicalOlapScan[store_sales] apply RFs: RF1 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter(d_year IN (2000, 2001, 2002, 2003)) ------------------------PhysicalOlapScan[date_dim] @@ -24,26 +24,26 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalProject --------NestedLoopJoin[INNER_JOIN](cast(ssales as DOUBLE) > cast((0.9500 * tpcds_cmax) as DOUBLE)) ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------filter(( not ss_customer_sk IS NULL)) --------------------PhysicalOlapScan[store_sales] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecReplicated] ------------PhysicalProject --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecGather] ------------------hashAgg[LOCAL] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------filter(( not ss_customer_sk IS NULL)) ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter(d_year IN (2000, 2001, 2002, 2003)) --------------------------------------PhysicalOlapScan[date_dim] @@ -51,43 +51,43 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalLimit[GLOBAL] --------PhysicalLimit[LOCAL] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalUnion ------------------PhysicalProject --------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] --------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000)) --------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ------------------PhysicalProject --------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ws_sold_date_sk] --------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF5 RF6 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000)) --------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query24.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query24.out index 133a4bb64e..b633efc8e0 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query24.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query24.out @@ -4,7 +4,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((store.s_zip = customer_address.ca_zip) and (store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_zip->[ca_zip];RF6 s_store_sk->[ss_store_sk] @@ -12,45 +12,45 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() --------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=(( not (c_birth_country = upper(ca_country)))) build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF6 ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_returns] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[customer] apply RFs: RF3 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer_address] apply RFs: RF5 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((store.s_market_id = 8)) ----------------------PhysicalOlapScan[store] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalProject ------------NestedLoopJoin[INNER_JOIN](cast(paid as DOUBLE) > cast((0.05 * avg(cast(netpaid as DECIMALV3(38, 4)))) as DOUBLE)) --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject ------------------------filter((ssales.i_color = 'beige')) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecGather] ----------------------hashAgg[LOCAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------------PhysicalProject ----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query25.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query25.out index 6cdc8309d4..812e7dfedd 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query25.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query25.out @@ -2,10 +2,10 @@ -- !ds_shape_25 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() @@ -18,32 +18,32 @@ PhysicalResultSink ------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 cs_bill_customer_sk->[sr_customer_sk];RF4 cs_item_sk->[sr_item_sk] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_customer_sk->[ss_customer_sk];RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF5 ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF3 RF4 RF6 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((d2.d_moy <= 10) and (d2.d_moy >= 4) and (d2.d_year = 2000)) ----------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((d3.d_moy <= 10) and (d3.d_moy >= 4) and (d3.d_year = 2000)) ------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query26.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query26.out index d2bc9eb2e5..42e1368838 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query26.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query26.out @@ -2,10 +2,10 @@ -- !ds_shape_26 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF3 p_promo_sk->[cs_promo_sk] @@ -16,18 +16,18 @@ PhysicalResultSink --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[cs_bill_cdemo_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF2 RF3 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((customer_demographics.cd_education_status = 'Unknown') and (customer_demographics.cd_gender = 'M') and (customer_demographics.cd_marital_status = 'S')) ----------------------------------PhysicalOlapScan[customer_demographics] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[item] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_year = 2001)) ----------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter(((promotion.p_channel_email = 'N') OR (promotion.p_channel_event = 'N'))) ------------------------PhysicalOlapScan[promotion] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query27.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query27.out index 40291f7cce..bae5719ea4 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query27.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query27.out @@ -3,11 +3,11 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalRepeat --------------------PhysicalProject @@ -19,18 +19,18 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF3 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((customer_demographics.cd_education_status = 'Secondary') and (customer_demographics.cd_gender = 'F') and (customer_demographics.cd_marital_status = 'D')) ----------------------------------------PhysicalOlapScan[customer_demographics] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_year = 1999)) ------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter(s_state IN ('AL', 'LA', 'MI', 'MO', 'SC', 'TN')) ------------------------------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 079837446a..08f72b84ba 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 @@ -15,47 +15,47 @@ PhysicalResultSink ------------------------NestedLoopJoin[CROSS_JOIN] --------------------------PhysicalLimit[LOCAL] ----------------------------hashAgg[GLOBAL] -------------------------------PhysicalDistribute +------------------------------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 +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalLimit[LOCAL] ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------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 +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalLimit[LOCAL] --------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute +----------------------------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 +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalLimit[LOCAL] ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------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 +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------PhysicalLimit[LOCAL] ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------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 +----------PhysicalDistribute[DistributionSpecReplicated] ------------PhysicalLimit[LOCAL] --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------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)) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query29.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query29.out index 87e28fd0ee..27eccad761 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query29.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query29.out @@ -2,10 +2,10 @@ -- !ds_shape_29 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() @@ -17,32 +17,32 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 cs_bill_customer_sk->[sr_customer_sk];RF4 cs_item_sk->[sr_item_sk] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_customer_sk->[ss_customer_sk];RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF5 ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF3 RF4 RF7 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF6 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1999)) ------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000, 2001)) --------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((d2.d_moy <= 7) and (d2.d_moy >= 4) and (d2.d_year = 1999)) ------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query3.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query3.out index 7704d94620..5a86e9fdb7 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query3.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query3.out @@ -2,22 +2,22 @@ -- !ds_shape_3 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((item.i_manufact_id = 816)) ----------------------------PhysicalOlapScan[item] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((dt.d_moy = 11)) --------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query30.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query30.out index 09d8f0d71f..72e6cb9e1d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query30.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query30.out @@ -4,43 +4,43 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[wr_returned_date_sk] ----------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[web_returns] apply RFs: RF1 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[customer_address] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((date_dim.d_year = 2002)) ----------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] --------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE))) -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ctr_customer_sk] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer] apply RFs: RF3 ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------------PhysicalProject --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------PhysicalProject ------------------filter((customer_address.ca_state = 'IN')) --------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query31.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query31.out index 7f18759a2f..2216a2d3f9 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query31.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query31.out @@ -4,17 +4,17 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() ------------------PhysicalProject --------------------PhysicalOlapScan[store_sales] apply RFs: RF1 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[customer_address] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((ss.d_year = 2000) and d_qoy IN (1, 2, 3)) ----------------------PhysicalOlapScan[date_dim] @@ -22,24 +22,24 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalCteProducer ( cteId=CTEId#1 ) ------PhysicalProject --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ws_sold_date_sk] ------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ws_bill_addr_sk] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------PhysicalOlapScan[customer_address] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((ws.d_year = 2000) and d_qoy IN (1, 2, 3)) ------------------------PhysicalOlapScan[date_dim] ----PhysicalResultSink ------PhysicalQuickSort[MERGE_SORT] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------PhysicalQuickSort[LOCAL_SORT] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((ws1.ca_county = ws3.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) @@ -48,28 +48,28 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------hashJoin[INNER_JOIN] hashCondition=((ss1.ca_county = ws1.ca_county)) otherCondition=() ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((ss2.ca_county = ss3.ca_county)) otherCondition=() ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------filter((ss3.d_qoy = 3) and (ss3.d_year = 2000)) --------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------------------hashJoin[INNER_JOIN] hashCondition=((ss1.ca_county = ss2.ca_county)) otherCondition=() -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------filter((ss1.d_qoy = 1) and (ss1.d_year = 2000)) ----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------filter((ss2.d_qoy = 2) and (ss2.d_year = 2000)) ----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((ws1.d_qoy = 1) and (ws1.d_year = 2000)) ----------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((ws2.d_qoy = 2) and (ws2.d_year = 2000)) --------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------filter((ws3.d_qoy = 3) and (ws3.d_year = 2000)) ----------------------PhysicalCteConsumer ( cteId=CTEId#1 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query32.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query32.out index fa698587ba..4ba68645ec 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query32.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query32.out @@ -4,24 +4,24 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalProject --------------filter((cast(cs_ext_discount_amt as DECIMALV3(38, 5)) > (1.3 * avg(cast(cs_ext_discount_amt as DECIMALV3(9, 4))) OVER(PARTITION BY i_item_sk)))) ----------------PhysicalWindow ------------------PhysicalQuickSort[LOCAL_SORT] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((item.i_manufact_id = 29)) ------------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '1999-04-07') and (date_dim.d_date >= '1999-01-07')) --------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query33.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query33.out index 3524e2e1ad..9a90bc4737 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query33.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query33.out @@ -2,15 +2,15 @@ -- !ds_shape_33 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] @@ -19,26 +19,26 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF0 i_manufact_id->[i_manufact_id] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[item] apply RFs: RF0 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Home')) --------------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] @@ -47,26 +47,26 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[cs_bill_addr_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF4 i_manufact_id->[i_manufact_id] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[item] apply RFs: RF4 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Home')) --------------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] @@ -75,20 +75,20 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[ws_bill_addr_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 RF11 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF8 i_manufact_id->[i_manufact_id] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[item] apply RFs: RF8 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Home')) --------------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query34.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query34.out index ac5d62c541..00161e3291 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query34.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query34.out @@ -2,16 +2,16 @@ -- !ds_shape_34 -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk] ------------PhysicalProject --------------PhysicalOlapScan[customer] apply RFs: RF3 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------filter((dn.cnt <= 20) and (dn.cnt >= 15)) ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------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] @@ -20,15 +20,15 @@ PhysicalResultSink ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((((date_dim.d_dom >= 1) AND (date_dim.d_dom <= 3)) OR ((date_dim.d_dom >= 25) AND (date_dim.d_dom <= 28))) and d_year IN (1998, 1999, 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.2) and hd_buy_potential IN ('0-500', '1001-5000')) ----------------------------------PhysicalOlapScan[household_demographics] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(s_county IN ('Barrow County', 'Daviess County', 'Franklin Parish', 'Luce County', 'Richland County', 'Walker County', 'Williamson County', 'Ziebach County')) --------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query35.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query35.out index dacc3f6f24..4712a4893d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query35.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query35.out @@ -3,10 +3,10 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------filter(($c$1 OR $c$2)) @@ -14,43 +14,43 @@ PhysicalResultSink ----------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() ------------------------PhysicalProject --------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ----------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[customer] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[customer_demographics] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ------------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query36.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query36.out index 0f9c41c923..5bb110d6f1 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query36.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query36.out @@ -3,15 +3,15 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalRepeat ----------------------------PhysicalProject @@ -21,14 +21,14 @@ PhysicalResultSink ------------------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[item] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((d1.d_year = 2002)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter(s_state IN ('AL', 'GA', 'MI', 'MO', 'OH', 'SC', 'SD', 'TN')) --------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query37.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query37.out index 0c15104a50..7a603d7e58 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query37.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query37.out @@ -2,28 +2,28 @@ -- !ds_shape_37 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk] --------------------------PhysicalProject ----------------------------filter((inventory.inv_quantity_on_hand <= 500) and (inventory.inv_quantity_on_hand >= 100)) ------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '1999-04-22') and (date_dim.d_date >= '1999-02-21')) --------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((item.i_current_price <= 75.00) and (item.i_current_price >= 45.00) and i_manufact_id IN (1000, 707, 747, 856)) ----------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query38.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query38.out index 38bd42a7c9..e91f44096b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query38.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query38.out @@ -4,58 +4,58 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalProject --------------PhysicalIntersect ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ----------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cs_bill_customer_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ----------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ws_bill_customer_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query39.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query39.out index ab47ceb335..7f7a0fd712 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 @@ -7,32 +7,32 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------hashAgg[LOCAL] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() ----------------------PhysicalOlapScan[inventory] apply RFs: RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[item] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((date_dim.d_year = 1998) and d_moy IN (1, 2)) ------------------------PhysicalOlapScan[date_dim] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------PhysicalOlapScan[warehouse] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] -------PhysicalDistribute +------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 +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((inv1.d_moy = 1)) --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((inv2.d_moy = 2)) --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query4.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query4.out index f9acbf40df..e1934aa466 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query4.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query4.out @@ -4,82 +4,82 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((PULL_UP_UNIFIED_OUTPUT_ALIAS = customer.c_customer_sk)) otherCondition=() ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalUnion --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000)) --------------------------------PhysicalOlapScan[date_dim] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000)) --------------------------------PhysicalOlapScan[date_dim] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000)) --------------------------------PhysicalOlapScan[date_dim] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[customer] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((t_w_secyear.dyear = 2000) and (t_w_secyear.sale_type = 'w')) --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((t_w_firstyear.dyear = 1999) and (t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year_total > 0.000000)) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((t_c_secyear.dyear = 2000) and (t_c_secyear.sale_type = 'c')) ----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_c_firstyear.customer_id)) otherCondition=() ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------filter((t_c_firstyear.dyear = 1999) and (t_c_firstyear.sale_type = 'c') and (t_c_firstyear.year_total > 0.000000)) --------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------filter((t_s_secyear.dyear = 2000) and (t_s_secyear.sale_type = 's')) ----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------filter((t_s_firstyear.dyear = 1999) and (t_s_firstyear.sale_type = 's') and (t_s_firstyear.year_total > 0.000000)) ----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query40.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query40.out index 761a5e5da8..01b875d6f1 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query40.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query40.out @@ -2,10 +2,10 @@ -- !ds_shape_40 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() @@ -15,17 +15,17 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) --------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_date <= '2001-05-02') and (date_dim.d_date >= '2001-03-03')) ------------------------------PhysicalOlapScan[date_dim] ----------------------PhysicalProject ------------------------PhysicalOlapScan[catalog_returns] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[warehouse] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query41.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query41.out index 584dda5785..f07731a85b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query41.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query41.out @@ -2,21 +2,21 @@ -- !ds_shape_41 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((item.i_manufact = i1.i_manufact)) otherCondition=() build RFs:RF0 i_manufact->[i_manufact] ------------------PhysicalProject --------------------filter((i1.i_manufact_id <= 788) and (i1.i_manufact_id >= 748)) ----------------------PhysicalOlapScan[item] apply RFs: RF0 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((item_cnt > 0)) ------------------------hashAgg[GLOBAL] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject --------------------------------filter((((((((((((item.i_category = 'Women') AND i_color IN ('aquamarine', 'gainsboro')) AND i_units IN ('Dozen', 'Ounce')) AND i_size IN ('economy', 'medium')) OR ((((item.i_category = 'Women') AND i_color IN ('chiffon', 'violet')) AND i_units IN ('Pound', 'Ton')) AND i_size IN ('extra large', 'small'))) OR ((((item.i_category = 'Women') AND i_color IN ('blanched', 'tomato')) AND i_units IN ('Case', 'Tbl')) AND i_size IN ('economy', 'medium'))) OR ((((item.i_category = 'Women') AND i_color IN ('almond', 'lime')) AND i_units IN ('Box', 'Dram')) AND i_size IN ('extra large', 'small'))) OR ((((item.i_category = 'Men') AND i_color IN ('blue', 'chartreuse')) AND i_units IN ('Each', 'Oz')) AND i_size IN ('N/A', 'large'))) OR ((((item.i_category = 'Men') AND i_color IN ('dodger', 'tan')) AND i_units IN ('Bunch', 'Tsp')) AND i_size IN ('economy', 'medium'))) OR ((((item.i_category = 'Men') AND i_color IN ('peru', 'saddle')) AND i_units IN ('Gram', 'Pallet')) AND i_size IN ('N/A', 'large'))) OR ((((item.i_category = 'Men') AND i_color IN ('indian', 'spring')) AND i_units IN ('Carton', 'Unknown')) AND i_size IN ('economy', 'medium')))) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query42.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query42.out index 7d6239b062..fe908b68c8 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query42.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query42.out @@ -2,21 +2,21 @@ -- !ds_shape_42 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((item.i_manager_id = 1)) --------------------------PhysicalOlapScan[item] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((dt.d_moy = 11) and (dt.d_year = 2002)) ------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query43.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query43.out index 445a381983..2de98f4e1f 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query43.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query43.out @@ -2,10 +2,10 @@ -- !ds_shape_43 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] @@ -13,11 +13,11 @@ PhysicalResultSink --------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_year = 2000)) ----------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((store.s_gmt_offset = -5.00)) ------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query44.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query44.out index a9fee885c5..3f377d4f21 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query44.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query44.out @@ -2,74 +2,74 @@ -- !ds_shape_44 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((asceding.rnk = descending.rnk)) otherCondition=() -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter((rnk < 11)) ------------------------------PhysicalWindow --------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------PhysicalQuickSort[LOCAL_SORT] --------------------------------------PhysicalPartitionTopN ----------------------------------------PhysicalProject ------------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DOUBLE) > cast((0.9 * rank_col) as DOUBLE)) --------------------------------------------PhysicalProject ----------------------------------------------hashAgg[GLOBAL] -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------------hashAgg[LOCAL] ----------------------------------------------------PhysicalProject ------------------------------------------------------filter((ss1.ss_store_sk = 146)) --------------------------------------------------------PhysicalOlapScan[store_sales] ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalAssertNumRows -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------------------PhysicalProject ----------------------------------------------------hashAgg[GLOBAL] -------------------------------------------------------PhysicalDistribute +------------------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------------------hashAgg[LOCAL] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL) --------------------------------------------------------------PhysicalOlapScan[store_sales] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter((rnk < 11)) ------------------------------PhysicalWindow --------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------PhysicalQuickSort[LOCAL_SORT] --------------------------------------PhysicalPartitionTopN ----------------------------------------PhysicalProject ------------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DOUBLE) > cast((0.9 * rank_col) as DOUBLE)) --------------------------------------------PhysicalProject ----------------------------------------------hashAgg[GLOBAL] -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------------hashAgg[LOCAL] ----------------------------------------------------PhysicalProject ------------------------------------------------------filter((ss1.ss_store_sk = 146)) --------------------------------------------------------PhysicalOlapScan[store_sales] ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalAssertNumRows -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------------------PhysicalProject ----------------------------------------------------hashAgg[GLOBAL] -------------------------------------------------------PhysicalDistribute +------------------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------------------hashAgg[LOCAL] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL) --------------------------------------------------------------PhysicalOlapScan[store_sales] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[item] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query45.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query45.out index 8beea03247..1e0fa30e89 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query45.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query45.out @@ -2,10 +2,10 @@ -- !ds_shape_45 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------filter((substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274') OR $c$1)) @@ -15,26 +15,26 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[customer] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer_address] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_qoy = 2) and (date_dim.d_year = 2000)) ------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter(i_item_sk IN (11, 13, 17, 19, 2, 23, 29, 3, 5, 7)) --------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query46.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query46.out index d80df89216..9bf8294dad 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query46.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query46.out @@ -2,19 +2,19 @@ -- !ds_shape_46 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------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_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] @@ -22,25 +22,25 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter(d_dow IN (0, 6) and d_year IN (1999, 2000, 2001)) ----------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter(((household_demographics.hd_dep_count = 6) OR (household_demographics.hd_vehicle_count = 0))) ------------------------------------------PhysicalOlapScan[household_demographics] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter(s_city IN ('Centerville', 'Fairview', 'Five Points', 'Liberty', 'Oak Grove')) ----------------------------------------PhysicalOlapScan[store] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer_address] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[customer] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query47.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query47.out index 482a372d17..4e5fef7b83 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query47.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query47.out @@ -7,10 +7,10 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() @@ -20,33 +20,33 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[item] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((((date_dim.d_year = 2001) OR ((date_dim.d_year = 2000) AND (date_dim.d_moy = 12))) OR ((date_dim.d_year = 2002) AND (date_dim.d_moy = 1)))) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store] --PhysicalResultSink ----PhysicalProject ------PhysicalTopN[MERGE_SORT] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1)) and (v1.s_company_name = v1_lead.s_company_name) and (v1.s_store_name = v1_lead.s_store_name)) otherCondition=() ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((v1.i_brand = v1_lag.i_brand) and (v1.i_category = v1_lag.i_category) and (v1.rn = expr_(rn + 1)) and (v1.s_company_name = v1_lag.s_company_name) and (v1.s_store_name = v1_lag.s_store_name)) otherCondition=() ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000) and (v2.avg_monthly_sales > 0.0000) and (v2.d_year = 2001)) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query48.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query48.out index a1e2aad9c5..59167dad86 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query48.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query48.out @@ -2,7 +2,7 @@ -- !ds_shape_48 -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] @@ -11,22 +11,22 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() --------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=((((((customer_demographics.cd_marital_status = 'U') AND (customer_demographics.cd_education_status = 'Primary')) AND ((store_sales.ss_sales_price >= 100.00) AND (store_sales.ss_sales_price <= 150.00))) OR (((customer_demographics.cd_marital_status = 'W') AND (customer_demographics.cd_education_status = 'College')) AND ((store_sales.ss_sales_price >= 50.00) AND (store_sales.ss_sales_price <= 100.00)))) OR (((customer_demographics.cd_marital_status = 'D') AND (customer_demographics.cd_education_status = '2 yr Degree')) AND ((store_sales.ss_sales_price >= 150.00) AND (store_sales.ss_sales_price <= 200.00))))) build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((store_sales.ss_net_profit <= 25000.00) and (store_sales.ss_net_profit >= 0.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF2 RF3 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter(((((customer_demographics.cd_marital_status = 'U') AND (customer_demographics.cd_education_status = 'Primary')) OR ((customer_demographics.cd_marital_status = 'W') AND (customer_demographics.cd_education_status = 'College'))) OR ((customer_demographics.cd_marital_status = 'D') AND (customer_demographics.cd_education_status = '2 yr Degree')))) ----------------------------PhysicalOlapScan[customer_demographics] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter(((ca_state IN ('IA', 'MD', 'MN') OR ca_state IN ('IL', 'TX', 'VA')) OR ca_state IN ('IN', 'MI', 'WI')) and (customer_address.ca_country = 'United States')) ----------------------PhysicalOlapScan[customer_address] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalProject ----------------filter((date_dim.d_year = 1999)) ------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query49.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query49.out index 5066785a90..402043b9cd 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query49.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query49.out @@ -2,24 +2,24 @@ -- !ds_shape_49 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------filter(((return_rank <= 10) OR (currency_rank <= 10))) ----------------------PhysicalWindow ------------------------PhysicalQuickSort[LOCAL_SORT] --------------------------PhysicalWindow ----------------------------PhysicalQuickSort[MERGE_SORT] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------PhysicalQuickSort[LOCAL_SORT] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] @@ -31,22 +31,22 @@ PhysicalResultSink --------------------------------------------------PhysicalProject ----------------------------------------------------filter((wr.wr_return_amt > 10000.00)) ------------------------------------------------------PhysicalOlapScan[web_returns] -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) ----------------------------------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------filter(((return_rank <= 10) OR (currency_rank <= 10))) ----------------------PhysicalWindow ------------------------PhysicalQuickSort[LOCAL_SORT] --------------------------PhysicalWindow ----------------------------PhysicalQuickSort[MERGE_SORT] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------PhysicalQuickSort[LOCAL_SORT] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] @@ -58,22 +58,22 @@ PhysicalResultSink --------------------------------------------------PhysicalProject ----------------------------------------------------filter((cr.cr_return_amount > 10000.00)) ------------------------------------------------------PhysicalOlapScan[catalog_returns] -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) ----------------------------------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------filter(((return_rank <= 10) OR (currency_rank <= 10))) ----------------------PhysicalWindow ------------------------PhysicalQuickSort[LOCAL_SORT] --------------------------PhysicalWindow ----------------------------PhysicalQuickSort[MERGE_SORT] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------PhysicalQuickSort[LOCAL_SORT] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk] @@ -85,7 +85,7 @@ PhysicalResultSink --------------------------------------------------PhysicalProject ----------------------------------------------------filter((sr.sr_return_amt > 10000.00)) ------------------------------------------------------PhysicalOlapScan[store_returns] -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) ----------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query5.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query5.out index ec32848249..95091111f2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query5.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query5.out @@ -2,78 +2,78 @@ -- !ds_shape_5 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalUnion --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk,sr_returned_date_sk] --------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.store_sk = store.s_store_sk)) otherCondition=() ----------------------------------PhysicalUnion -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF1 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) --------------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk,cr_returned_date_sk] --------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() build RFs:RF2 cp_catalog_page_sk->[cs_catalog_page_sk,cr_catalog_page_sk] ----------------------------------PhysicalUnion -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 RF3 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_page] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) --------------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[ws_sold_date_sk,wr_returned_date_sk] --------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.wsr_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF6 web_site_sk->[ws_web_site_sk,ws_web_site_sk] ----------------------------------PhysicalUnion -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 wr_item_sk->[ws_item_sk];RF5 wr_order_number->[ws_order_number] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 RF6 ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF7 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[web_site] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) --------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query50.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query50.out index 28122e33b1..d7b38695e2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query50.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query50.out @@ -2,10 +2,10 @@ -- !ds_shape_50 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[sr_returned_date_sk] @@ -18,13 +18,13 @@ PhysicalResultSink ------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[store_returns] apply RFs: RF5 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((d2.d_moy = 8) and (d2.d_year = 2001)) ------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query51.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query51.out index 0278c0a003..19f1ce2f7b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query51.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query51.out @@ -3,46 +3,46 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------filter((web_cumulative > store_cumulative)) --------------PhysicalWindow ----------------PhysicalQuickSort[LOCAL_SORT] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[FULL_OUTER_JOIN] hashCondition=((web.d_date = store.d_date) and (web.item_sk = store.item_sk)) otherCondition=() -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalWindow ------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) ----------------------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalWindow ------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) ----------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query52.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query52.out index 5dda178baf..965bdd14e5 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query52.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query52.out @@ -2,22 +2,22 @@ -- !ds_shape_52 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((item.i_manager_id = 1)) ----------------------------PhysicalOlapScan[item] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((dt.d_moy = 12) and (dt.d_year = 2002)) --------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query53.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query53.out index 24df13e1db..4bd2e6d21f 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query53.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query53.out @@ -3,16 +3,16 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------filter((if((avg_quarterly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_quarterly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_quarterly_sales), NULL) > 0.100000)) --------------PhysicalWindow ----------------PhysicalQuickSort[LOCAL_SORT] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() @@ -21,15 +21,15 @@ PhysicalResultSink ------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter(d_month_seq IN (1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211)) --------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((((i_category IN ('Books', 'Children', 'Electronics') AND i_class IN ('personal', 'portable', 'reference', 'self-help')) AND i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')) OR ((i_category IN ('Men', 'Music', 'Women') AND i_class IN ('accessories', 'classical', 'fragrances', 'pants')) AND i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')))) ------------------------------------------PhysicalOlapScan[item] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query54.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query54.out index dcd43dc4bc..16ad1b0331 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query54.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query54.out @@ -3,10 +3,10 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashAgg[LOCAL] @@ -17,63 +17,63 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN] hashCondition=((my_customers.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((my_customers.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 ----------------------------------PhysicalProject ------------------------------------hashAgg[LOCAL] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_customer_sk = cs_or_ws_sales.customer_sk)) otherCondition=() -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs_or_ws_sales.item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[cs_item_sk,ws_item_sk] ------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs_or_ws_sales.sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk,ws_sold_date_sk] --------------------------------------------------PhysicalUnion -----------------------------------------------------PhysicalDistribute +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------------PhysicalProject --------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 -----------------------------------------------------PhysicalDistribute +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------------PhysicalProject --------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 ---------------------------------------------------PhysicalDistribute +--------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------------PhysicalProject ------------------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) --------------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((item.i_category = 'Women') and (item.i_class = 'maternity')) ------------------------------------------------------PhysicalOlapScan[item] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[customer] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer_address] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= (d_month_seq + 3)) --------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= (d_month_seq + 1)) ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalAssertNumRows ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------hashAgg[LOCAL] ----------------------------------------------PhysicalProject ------------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) --------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalAssertNumRows -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------hashAgg[GLOBAL] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------hashAgg[LOCAL] --------------------------------------------PhysicalProject ----------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) ------------------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query55.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query55.out index 315bb92b5a..db39db2da2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query55.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query55.out @@ -2,22 +2,22 @@ -- !ds_shape_55 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((item.i_manager_id = 100)) ----------------------------PhysicalOlapScan[item] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) --------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query56.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query56.out index 97de429208..71a6cca416 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query56.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query56.out @@ -2,15 +2,15 @@ -- !ds_shape_56 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] @@ -19,25 +19,25 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((customer_address.ca_gmt_offset = -6.00)) ----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] apply RFs: RF0 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter(i_color IN ('cyan', 'green', 'powder')) --------------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] @@ -46,25 +46,25 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[cs_bill_addr_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((customer_address.ca_gmt_offset = -6.00)) ----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] apply RFs: RF4 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter(i_color IN ('cyan', 'green', 'powder')) --------------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] @@ -73,19 +73,19 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[ws_bill_addr_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 RF11 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((customer_address.ca_gmt_offset = -6.00)) ----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] apply RFs: RF8 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter(i_color IN ('cyan', 'green', 'powder')) --------------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query57.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query57.out index 22fd0e4fec..c78c8d0fec 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query57.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query57.out @@ -7,10 +7,10 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((call_center.cc_call_center_sk = catalog_sales.cs_call_center_sk)) otherCondition=() @@ -20,33 +20,33 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[item] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((((date_dim.d_year = 1999) OR ((date_dim.d_year = 1998) AND (date_dim.d_moy = 12))) OR ((date_dim.d_year = 2000) AND (date_dim.d_moy = 1)))) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[call_center] --PhysicalResultSink ----PhysicalProject ------PhysicalTopN[MERGE_SORT] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((v1.cc_name = v1_lead.cc_name) and (v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1))) otherCondition=() ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((v1.cc_name = v1_lag.cc_name) and (v1.i_brand = v1_lag.i_brand) and (v1.i_category = v1_lag.i_category) and (v1.rn = expr_(rn + 1))) otherCondition=() ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000) and (v2.avg_monthly_sales > 0.0000) and (v2.d_year = 1999)) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query58.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query58.out index 1389ea6996..3859969de5 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query58.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query58.out @@ -3,7 +3,7 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((ss_items.item_id = ws_items.item_id)) otherCondition=((cast(cs_item_rev as DOUBLE) <= cast((1.1 * ws_item_rev) as DOUBLE)) and (cast(cs_item_rev as DOUBLE) >= cast((0.9 * ws_item_rev) as DOUBLE)) and (cast(ss_item_rev as DOUBLE) <= cast((1.1 * ws_item_rev) as DOUBLE)) and (cast(ss_item_rev as DOUBLE) >= cast((0.9 * ws_item_rev) as DOUBLE)) and (cast(ws_item_rev as DOUBLE) <= cast((1.1 * cs_item_rev) as DOUBLE)) and (cast(ws_item_rev as DOUBLE) <= cast((1.1 * ss_item_rev) as DOUBLE)) and (cast(ws_item_rev as DOUBLE) >= cast((0.9 * cs_item_rev) as DOUBLE)) and (cast(ws_item_rev as DOUBLE) >= cast((0.9 * ss_item_rev) as DOUBLE))) build RFs:RF13 item_id->[i_item_id] @@ -11,7 +11,7 @@ PhysicalResultSink ----------------hashJoin[INNER_JOIN] hashCondition=((ss_items.item_id = cs_items.item_id)) otherCondition=((cast(cs_item_rev as DOUBLE) <= cast((1.1 * ss_item_rev) as DOUBLE)) and (cast(cs_item_rev as DOUBLE) >= cast((0.9 * ss_item_rev) as DOUBLE)) and (cast(ss_item_rev as DOUBLE) <= cast((1.1 * cs_item_rev) as DOUBLE)) and (cast(ss_item_rev as DOUBLE) >= cast((0.9 * cs_item_rev) as DOUBLE))) build RFs:RF12 item_id->[i_item_id] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[ss_sold_date_sk] @@ -19,30 +19,30 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ss_item_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF10 RF11 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[item] apply RFs: RF12 RF13 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF8 d_week_seq->[d_week_seq] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF8 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalAssertNumRows -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_date = '2001-03-24')) ----------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] @@ -50,30 +50,30 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[item] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalAssertNumRows -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_date = '2001-03-24')) ----------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[date_dim] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ws_sold_date_sk] @@ -81,25 +81,25 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalAssertNumRows -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------------PhysicalProject ----------------------------------------------filter((date_dim.d_date = '2001-03-24')) ------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query59.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query59.out index 2c0eb7317a..d90709a513 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query59.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query59.out @@ -4,19 +4,19 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() ----------------PhysicalProject ------------------PhysicalOlapScan[store_sales] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalProject ------PhysicalTopN[MERGE_SORT] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((wss.ss_store_sk = store.s_store_sk) and (y.s_store_id1 = x.s_store_id2)) otherCondition=() build RFs:RF4 s_store_id2->[s_store_id];RF5 s_store_sk->[ss_store_sk] @@ -25,24 +25,24 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------hashJoin[INNER_JOIN] hashCondition=((d.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq] ----------------------hashJoin[INNER_JOIN] hashCondition=((d.d_week_seq = d_week_seq2)) otherCondition=() build RFs:RF1 d_week_seq->[d_week_seq] ------------------------hashJoin[INNER_JOIN] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(d_week_seq2 - 52))) otherCondition=() ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((d.d_month_seq <= 1219) and (d.d_month_seq >= 1208)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((d.d_month_seq <= 1207) and (d.d_month_seq >= 1196)) ----------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store] apply RFs: RF4 -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query6.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query6.out index 3663e2bd3b..6ef7f0f37a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query6.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query6.out @@ -2,12 +2,12 @@ -- !ds_shape_6 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------filter((cnt >= 10)) ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((d.d_month_seq = date_dim.d_month_seq)) otherCondition=() build RFs:RF5 d_month_seq->[d_month_seq] @@ -18,35 +18,35 @@ PhysicalResultSink ------------------------------hashJoin[INNER_JOIN] hashCondition=((s.ss_item_sk = i.i_item_sk)) otherCondition=() --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[customer] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[customer_address] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[item] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------hashAgg[GLOBAL] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashAgg[LOCAL] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[item] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalAssertNumRows ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------hashAgg[GLOBAL] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashAgg[LOCAL] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2002)) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query60.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query60.out index 9a996ac42b..faa8453bd7 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query60.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query60.out @@ -2,15 +2,15 @@ -- !ds_shape_60 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] @@ -19,26 +19,26 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((customer_address.ca_gmt_offset = -7.00)) ----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[item] apply RFs: RF0 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Children')) --------------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] @@ -47,26 +47,26 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[cs_bill_addr_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((customer_address.ca_gmt_offset = -7.00)) ----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[item] apply RFs: RF4 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Children')) --------------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] @@ -75,20 +75,20 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[ws_bill_addr_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 RF11 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((customer_address.ca_gmt_offset = -7.00)) ----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[item] apply RFs: RF8 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Children')) --------------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query61.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query61.out index e1ce18f828..06ab68f826 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query61.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query61.out @@ -6,7 +6,7 @@ PhysicalResultSink ------PhysicalTopN[LOCAL_SORT] --------NestedLoopJoin[CROSS_JOIN] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF10 s_store_sk->[ss_store_sk] @@ -17,35 +17,35 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[ss_item_sk] ------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[c_current_addr_sk] --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF7 RF8 RF9 RF10 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[customer] apply RFs: RF6 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((customer_address.ca_gmt_offset = -7.00)) --------------------------------------PhysicalOlapScan[customer_address] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((item.i_category = 'Jewelry')) ------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) ----------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((((promotion.p_channel_dmail = 'Y') OR (promotion.p_channel_email = 'Y')) OR (promotion.p_channel_tv = 'Y'))) ------------------------------PhysicalOlapScan[promotion] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((store.s_gmt_offset = -7.00)) --------------------------PhysicalOlapScan[store] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecReplicated] ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] @@ -55,25 +55,25 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ss_customer_sk] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF2 RF3 RF4 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((customer_address.ca_gmt_offset = -7.00)) --------------------------------------PhysicalOlapScan[customer_address] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) ------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((store.s_gmt_offset = -7.00)) --------------------------------PhysicalOlapScan[store] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((item.i_category = 'Jewelry')) ----------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query62.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query62.out index a19cc87b74..6a5afb5e8a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query62.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query62.out @@ -2,10 +2,10 @@ -- !ds_shape_62 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() @@ -15,17 +15,17 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[web_site] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_month_seq <= 1205) and (date_dim.d_month_seq >= 1194)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[ship_mode] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[warehouse] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query63.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query63.out index 85d671f5ad..884ba4ba3f 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query63.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query63.out @@ -2,16 +2,16 @@ -- !ds_shape_63 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000)) ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() @@ -20,15 +20,15 @@ PhysicalResultSink ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter(d_month_seq IN (1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192)) ------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((((i_category IN ('Books', 'Children', 'Electronics') AND i_class IN ('personal', 'portable', 'reference', 'self-help')) AND i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')) OR ((i_category IN ('Men', 'Music', 'Women') AND i_class IN ('accessories', 'classical', 'fragrances', 'pants')) AND i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')))) ----------------------------------------PhysicalOlapScan[item] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query64.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query64.out index c0636b2a27..bb2fd53c1d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query64.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query64.out @@ -25,7 +25,7 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) --------------------------------------------PhysicalProject ----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() ------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF8 i_item_sk->[ss_item_sk] ---------------------------------------------------PhysicalDistribute +--------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------PhysicalProject ------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_first_shipto_date_sk = d3.d_date_sk)) otherCondition=() --------------------------------------------------------PhysicalProject @@ -34,69 +34,69 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) --------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = ad2.ca_address_sk)) otherCondition=() ----------------------------------------------------------------PhysicalProject ------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_cdemo_sk = cd1.cd_demo_sk)) otherCondition=(( not (cd_marital_status = cd_marital_status))) ---------------------------------------------------------------------PhysicalDistribute +--------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------------------------PhysicalProject ------------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() ---------------------------------------------------------------------------PhysicalDistribute +--------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------------------------------PhysicalProject ------------------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF8 RF17 RF19 ---------------------------------------------------------------------------PhysicalDistribute +--------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------------------------------PhysicalProject ------------------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() ---------------------------------------------------------------------------------PhysicalDistribute +--------------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------------------------------------PhysicalProject ------------------------------------------------------------------------------------PhysicalOlapScan[customer] ---------------------------------------------------------------------------------PhysicalDistribute +--------------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------------------------------------PhysicalProject ------------------------------------------------------------------------------------PhysicalOlapScan[customer_demographics] ---------------------------------------------------------------------PhysicalDistribute +--------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------------------------PhysicalProject ------------------------------------------------------------------------PhysicalOlapScan[customer_demographics] -----------------------------------------------------------------PhysicalDistribute +----------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------------------------PhysicalProject --------------------------------------------------------------------PhysicalOlapScan[customer_address] -------------------------------------------------------------PhysicalDistribute +------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------------------------PhysicalDistribute +--------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------------------PhysicalDistribute +--------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------PhysicalProject ------------------------------------------------------filter((item.i_current_price <= 33.00) and (item.i_current_price >= 24.00) and i_color IN ('blanched', 'brown', 'burlywood', 'chocolate', 'drab', 'medium')) --------------------------------------------------------PhysicalOlapScan[item] -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------------PhysicalProject ----------------------------------------------------PhysicalOlapScan[store_returns] ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[store] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[household_demographics] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[household_demographics] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[income_band] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[income_band] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter(d_year IN (2001, 2002)) --------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------PhysicalOlapScan[promotion] ------------PhysicalProject --------------filter((sale > (2 * refund))) ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() @@ -106,15 +106,15 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) ----------------------------PhysicalOlapScan[catalog_returns] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((cs1.item_sk = cs2.item_sk) and (cs1.store_name = cs2.store_name) and (cs1.store_zip = cs2.store_zip)) otherCondition=((cs2.cnt <= cs1.cnt)) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((cs1.syear = 2001)) --------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((cs2.syear = 2002)) --------------------PhysicalCteConsumer ( cteId=CTEId#1 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query65.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query65.out index 2ccd3a7b64..016dd4798a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query65.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query65.out @@ -2,43 +2,43 @@ -- !ds_shape_65 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DOUBLE) <= cast((0.1 * ave) as DOUBLE))) build RFs:RF4 ss_store_sk->[ss_store_sk] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=() -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=() --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF4 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) ------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[store] ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) ------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query66.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query66.out index 3cb105de5b..5e36cb1705 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query66.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query66.out @@ -2,15 +2,15 @@ -- !ds_shape_66 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF3 sm_ship_mode_sk->[ws_ship_mode_sk] @@ -21,24 +21,24 @@ PhysicalResultSink ------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF2 RF3 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_year = 1998)) --------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[warehouse] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((cast(t_time as BIGINT) <= 77621) and (time_dim.t_time >= 48821)) --------------------------------------PhysicalOlapScan[time_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter(sm_carrier IN ('GREAT EASTERN', 'LATVIAN')) ----------------------------------PhysicalOlapScan[ship_mode] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF7 sm_ship_mode_sk->[cs_ship_mode_sk] @@ -49,18 +49,18 @@ PhysicalResultSink ------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 RF6 RF7 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_year = 1998)) --------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[warehouse] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((cast(t_time as BIGINT) <= 77621) and (time_dim.t_time >= 48821)) --------------------------------------PhysicalOlapScan[time_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter(sm_carrier IN ('GREAT EASTERN', 'LATVIAN')) ----------------------------------PhysicalOlapScan[ship_mode] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query67.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query67.out index 66d43c102e..bd3f6458a3 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query67.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query67.out @@ -2,16 +2,16 @@ -- !ds_shape_67 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------filter((rk <= 100)) ----------PhysicalWindow ------------PhysicalPartitionTopN ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalPartitionTopN ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalRepeat ----------------------------PhysicalProject @@ -21,14 +21,14 @@ PhysicalResultSink ------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_month_seq <= 1217) and (date_dim.d_month_seq >= 1206)) --------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[item] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query68.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query68.out index becdba20be..55519af97a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query68.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query68.out @@ -2,19 +2,19 @@ -- !ds_shape_68 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------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_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] @@ -22,25 +22,25 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_dom <= 2) and (date_dim.d_dom >= 1) and d_year IN (1998, 1999, 2000)) ----------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter(((household_demographics.hd_dep_count = 8) OR (household_demographics.hd_vehicle_count = -1))) ------------------------------------------PhysicalOlapScan[household_demographics] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter(s_city IN ('Five Points', 'Pleasant Hill')) ----------------------------------------PhysicalOlapScan[store] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer_address] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[customer] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query69.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query69.out index 6f5ee27b8d..778ab2fd4e 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query69.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query69.out @@ -3,54 +3,54 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF7 c_customer_sk->[ss_customer_sk] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000)) --------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject ----------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[cs_ship_customer_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000)) ------------------------------------PhysicalOlapScan[date_dim] ------------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ws_bill_customer_sk] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter(ca_state IN ('MI', 'TX', 'VA')) ----------------------------------------PhysicalOlapScan[customer_address] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer_demographics] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query7.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query7.out index b7e479e9a4..42054089df 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query7.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query7.out @@ -2,10 +2,10 @@ -- !ds_shape_7 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF3 p_promo_sk->[ss_promo_sk] @@ -16,18 +16,18 @@ PhysicalResultSink --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF2 RF3 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((customer_demographics.cd_education_status = 'College') and (customer_demographics.cd_gender = 'F') and (customer_demographics.cd_marital_status = 'W')) ----------------------------------PhysicalOlapScan[customer_demographics] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[item] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_year = 2001)) ----------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter(((promotion.p_channel_email = 'N') OR (promotion.p_channel_event = 'N'))) ------------------------PhysicalOlapScan[promotion] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query70.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query70.out index ec9c48f8a2..01583d0ca4 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query70.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query70.out @@ -3,15 +3,15 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalRepeat ----------------------------PhysicalProject @@ -20,36 +20,36 @@ PhysicalResultSink ----------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((d1.d_month_seq <= 1224) and (d1.d_month_seq >= 1213)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((store.s_state = tmp1.s_state)) otherCondition=() -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------filter((ranking <= 5)) ------------------------------------------PhysicalWindow --------------------------------------------PhysicalPartitionTopN -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------PhysicalPartitionTopN --------------------------------------------------PhysicalProject ----------------------------------------------------hashAgg[GLOBAL] -------------------------------------------------------PhysicalDistribute +------------------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------------------hashAgg[LOCAL] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() --------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------------------------------PhysicalProject ------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 -----------------------------------------------------------------PhysicalDistribute +----------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------------------------PhysicalProject --------------------------------------------------------------------filter((date_dim.d_month_seq <= 1224) and (date_dim.d_month_seq >= 1213)) ----------------------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------------------------------PhysicalDistribute +--------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------------------------PhysicalProject ------------------------------------------------------------------PhysicalOlapScan[store] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query71.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query71.out index 77172537ad..2d42a4f879 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query71.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query71.out @@ -2,48 +2,48 @@ -- !ds_shape_71 -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((tmp.sold_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ws_item_sk,cs_item_sk,ss_item_sk] --------------------hashJoin[INNER_JOIN] hashCondition=((tmp.time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ws_sold_time_sk,cs_sold_time_sk,ss_sold_time_sk] ----------------------PhysicalUnion -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF3 RF4 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1998)) ------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF3 RF4 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1998)) ------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 RF4 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1998)) ------------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter(t_meal_time IN ('breakfast', 'dinner')) ----------------------------PhysicalOlapScan[time_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((item.i_manager_id = 1)) --------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query72.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query72.out index 5209b08c13..9c2e78f822 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query72.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query72.out @@ -2,10 +2,10 @@ -- !ds_shape_72 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((warehouse.w_warehouse_sk = inventory.inv_warehouse_sk)) otherCondition=() @@ -22,40 +22,40 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF1 cd_demo_sk->[cs_bill_cdemo_sk] ----------------------------------------PhysicalProject ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = inventory.inv_item_sk)) otherCondition=((inventory.inv_quantity_on_hand < catalog_sales.cs_quantity)) build RFs:RF0 cs_item_sk->[inv_item_sk] ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF3 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((catalog_returns.cr_item_sk = catalog_sales.cs_item_sk) and (catalog_returns.cr_order_number = catalog_sales.cs_order_number)) otherCondition=() ------------------------------------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() --------------------------------------------------PhysicalProject ----------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF5 RF7 ---------------------------------------------------PhysicalDistribute +--------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------------PhysicalProject ------------------------------------------------------PhysicalOlapScan[promotion] ------------------------------------------------PhysicalProject --------------------------------------------------PhysicalOlapScan[catalog_returns] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((customer_demographics.cd_marital_status = 'W')) ----------------------------------------------PhysicalOlapScan[customer_demographics] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[item] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((d1.d_year = 2002)) ------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((household_demographics.hd_buy_potential = '501-1000')) ----------------------------PhysicalOlapScan[household_demographics] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[warehouse] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query73.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query73.out index 8ab062bf77..77c0f30866 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query73.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query73.out @@ -2,16 +2,16 @@ -- !ds_shape_73 -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((dj.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk] ------------PhysicalProject --------------PhysicalOlapScan[customer] apply RFs: RF3 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------filter((dj.cnt <= 5) and (dj.cnt >= 1)) ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------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] @@ -20,15 +20,15 @@ PhysicalResultSink ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_dom <= 2) and (date_dim.d_dom >= 1) and d_year IN (2000, 2001, 2002)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1) and hd_buy_potential IN ('501-1000', 'Unknown')) ----------------------------------PhysicalOlapScan[household_demographics] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(s_county IN ('Barrow County', 'Daviess County', 'Fairfield County', 'Walker County')) --------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query74.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query74.out index c9959e2820..bae17a5bda 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query74.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query74.out @@ -4,58 +4,58 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((PULL_UP_UNIFIED_OUTPUT_ALIAS = customer.c_customer_sk)) otherCondition=() ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalUnion --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000)) --------------------------------PhysicalOlapScan[date_dim] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000)) --------------------------------PhysicalOlapScan[date_dim] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[customer] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0), (year_total / year_total), NULL) > if((year_total > 0), (year_total / year_total), NULL))) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000)) --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year = 1999) and (t_w_firstyear.year_total > 0)) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ------------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((t_s_secyear.sale_type = 's') and (t_s_secyear.year = 2000)) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((t_s_firstyear.sale_type = 's') and (t_s_firstyear.year = 1999) and (t_s_firstyear.year_total > 0)) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query75.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query75.out index 78419a24e3..6203d20841 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query75.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query75.out @@ -3,13 +3,13 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalUnion -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ------------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() @@ -17,17 +17,17 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((item.i_category = 'Home')) ------------------------------------PhysicalOlapScan[item] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[catalog_returns] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter(d_year IN (1998, 1999)) ------------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ------------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() @@ -35,17 +35,17 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((item.i_category = 'Home')) ------------------------------------PhysicalOlapScan[item] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_returns] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter(d_year IN (1998, 1999)) ------------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] ------------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() @@ -53,26 +53,26 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ws_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((item.i_category = 'Home')) ------------------------------------PhysicalOlapScan[item] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_returns] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter(d_year IN (1998, 1999)) ------------------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((curr_yr.i_brand_id = prev_yr.i_brand_id) and (curr_yr.i_category_id = prev_yr.i_category_id) and (curr_yr.i_class_id = prev_yr.i_class_id) and (curr_yr.i_manufact_id = prev_yr.i_manufact_id)) otherCondition=(((cast(cast(sales_cnt as DECIMALV3(17, 2)) as DECIMALV3(23, 8)) / cast(sales_cnt as DECIMALV3(17, 2))) < 0.900000)) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------filter((curr_yr.d_year = 1999)) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------filter((prev_yr.d_year = 1998)) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query76.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query76.out index 4e8160680f..95615ccb40 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query76.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query76.out @@ -2,13 +2,13 @@ -- !ds_shape_76 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() ----------------------PhysicalProject @@ -16,13 +16,13 @@ PhysicalResultSink --------------------------PhysicalProject ----------------------------filter(ss_hdemo_sk IS NULL) ------------------------------PhysicalOlapScan[store_sales] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[item] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ws_sold_date_sk] ----------------------PhysicalProject @@ -30,13 +30,13 @@ PhysicalResultSink --------------------------PhysicalProject ----------------------------filter(ws_bill_addr_sk IS NULL) ------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[item] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ----------------------PhysicalProject @@ -44,10 +44,10 @@ PhysicalResultSink --------------------------PhysicalProject ----------------------------filter(cs_warehouse_sk IS NULL) ------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[item] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query77.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query77.out index 13fd3a801e..6764e50528 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query77.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query77.out @@ -2,11 +2,11 @@ -- !ds_shape_77 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalUnion @@ -16,59 +16,59 @@ PhysicalResultSink --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) --------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_store_sk = store.s_store_sk)) otherCondition=() -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ----------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store] --------------------PhysicalProject ----------------------NestedLoopJoin[CROSS_JOIN] ------------------------PhysicalProject --------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ------------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------hashAgg[GLOBAL] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashAgg[LOCAL] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cr_returned_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) --------------------------------------------PhysicalOlapScan[date_dim] @@ -78,33 +78,33 @@ PhysicalResultSink --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF9 wp_web_page_sk->[ws_web_page_sk] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) --------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_page] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF7 wp_web_page_sk->[wr_web_page_sk] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[wr_returned_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 RF7 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ----------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[web_page] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query78.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query78.out index 730493d316..a12f6215a0 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query78.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query78.out @@ -2,7 +2,7 @@ -- !ds_shape_78 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------filter(((coalesce(ws_qty, 0) > 0) OR (coalesce(cs_qty, 0) > 0))) @@ -11,14 +11,14 @@ PhysicalResultSink ----------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((ws.ws_customer_sk = ss.ss_customer_sk) and (ws.ws_item_sk = ss.ss_item_sk) and (ws.ws_sold_year = ss.ss_sold_year)) otherCondition=() ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((store_returns.sr_ticket_number = store_sales.ss_ticket_number) and (store_sales.ss_item_sk = store_returns.sr_item_sk)) otherCondition=() ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] @@ -26,14 +26,14 @@ PhysicalResultSink --------------------------------PhysicalOlapScan[store_returns] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((web_returns.wr_order_number = web_sales.ws_order_number) and (web_sales.ws_item_sk = web_returns.wr_item_sk)) otherCondition=() ------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] @@ -41,14 +41,14 @@ PhysicalResultSink --------------------------------PhysicalOlapScan[web_returns] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((catalog_returns.cr_order_number = catalog_sales.cs_order_number) and (catalog_sales.cs_item_sk = catalog_returns.cr_item_sk)) otherCondition=() --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_year = 2000)) ----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query79.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query79.out index 2487900aac..61d1db9cb0 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query79.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query79.out @@ -2,14 +2,14 @@ -- !ds_shape_79 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((ms.ss_customer_sk = customer.c_customer_sk)) otherCondition=() -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------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] @@ -18,19 +18,19 @@ PhysicalResultSink ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_dow = 1) and d_year IN (1998, 1999, 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter(((household_demographics.hd_dep_count = 5) OR (household_demographics.hd_vehicle_count > 4))) ----------------------------------PhysicalOlapScan[household_demographics] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((store.s_number_employees <= 295) and (store.s_number_employees >= 200)) --------------------------------PhysicalOlapScan[store] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query8.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query8.out index 192541e875..8cc8346be1 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query8.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query8.out @@ -2,10 +2,10 @@ -- !ds_shape_8 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((expr_substring(s_zip, 1, 2) = expr_substring(ca_zip, 1, 2))) otherCondition=() @@ -15,31 +15,31 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_qoy = 2) and (date_dim.d_year = 1998)) --------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalIntersect -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) ------------------------------PhysicalOlapScan[customer_address] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter((cnt > 10)) ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 c_current_addr_sk->[ca_address_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF0 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------filter((customer.c_preferred_cust_flag = 'Y')) ----------------------------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query80.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query80.out index fb12d52f81..e7f58efe83 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query80.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query80.out @@ -2,17 +2,17 @@ -- !ds_shape_80 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalUnion --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF3 p_promo_sk->[ss_promo_sk] @@ -24,26 +24,26 @@ PhysicalResultSink ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF3 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalProject ------------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) --------------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[store_returns] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((item.i_current_price > 50.00)) --------------------------------------------PhysicalOlapScan[item] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((promotion.p_channel_tv = 'N')) --------------------------------------PhysicalOlapScan[promotion] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF7 p_promo_sk->[cs_promo_sk] @@ -55,26 +55,26 @@ PhysicalResultSink ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_catalog_page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() build RFs:RF4 cp_catalog_page_sk->[cs_catalog_page_sk] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 RF6 RF7 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[catalog_page] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter((item.i_current_price > 50.00)) ------------------------------------------------PhysicalOlapScan[item] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[catalog_returns] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((promotion.p_channel_tv = 'N')) --------------------------------------PhysicalOlapScan[promotion] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF11 p_promo_sk->[ws_promo_sk] @@ -86,20 +86,20 @@ PhysicalResultSink ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 RF10 RF11 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalProject ------------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) --------------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[web_returns] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((item.i_current_price > 50.00)) --------------------------------------------PhysicalOlapScan[item] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_site] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((promotion.p_channel_tv = 'N')) --------------------------------------PhysicalOlapScan[promotion] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query81.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query81.out index 759f0b1d74..f38223b693 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query81.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query81.out @@ -4,44 +4,44 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cr_returned_date_sk] ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[catalog_returns] apply RFs: RF1 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[customer_address] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((date_dim.d_year = 2002)) ----------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE))) -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ctr_customer_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[customer] apply RFs: RF3 ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------------PhysicalProject ----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((customer_address.ca_state = 'CA')) --------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query82.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query82.out index e5b1ee4038..7b3d360820 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query82.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query82.out @@ -2,28 +2,28 @@ -- !ds_shape_82 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[store_sales] apply RFs: RF2 ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk] --------------------------PhysicalProject ----------------------------filter((inventory.inv_quantity_on_hand <= 500) and (inventory.inv_quantity_on_hand >= 100)) ------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '1999-09-07') and (date_dim.d_date >= '1999-07-09')) --------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((item.i_current_price <= 47.00) and (item.i_current_price >= 17.00) and i_manufact_id IN (138, 169, 339, 639)) ----------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query83.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query83.out index 3d4b970c24..9e9ac913a3 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query83.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query83.out @@ -3,7 +3,7 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((sr_items.item_id = wr_items.item_id)) otherCondition=() build RFs:RF13 item_id->[i_item_id] @@ -11,7 +11,7 @@ PhysicalResultSink ----------------hashJoin[INNER_JOIN] hashCondition=((sr_items.item_id = cr_items.item_id)) otherCondition=() build RFs:RF12 item_id->[i_item_id] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[sr_returned_date_sk] @@ -19,27 +19,27 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[sr_item_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF10 RF11 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[item] apply RFs: RF12 RF13 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF9 d_date->[d_date] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF8 d_week_seq->[d_week_seq] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF8 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) ------------------------------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cr_returned_date_sk] @@ -47,27 +47,27 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_item_sk = item.i_item_sk)) otherCondition=() ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF7 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[item] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) ------------------------------------------------PhysicalOlapScan[date_dim] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[wr_returned_date_sk] @@ -75,21 +75,21 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_item_sk = item.i_item_sk)) otherCondition=() ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_returns] apply RFs: RF3 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) --------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query84.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query84.out index da18596f2a..9ddde1e174 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query84.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query84.out @@ -2,11 +2,11 @@ -- !ds_shape_84 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF4 cd_demo_sk->[sr_cdemo_sk] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------PhysicalOlapScan[store_returns] apply RFs: RF4 ------------PhysicalProject @@ -16,20 +16,20 @@ PhysicalResultSink --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] ------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer] apply RFs: RF1 RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer_demographics] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((customer_address.ca_city = 'Oakwood')) ------------------------------PhysicalOlapScan[customer_address] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[household_demographics] apply RFs: RF3 -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((cast(ib_upper_bound as BIGINT) <= 55806) and (income_band.ib_lower_bound >= 5806)) ----------------------PhysicalOlapScan[income_band] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query85.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query85.out index fc66cb9011..251ba0bd5a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query85.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query85.out @@ -2,11 +2,11 @@ -- !ds_shape_85 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((reason.r_reason_sk = web_returns.wr_reason_sk)) otherCondition=() @@ -16,11 +16,11 @@ PhysicalResultSink --------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = web_returns.wr_refunded_addr_sk)) otherCondition=((((ca_state IN ('DE', 'FL', 'TX') AND ((web_sales.ws_net_profit >= 100.00) AND (web_sales.ws_net_profit <= 200.00))) OR (ca_state IN ('ID', 'IN', 'ND') AND ((web_sales.ws_net_profit >= 150.00) AND (web_sales.ws_net_profit <= 300.00)))) OR (ca_state IN ('IL', 'MT', 'OH') AND ((web_sales.ws_net_profit >= 50.00) AND (web_sales.ws_net_profit <= 250.00))))) build RFs:RF7 ca_address_sk->[wr_refunded_addr_sk] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((cd1.cd_education_status = cd2.cd_education_status) and (cd1.cd_marital_status = cd2.cd_marital_status) and (cd2.cd_demo_sk = web_returns.wr_returning_cdemo_sk)) otherCondition=() ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() --------------------------------------hashJoin[INNER_JOIN] hashCondition=((cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk)) otherCondition=((((((cd1.cd_marital_status = 'M') AND (cd1.cd_education_status = '4 yr Degree')) AND ((web_sales.ws_sales_price >= 100.00) AND (web_sales.ws_sales_price <= 150.00))) OR (((cd1.cd_marital_status = 'S') AND (cd1.cd_education_status = 'Secondary')) AND ((web_sales.ws_sales_price >= 50.00) AND (web_sales.ws_sales_price <= 100.00)))) OR (((cd1.cd_marital_status = 'W') AND (cd1.cd_education_status = 'Advanced Degree')) AND ((web_sales.ws_sales_price >= 150.00) AND (web_sales.ws_sales_price <= 200.00))))) build RFs:RF2 cd_demo_sk->[wr_refunded_cdemo_sk] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF0 ws_item_sk->[wr_item_sk];RF1 ws_order_number->[wr_order_number] ----------------------------------------------PhysicalProject @@ -28,25 +28,25 @@ PhysicalResultSink ----------------------------------------------PhysicalProject ------------------------------------------------filter((web_sales.ws_net_profit <= 300.00) and (web_sales.ws_net_profit >= 50.00) and (web_sales.ws_sales_price <= 200.00) and (web_sales.ws_sales_price >= 50.00)) --------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------filter(((((cd1.cd_marital_status = 'M') AND (cd1.cd_education_status = '4 yr Degree')) OR ((cd1.cd_marital_status = 'S') AND (cd1.cd_education_status = 'Secondary'))) OR ((cd1.cd_marital_status = 'W') AND (cd1.cd_education_status = 'Advanced Degree')))) ----------------------------------------------PhysicalOlapScan[customer_demographics] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[web_page] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[customer_demographics] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter(((ca_state IN ('DE', 'FL', 'TX') OR ca_state IN ('ID', 'IN', 'ND')) OR ca_state IN ('IL', 'MT', 'OH')) and (customer_address.ca_country = 'United States')) ----------------------------------PhysicalOlapScan[customer_address] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_year = 2000)) ------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[reason] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query86.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query86.out index 740a0e931e..8837418333 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query86.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query86.out @@ -3,15 +3,15 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalRepeat ----------------------------PhysicalProject @@ -19,10 +19,10 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[item] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((d1.d_month_seq <= 1235) and (d1.d_month_seq >= 1224)) --------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query87.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query87.out index 56a1416b7c..4014061fc9 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query87.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query87.out @@ -2,58 +2,58 @@ -- !ds_shape_87 -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------PhysicalExcept ------------PhysicalProject --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) ------------------------------PhysicalOlapScan[date_dim] ------------PhysicalProject --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cs_bill_customer_sk] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) ------------------------------PhysicalOlapScan[date_dim] ------------PhysicalProject --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ws_bill_customer_sk] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) ------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query88.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query88.out index 71b7c40ab2..9225360005 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 @@ -10,7 +10,7 @@ PhysicalResultSink --------------NestedLoopJoin[CROSS_JOIN] ----------------NestedLoopJoin[CROSS_JOIN] ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------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] @@ -19,21 +19,21 @@ PhysicalResultSink --------------------------------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 +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) ----------------------------------------PhysicalOlapScan[time_dim] ---------------------------------PhysicalDistribute +--------------------------------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 +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((store.s_store_name = 'ese')) ----------------------------------PhysicalOlapScan[store] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------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] @@ -42,21 +42,21 @@ PhysicalResultSink ----------------------------------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 +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute < 30)) ------------------------------------------PhysicalOlapScan[time_dim] -----------------------------------PhysicalDistribute +----------------------------------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 +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((store.s_store_name = 'ese')) ------------------------------------PhysicalOlapScan[store] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------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] @@ -65,21 +65,21 @@ PhysicalResultSink --------------------------------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: RF15 RF16 RF17 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute >= 30)) ----------------------------------------PhysicalOlapScan[time_dim] ---------------------------------PhysicalDistribute +--------------------------------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 +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((store.s_store_name = 'ese')) ----------------------------------PhysicalOlapScan[store] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------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] @@ -88,21 +88,21 @@ PhysicalResultSink ------------------------------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: RF12 RF13 RF14 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute < 30)) --------------------------------------PhysicalOlapScan[time_dim] -------------------------------PhysicalDistribute +------------------------------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 +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((store.s_store_name = 'ese')) --------------------------------PhysicalOlapScan[store] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------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] @@ -111,21 +111,21 @@ PhysicalResultSink ----------------------------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: RF9 RF10 RF11 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute >= 30)) ------------------------------------PhysicalOlapScan[time_dim] -----------------------------PhysicalDistribute +----------------------------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 +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((store.s_store_name = 'ese')) ------------------------------PhysicalOlapScan[store] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecReplicated] ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------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] @@ -134,21 +134,21 @@ PhysicalResultSink --------------------------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: RF6 RF7 RF8 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute < 30)) ----------------------------------PhysicalOlapScan[time_dim] ---------------------------PhysicalDistribute +--------------------------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 +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((store.s_store_name = 'ese')) ----------------------------PhysicalOlapScan[store] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------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] @@ -157,21 +157,21 @@ PhysicalResultSink ------------------------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: RF3 RF4 RF5 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute >= 30)) --------------------------------PhysicalOlapScan[time_dim] -------------------------PhysicalDistribute +------------------------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 +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((store.s_store_name = 'ese')) --------------------------PhysicalOlapScan[store] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecReplicated] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------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] @@ -180,15 +180,15 @@ PhysicalResultSink ----------------------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 +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((time_dim.t_hour = 12) and (time_dim.t_minute < 30)) ------------------------------PhysicalOlapScan[time_dim] -----------------------PhysicalDistribute +----------------------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 +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((store.s_store_name = 'ese')) ------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query89.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query89.out index 94d35b4873..db864c472b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query89.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query89.out @@ -3,16 +3,16 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------filter((if(( not (avg_monthly_sales = 0.0000)), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000)) --------------PhysicalWindow ----------------PhysicalQuickSort[LOCAL_SORT] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() @@ -22,15 +22,15 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter(((i_category IN ('Electronics', 'Jewelry', 'Shoes') AND i_class IN ('athletic', 'portable', 'semi-precious')) OR (i_category IN ('Men', 'Music', 'Women') AND i_class IN ('accessories', 'maternity', 'rock')))) ----------------------------------------------PhysicalOlapScan[item] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_year = 1999)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query9.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query9.out index 5b3610bc2e..6f64f57ee2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query9.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query9.out @@ -1,7 +1,7 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_9 -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------NestedLoopJoin[CROSS_JOIN] --------NestedLoopJoin[CROSS_JOIN] @@ -22,122 +22,122 @@ PhysicalResultSink --------------------------------------PhysicalProject ----------------------------------------filter((reason.r_reason_sk = 1)) ------------------------------------------PhysicalOlapScan[reason] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalAssertNumRows ------------------------------------------hashAgg[GLOBAL] ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------------hashAgg[LOCAL] ------------------------------------------------PhysicalProject --------------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ----------------------------------------------------PhysicalOlapScan[store_sales] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalAssertNumRows --------------------------------------hashAgg[GLOBAL] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------------hashAgg[LOCAL] --------------------------------------------PhysicalProject ----------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ------------------------------------------------PhysicalOlapScan[store_sales] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalAssertNumRows ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ----------------------------------------------PhysicalOlapScan[store_sales] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalAssertNumRows ----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------hashAgg[LOCAL] ----------------------------------------PhysicalProject ------------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21)) --------------------------------------------PhysicalOlapScan[store_sales] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalAssertNumRows --------------------------------hashAgg[GLOBAL] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------hashAgg[LOCAL] --------------------------------------PhysicalProject ----------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21)) ------------------------------------------PhysicalOlapScan[store_sales] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalAssertNumRows ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21)) ----------------------------------------PhysicalOlapScan[store_sales] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalAssertNumRows ----------------------------hashAgg[GLOBAL] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------hashAgg[LOCAL] ----------------------------------PhysicalProject ------------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41)) --------------------------------------PhysicalOlapScan[store_sales] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalAssertNumRows --------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject ----------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41)) ------------------------------------PhysicalOlapScan[store_sales] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalAssertNumRows ------------------------hashAgg[GLOBAL] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject --------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41)) ----------------------------------PhysicalOlapScan[store_sales] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalAssertNumRows ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecGather] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61)) --------------------------------PhysicalOlapScan[store_sales] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalAssertNumRows --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecGather] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61)) ------------------------------PhysicalOlapScan[store_sales] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------PhysicalAssertNumRows ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecGather] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61)) ----------------------------PhysicalOlapScan[store_sales] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalAssertNumRows ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecGather] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) --------------------------PhysicalOlapScan[store_sales] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecReplicated] ------------PhysicalAssertNumRows --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecGather] ------------------hashAgg[LOCAL] --------------------PhysicalProject ----------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) ------------------------PhysicalOlapScan[store_sales] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalAssertNumRows ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query90.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query90.out index a1a7a1d890..0628931542 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query90.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query90.out @@ -6,7 +6,7 @@ PhysicalResultSink ------PhysicalProject --------NestedLoopJoin[CROSS_JOIN] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] 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] @@ -15,21 +15,21 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] 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 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((time_dim.t_hour <= 11) and (time_dim.t_hour >= 10)) --------------------------------PhysicalOlapScan[time_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((household_demographics.hd_dep_count = 2)) ------------------------------PhysicalOlapScan[household_demographics] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) --------------------------PhysicalOlapScan[web_page] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecReplicated] ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] 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] @@ -38,15 +38,15 @@ PhysicalResultSink --------------------------hashJoin[INNER_JOIN] 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 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((time_dim.t_hour <= 17) and (time_dim.t_hour >= 16)) ----------------------------------PhysicalOlapScan[time_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((household_demographics.hd_dep_count = 2)) --------------------------------PhysicalOlapScan[household_demographics] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------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/noStatsRfPrune/query91.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query91.out index f41a9409f3..95fb3931f0 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query91.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query91.out @@ -2,45 +2,45 @@ -- !ds_shape_91 -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF5 hd_demo_sk->[c_current_hdemo_sk] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF4 cd_demo_sk->[c_current_cdemo_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cr_returned_date_sk] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] ------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returning_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[cr_returning_customer_sk] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF0 RF2 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 RF4 RF5 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((customer_address.ca_gmt_offset = -6.00)) ------------------------------------------PhysicalOlapScan[customer_address] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001)) ----------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[call_center] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter((((customer_demographics.cd_marital_status = 'M') AND (customer_demographics.cd_education_status = 'Unknown')) OR ((customer_demographics.cd_marital_status = 'W') AND (customer_demographics.cd_education_status = 'Advanced Degree')))) ------------------------------PhysicalOlapScan[customer_demographics] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((hd_buy_potential like '1001-5000%')) --------------------------PhysicalOlapScan[household_demographics] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query92.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query92.out index cb095c4426..03fe8c943d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query92.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query92.out @@ -4,24 +4,24 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalProject --------------filter((cast(ws_ext_discount_amt as DECIMALV3(38, 5)) > (1.3 * avg(cast(ws_ext_discount_amt as DECIMALV3(9, 4))) OVER(PARTITION BY i_item_sk)))) ----------------PhysicalWindow ------------------PhysicalQuickSort[LOCAL_SORT] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((item.i_manufact_id = 320)) ------------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '2002-05-27') and (date_dim.d_date >= '2002-02-26')) --------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query93.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query93.out index 66be953027..6dc48f7c96 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query93.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query93.out @@ -2,10 +2,10 @@ -- !ds_shape_93 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_reason_sk = reason.r_reason_sk)) otherCondition=() build RFs:RF2 r_reason_sk->[sr_reason_sk] @@ -15,7 +15,7 @@ PhysicalResultSink ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_returns] apply RFs: RF2 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((reason.r_reason_desc = 'duplicate purchase')) ------------------------PhysicalOlapScan[reason] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query94.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query94.out index a7f921c597..ceb9643e66 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query94.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query94.out @@ -4,7 +4,7 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] ------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[DISTINCT_LOCAL] ------------hashAgg[GLOBAL] --------------hashAgg[LOCAL] @@ -12,27 +12,27 @@ PhysicalResultSink ------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() --------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] ----------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF2 ws_order_number->[ws_order_number] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk] ----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_ship_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF3 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) ------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((customer_address.ca_state = 'OK')) ----------------------------------PhysicalOlapScan[customer_address] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((web_site.web_company_name = 'pri')) ----------------------------PhysicalOlapScan[web_site] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------PhysicalOlapScan[web_returns] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query95.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query95.out index 9fb38391e5..b54e3c5c0e 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query95.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query95.out @@ -4,17 +4,17 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF6 RF7 ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[DISTINCT_GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecGather] ------------hashAgg[DISTINCT_LOCAL] --------------hashAgg[GLOBAL] ----------------hashAgg[LOCAL] @@ -22,31 +22,31 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF5 wr_order_number->[ws_order_number];RF7 wr_order_number->[ws_order_number,ws_order_number] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[web_returns] ----------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF4 ws_order_number->[ws_order_number];RF6 ws_order_number->[ws_order_number,ws_order_number] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] ----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ws_ship_addr_sk] ------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_ship_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) --------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((customer_address.ca_state = 'NC')) ------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((web_site.web_company_name = 'pri')) ----------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query96.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query96.out index daf0b67a0e..4f48a46df2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query96.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query96.out @@ -4,7 +4,7 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------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] @@ -13,15 +13,15 @@ PhysicalResultSink --------------------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 +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) ----------------------------PhysicalOlapScan[time_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((household_demographics.hd_dep_count = 3)) --------------------------PhysicalOlapScan[household_demographics] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((store.s_store_name = 'ese')) ----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query97.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query97.out index 7b8832c172..c8dd9bf8bd 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query97.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query97.out @@ -4,31 +4,31 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[FULL_OUTER_JOIN] hashCondition=((ssci.customer_sk = csci.customer_sk) and (ssci.item_sk = csci.item_sk)) otherCondition=() ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_month_seq <= 1225) and (date_dim.d_month_seq >= 1214)) ----------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_month_seq <= 1225) and (date_dim.d_month_seq >= 1214)) ----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query98.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query98.out index 9b770419b7..2eb2876c02 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query98.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query98.out @@ -2,14 +2,14 @@ -- !ds_shape_98 -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] @@ -17,11 +17,11 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter(i_category IN ('Music', 'Shoes', 'Sports')) ------------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '2002-06-19') and (date_dim.d_date >= '2002-05-20')) --------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query99.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query99.out index 24c8cee59e..9f6ce5d0e1 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query99.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query99.out @@ -2,10 +2,10 @@ -- !ds_shape_99 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() @@ -15,17 +15,17 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() --------------------------PhysicalProject ----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[call_center] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_month_seq <= 1235) and (date_dim.d_month_seq >= 1224)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[ship_mode] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[warehouse] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query1.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query1.out index 400e67a5da..d0f8900a56 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query1.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query1.out @@ -4,39 +4,39 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] ----------------PhysicalProject ------------------PhysicalOlapScan[store_returns] apply RFs: RF0 -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((date_dim.d_year = 2000)) ----------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE))) --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = ctr1.ctr_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ctr_store_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ctr_customer_sk] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((store.s_state = 'SD')) ------------------------PhysicalOlapScan[store] --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query10.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query10.out index 9abd313cfd..3cd5b3070c 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query10.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query10.out @@ -3,10 +3,10 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------filter(($c$1 OR $c$2)) @@ -14,42 +14,42 @@ PhysicalResultSink ----------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() ------------------------PhysicalProject --------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) ----------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF3 cd_demo_sk->[c_current_cdemo_sk] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[c_current_addr_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 RF3 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County')) ------------------------------------------PhysicalOlapScan[customer_address] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalOlapScan[customer_demographics] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) ------------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) ----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query11.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query11.out index 45403c6abb..6922272ef0 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query11.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query11.out @@ -4,58 +4,58 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((PULL_UP_UNIFIED_OUTPUT_ALIAS = customer.c_customer_sk)) otherCondition=() ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalUnion --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (2001, 2002)) --------------------------------PhysicalOlapScan[date_dim] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (2001, 2002)) --------------------------------PhysicalOlapScan[date_dim] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[customer] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000) > if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000))) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((t_w_secyear.dyear = 2002) and (t_w_secyear.sale_type = 'w')) --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((t_w_firstyear.dyear = 2001) and (t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year_total > 0.00)) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ------------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((t_s_secyear.dyear = 2002) and (t_s_secyear.sale_type = 's')) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((t_s_firstyear.dyear = 2001) and (t_s_firstyear.sale_type = 's') and (t_s_firstyear.year_total > 0.00)) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query12.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query12.out index b87354dbb9..602833b969 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query12.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query12.out @@ -2,14 +2,14 @@ -- !ds_shape_12 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] @@ -17,11 +17,11 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter(i_category IN ('Books', 'Men', 'Sports')) ------------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '1998-05-06') and (date_dim.d_date >= '1998-04-06')) --------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query13.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query13.out index 422ab6674d..bb8d755b7d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query13.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query13.out @@ -2,7 +2,7 @@ -- !ds_shape_13 -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] @@ -12,26 +12,26 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] ----------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter((store_sales.ss_net_profit <= 300.00) and (store_sales.ss_net_profit >= 50.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) ------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter(((((customer_demographics.cd_marital_status = 'D') AND (customer_demographics.cd_education_status = 'Unknown')) OR ((customer_demographics.cd_marital_status = 'S') AND (customer_demographics.cd_education_status = 'College'))) OR ((customer_demographics.cd_marital_status = 'M') AND (customer_demographics.cd_education_status = '4 yr Degree')))) ------------------------------PhysicalOlapScan[customer_demographics] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter(((ca_state IN ('KS', 'MI', 'SD') OR ca_state IN ('CO', 'MO', 'ND')) OR ca_state IN ('NH', 'OH', 'TX')) and (customer_address.ca_country = 'United States')) ------------------------PhysicalOlapScan[customer_address] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter(hd_dep_count IN (1, 3)) ----------------------PhysicalOlapScan[household_demographics] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalProject ----------------filter((date_dim.d_year = 2001)) ------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query14.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query14.out index 5aebc906be..82934d6f0b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query14.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query14.out @@ -5,91 +5,91 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((item.i_brand_id = t.brand_id) and (item.i_category_id = t.category_id) and (item.i_class_id = t.class_id)) otherCondition=() build RFs:RF6 i_class_id->[i_class_id];RF7 i_category_id->[i_category_id];RF8 i_brand_id->[i_brand_id] --------PhysicalIntersect -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = iss.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8 -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((d1.d_year <= 2002) and (d1.d_year >= 2000)) ----------------------PhysicalOlapScan[date_dim] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = ics.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((d2.d_year <= 2002) and (d2.d_year >= 2000)) ----------------------PhysicalOlapScan[date_dim] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = iws.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ws_item_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((d3.d_year <= 2002) and (d3.d_year >= 2000)) ----------------------PhysicalOlapScan[date_dim] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[item] --PhysicalCteAnchor ( cteId=CTEId#1 ) ----PhysicalCteProducer ( cteId=CTEId#1 ) ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalUnion ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ss_sold_date_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[store_sales] apply RFs: RF9 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_year <= 2002) and (date_dim.d_year >= 2000)) --------------------------PhysicalOlapScan[date_dim] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF10 d_date_sk->[cs_sold_date_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF10 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_year <= 2002) and (date_dim.d_year >= 2000)) --------------------------PhysicalOlapScan[date_dim] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[ws_sold_date_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[web_sales] apply RFs: RF11 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_year <= 2002) and (date_dim.d_year >= 2000)) --------------------------PhysicalOlapScan[date_dim] ----PhysicalResultSink ------PhysicalTopN[MERGE_SORT] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalRepeat ----------------------PhysicalUnion @@ -97,81 +97,81 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------NestedLoopJoin[INNER_JOIN](cast(sales as DOUBLE) > cast(average_sales as DOUBLE)) ----------------------------PhysicalProject ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF14 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF13 i_item_sk->[ss_item_sk] --------------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((store_sales.ss_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF12 ss_item_sk->[ss_item_sk] -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------PhysicalProject --------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF12 RF13 RF14 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[item] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) ----------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalAssertNumRows ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ------------------------PhysicalProject --------------------------NestedLoopJoin[INNER_JOIN](cast(sales as DOUBLE) > cast(average_sales as DOUBLE)) ----------------------------PhysicalProject ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF17 d_date_sk->[cs_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF16 i_item_sk->[cs_item_sk] --------------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((catalog_sales.cs_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF15 ss_item_sk->[cs_item_sk] -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------PhysicalProject --------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF15 RF16 RF17 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[item] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) ----------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalAssertNumRows ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ------------------------PhysicalProject --------------------------NestedLoopJoin[INNER_JOIN](cast(sales as DOUBLE) > cast(average_sales as DOUBLE)) ----------------------------PhysicalProject ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF20 d_date_sk->[ws_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF19 i_item_sk->[ws_item_sk] --------------------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF18 ws_item_sk->[ss_item_sk] -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------PhysicalProject --------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF19 RF20 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[item] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) ----------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalAssertNumRows ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query15.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query15.out index cc2c80573c..8e929d24b0 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query15.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query15.out @@ -2,28 +2,28 @@ -- !ds_shape_15 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=(((substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274') OR ca_state IN ('CA', 'GA', 'WA')) OR (catalog_sales.cs_sales_price > 500.00))) build RFs:RF1 ca_address_sk->[c_current_addr_sk] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[cs_bill_customer_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF2 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer] apply RFs: RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer_address] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((date_dim.d_qoy = 1) and (date_dim.d_year = 2001)) ------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query16.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query16.out index b08f9d6273..4e0cd864a3 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query16.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query16.out @@ -4,7 +4,7 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] ------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[DISTINCT_LOCAL] ------------hashAgg[GLOBAL] --------------hashAgg[LOCAL] @@ -12,27 +12,27 @@ PhysicalResultSink ------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() --------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk] ----------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF2 cs_order_number->[cs_order_number] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[cs_ship_addr_sk] ----------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_ship_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF3 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) ------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((customer_address.ca_state = 'WV')) ----------------------------------PhysicalOlapScan[customer_address] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) ----------------------------PhysicalOlapScan[call_center] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------PhysicalOlapScan[catalog_returns] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query17.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query17.out index 188d751519..77b3974006 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query17.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query17.out @@ -3,10 +3,10 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF9 s_store_sk->[ss_store_sk] @@ -19,32 +19,32 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 cs_bill_customer_sk->[sr_customer_sk];RF4 cs_item_sk->[sr_item_sk] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_customer_sk->[ss_customer_sk];RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF5 RF8 RF9 --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF3 RF4 RF6 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((d1.d_quarter_name = '2001Q1')) ----------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) ------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) --------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[item] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query18.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query18.out index 1773a79fd6..6b8288ef15 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query18.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query18.out @@ -2,11 +2,11 @@ -- !ds_shape_18 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject @@ -16,32 +16,32 @@ PhysicalResultSink --------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() build RFs:RF2 cd_demo_sk->[c_current_cdemo_sk] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF1 cd_demo_sk->[cs_bill_cdemo_sk] --------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[cs_bill_customer_sk] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF4 RF5 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------filter(c_birth_month IN (1, 10, 2, 4, 7, 8)) ----------------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 RF3 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((cd1.cd_education_status = 'Advanced Degree') and (cd1.cd_gender = 'F')) --------------------------------------------PhysicalOlapScan[customer_demographics] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[customer_demographics] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter(ca_state IN ('GA', 'IN', 'ME', 'NC', 'OK', 'WA', 'WY')) ----------------------------------PhysicalOlapScan[customer_address] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[item] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_year = 1998)) ----------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query19.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query19.out index 90ce99f7de..ebe8d7ea94 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query19.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query19.out @@ -2,11 +2,11 @@ -- !ds_shape_19 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=(( not (substring(ca_zip, 1, 5) = substring(s_zip, 1, 5)))) build RFs:RF4 s_store_sk->[ss_store_sk] @@ -16,24 +16,24 @@ PhysicalResultSink --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] ----------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ss_customer_sk] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF2 RF3 RF4 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((item.i_manager_id = 2)) ----------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) ------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query2.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query2.out index 10d0547d00..0d21221718 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query2.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query2.out @@ -3,41 +3,41 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) --PhysicalCteProducer ( cteId=CTEId#1 ) ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = wscs.sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk,cs_sold_date_sk] --------------PhysicalUnion -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[web_sales] apply RFs: RF0 -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------PhysicalProject ------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_week_seq = d_week_seq2)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq] --------------hashJoin[INNER_JOIN] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(d_week_seq2 - 53))) otherCondition=() -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF1 d_week_seq->[d_week_seq] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------------PhysicalProject --------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_year = 1998)) ----------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------PhysicalProject ------------------filter((date_dim.d_year = 1999)) --------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query20.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query20.out index 6ce86e33fe..ace2a6c74a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query20.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query20.out @@ -2,14 +2,14 @@ -- !ds_shape_20 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] @@ -17,11 +17,11 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter(i_category IN ('Books', 'Shoes', 'Women')) ------------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '2002-02-25') and (date_dim.d_date >= '2002-01-26')) --------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query21.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query21.out index a7b41e3af9..1a6db8a6a4 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query21.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query21.out @@ -2,11 +2,11 @@ -- !ds_shape_21 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------filter((if((inv_before > 0), (cast(inv_after as DOUBLE) / cast(inv_before as DOUBLE)), NULL) <= 1.5) and (if((inv_before > 0), (cast(inv_after as DOUBLE) / cast(inv_before as DOUBLE)), NULL) >= cast((2.000000 / 3.0) as DOUBLE))) ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[inv_date_sk] @@ -14,14 +14,14 @@ PhysicalResultSink ----------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF1 w_warehouse_sk->[inv_warehouse_sk] ------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] --------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) --------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[warehouse] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_date <= '2002-03-29') and (date_dim.d_date >= '2002-01-28')) --------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query22.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query22.out index ca25b08047..d528b3cc29 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query22.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query22.out @@ -2,11 +2,11 @@ -- !ds_shape_22 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject @@ -14,10 +14,10 @@ PhysicalResultSink ----------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[item] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_month_seq <= 1199) and (date_dim.d_month_seq >= 1188)) ----------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query23.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query23.out index b7577680eb..24ab3d18bd 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query23.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query23.out @@ -5,17 +5,17 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalProject ------filter((cnt > 4)) --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter(d_year IN (2000, 2001, 2002, 2003)) ------------------------PhysicalOlapScan[date_dim] @@ -24,26 +24,26 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalProject --------NestedLoopJoin[INNER_JOIN](cast(ssales as DOUBLE) > cast((0.9500 * tpcds_cmax) as DOUBLE)) ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------filter(( not ss_customer_sk IS NULL)) --------------------PhysicalOlapScan[store_sales] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecReplicated] ------------PhysicalProject --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecGather] ------------------hashAgg[LOCAL] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------filter(( not ss_customer_sk IS NULL)) ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter(d_year IN (2000, 2001, 2002, 2003)) --------------------------------------PhysicalOlapScan[date_dim] @@ -51,43 +51,43 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalLimit[GLOBAL] --------PhysicalLimit[LOCAL] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalUnion ------------------PhysicalProject --------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] --------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000)) --------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ------------------PhysicalProject --------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ws_sold_date_sk] --------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF5 RF6 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000)) --------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query24.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query24.out index d73e9597ac..7912023ea7 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query24.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query24.out @@ -4,7 +4,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((store.s_zip = customer_address.ca_zip) and (store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_zip->[ca_zip];RF6 s_store_sk->[ss_store_sk] @@ -12,45 +12,45 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] --------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=(( not (c_birth_country = upper(ca_country)))) build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_item_sk->[ss_item_sk];RF1 sr_ticket_number->[ss_ticket_number] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4 RF6 ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_returns] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[customer] apply RFs: RF3 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer_address] apply RFs: RF5 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((store.s_market_id = 8)) ----------------------PhysicalOlapScan[store] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalProject ------------NestedLoopJoin[INNER_JOIN](cast(paid as DOUBLE) > cast((0.05 * avg(cast(netpaid as DECIMALV3(38, 4)))) as DOUBLE)) --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject ------------------------filter((ssales.i_color = 'beige')) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecGather] ----------------------hashAgg[LOCAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------------PhysicalProject ----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query25.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query25.out index 74f2479cbb..8a2f034a72 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query25.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query25.out @@ -2,10 +2,10 @@ -- !ds_shape_25 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF9 s_store_sk->[ss_store_sk] @@ -18,32 +18,32 @@ PhysicalResultSink ------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 cs_bill_customer_sk->[sr_customer_sk];RF4 cs_item_sk->[sr_item_sk] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_customer_sk->[ss_customer_sk];RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF5 RF8 RF9 ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF3 RF4 RF6 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((d2.d_moy <= 10) and (d2.d_moy >= 4) and (d2.d_year = 2000)) ----------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((d3.d_moy <= 10) and (d3.d_moy >= 4) and (d3.d_year = 2000)) ------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query26.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query26.out index b9b76d1e19..c9bc399351 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query26.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query26.out @@ -2,10 +2,10 @@ -- !ds_shape_26 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF3 p_promo_sk->[cs_promo_sk] @@ -16,18 +16,18 @@ PhysicalResultSink --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[cs_bill_cdemo_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 RF3 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((customer_demographics.cd_education_status = 'Unknown') and (customer_demographics.cd_gender = 'M') and (customer_demographics.cd_marital_status = 'S')) ----------------------------------PhysicalOlapScan[customer_demographics] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[item] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_year = 2001)) ----------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter(((promotion.p_channel_email = 'N') OR (promotion.p_channel_event = 'N'))) ------------------------PhysicalOlapScan[promotion] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query27.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query27.out index 083ff4d486..68448494e8 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query27.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query27.out @@ -3,11 +3,11 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalRepeat --------------------PhysicalProject @@ -19,18 +19,18 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((customer_demographics.cd_education_status = 'Secondary') and (customer_demographics.cd_gender = 'F') and (customer_demographics.cd_marital_status = 'D')) ----------------------------------------PhysicalOlapScan[customer_demographics] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_year = 1999)) ------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter(s_state IN ('AL', 'LA', 'MI', 'MO', 'SC', 'TN')) ------------------------------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 079837446a..08f72b84ba 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 @@ -15,47 +15,47 @@ PhysicalResultSink ------------------------NestedLoopJoin[CROSS_JOIN] --------------------------PhysicalLimit[LOCAL] ----------------------------hashAgg[GLOBAL] -------------------------------PhysicalDistribute +------------------------------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 +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalLimit[LOCAL] ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------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 +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalLimit[LOCAL] --------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute +----------------------------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 +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalLimit[LOCAL] ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------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 +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------PhysicalLimit[LOCAL] ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------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 +----------PhysicalDistribute[DistributionSpecReplicated] ------------PhysicalLimit[LOCAL] --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------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)) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query29.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query29.out index 02129ed341..194fb43a5b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query29.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query29.out @@ -2,10 +2,10 @@ -- !ds_shape_29 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF9 s_store_sk->[ss_store_sk] @@ -17,32 +17,32 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 cs_bill_customer_sk->[sr_customer_sk];RF4 cs_item_sk->[sr_item_sk] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_customer_sk->[ss_customer_sk];RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF5 RF8 RF9 ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF3 RF4 RF7 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF6 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1999)) ------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000, 2001)) --------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((d2.d_moy <= 7) and (d2.d_moy >= 4) and (d2.d_year = 1999)) ------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query3.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query3.out index 7704d94620..5a86e9fdb7 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query3.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query3.out @@ -2,22 +2,22 @@ -- !ds_shape_3 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((item.i_manufact_id = 816)) ----------------------------PhysicalOlapScan[item] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((dt.d_moy = 11)) --------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query30.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query30.out index efabd805eb..509e53f182 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query30.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query30.out @@ -4,43 +4,43 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[wr_returned_date_sk] ----------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[wr_returning_addr_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[web_returns] apply RFs: RF0 RF1 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[customer_address] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((date_dim.d_year = 2002)) ----------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] --------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE))) -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ctr_customer_sk] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer] apply RFs: RF3 ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------------PhysicalProject --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------PhysicalProject ------------------filter((customer_address.ca_state = 'IN')) --------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query31.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query31.out index af348e09ac..5a0036ae4d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query31.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query31.out @@ -4,17 +4,17 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ss_addr_sk] ------------------PhysicalProject --------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[customer_address] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((ss.d_year = 2000) and d_qoy IN (1, 2, 3)) ----------------------PhysicalOlapScan[date_dim] @@ -22,24 +22,24 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalCteProducer ( cteId=CTEId#1 ) ------PhysicalProject --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ws_sold_date_sk] ------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ws_bill_addr_sk] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------PhysicalOlapScan[customer_address] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((ws.d_year = 2000) and d_qoy IN (1, 2, 3)) ------------------------PhysicalOlapScan[date_dim] ----PhysicalResultSink ------PhysicalQuickSort[MERGE_SORT] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------PhysicalQuickSort[LOCAL_SORT] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((ws1.ca_county = ws3.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) @@ -48,28 +48,28 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------hashJoin[INNER_JOIN] hashCondition=((ss1.ca_county = ws1.ca_county)) otherCondition=() ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((ss2.ca_county = ss3.ca_county)) otherCondition=() ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------filter((ss3.d_qoy = 3) and (ss3.d_year = 2000)) --------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------------------hashJoin[INNER_JOIN] hashCondition=((ss1.ca_county = ss2.ca_county)) otherCondition=() -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------filter((ss1.d_qoy = 1) and (ss1.d_year = 2000)) ----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------filter((ss2.d_qoy = 2) and (ss2.d_year = 2000)) ----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((ws1.d_qoy = 1) and (ws1.d_year = 2000)) ----------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((ws2.d_qoy = 2) and (ws2.d_year = 2000)) --------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------filter((ws3.d_qoy = 3) and (ws3.d_year = 2000)) ----------------------PhysicalCteConsumer ( cteId=CTEId#1 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query32.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query32.out index fa698587ba..4ba68645ec 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query32.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query32.out @@ -4,24 +4,24 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalProject --------------filter((cast(cs_ext_discount_amt as DECIMALV3(38, 5)) > (1.3 * avg(cast(cs_ext_discount_amt as DECIMALV3(9, 4))) OVER(PARTITION BY i_item_sk)))) ----------------PhysicalWindow ------------------PhysicalQuickSort[LOCAL_SORT] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((item.i_manufact_id = 29)) ------------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '1999-04-07') and (date_dim.d_date >= '1999-01-07')) --------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query33.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query33.out index 3524e2e1ad..9a90bc4737 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query33.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query33.out @@ -2,15 +2,15 @@ -- !ds_shape_33 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] @@ -19,26 +19,26 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF0 i_manufact_id->[i_manufact_id] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[item] apply RFs: RF0 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Home')) --------------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] @@ -47,26 +47,26 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[cs_bill_addr_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF4 i_manufact_id->[i_manufact_id] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[item] apply RFs: RF4 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Home')) --------------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] @@ -75,20 +75,20 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[ws_bill_addr_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 RF11 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF8 i_manufact_id->[i_manufact_id] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[item] apply RFs: RF8 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Home')) --------------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query34.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query34.out index ac5d62c541..00161e3291 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query34.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query34.out @@ -2,16 +2,16 @@ -- !ds_shape_34 -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk] ------------PhysicalProject --------------PhysicalOlapScan[customer] apply RFs: RF3 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------filter((dn.cnt <= 20) and (dn.cnt >= 15)) ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------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] @@ -20,15 +20,15 @@ PhysicalResultSink ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((((date_dim.d_dom >= 1) AND (date_dim.d_dom <= 3)) OR ((date_dim.d_dom >= 25) AND (date_dim.d_dom <= 28))) and d_year IN (1998, 1999, 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.2) and hd_buy_potential IN ('0-500', '1001-5000')) ----------------------------------PhysicalOlapScan[household_demographics] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(s_county IN ('Barrow County', 'Daviess County', 'Franklin Parish', 'Luce County', 'Richland County', 'Walker County', 'Williamson County', 'Ziebach County')) --------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query35.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query35.out index 309523a3ad..5f7e82e197 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query35.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query35.out @@ -3,10 +3,10 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------filter(($c$1 OR $c$2)) @@ -14,43 +14,43 @@ PhysicalResultSink ----------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() ------------------------PhysicalProject --------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ----------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF3 cd_demo_sk->[c_current_cdemo_sk] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[c_current_addr_sk] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 RF3 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[customer_demographics] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ------------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query36.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query36.out index 02a54a4129..798c3f81dc 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query36.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query36.out @@ -3,15 +3,15 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalRepeat ----------------------------PhysicalProject @@ -21,14 +21,14 @@ PhysicalResultSink ------------------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[item] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((d1.d_year = 2002)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter(s_state IN ('AL', 'GA', 'MI', 'MO', 'OH', 'SC', 'SD', 'TN')) --------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query37.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query37.out index 0c15104a50..7a603d7e58 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query37.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query37.out @@ -2,28 +2,28 @@ -- !ds_shape_37 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk] --------------------------PhysicalProject ----------------------------filter((inventory.inv_quantity_on_hand <= 500) and (inventory.inv_quantity_on_hand >= 100)) ------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '1999-04-22') and (date_dim.d_date >= '1999-02-21')) --------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((item.i_current_price <= 75.00) and (item.i_current_price >= 45.00) and i_manufact_id IN (1000, 707, 747, 856)) ----------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query38.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query38.out index deaed932e3..eff7a693b7 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query38.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query38.out @@ -4,58 +4,58 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalProject --------------PhysicalIntersect ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ss_customer_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ----------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cs_bill_customer_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ----------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ws_bill_customer_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query39.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query39.out index 5822f2b3c2..7aec7df063 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 @@ -7,32 +7,32 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------hashAgg[LOCAL] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF2 w_warehouse_sk->[inv_warehouse_sk] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] ----------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[item] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((date_dim.d_year = 1998) and d_moy IN (1, 2)) ------------------------PhysicalOlapScan[date_dim] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------PhysicalOlapScan[warehouse] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] -------PhysicalDistribute +------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 +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((inv1.d_moy = 1)) --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalDistribute +--------------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/query4.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query4.out index f9acbf40df..e1934aa466 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query4.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query4.out @@ -4,82 +4,82 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((PULL_UP_UNIFIED_OUTPUT_ALIAS = customer.c_customer_sk)) otherCondition=() ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalUnion --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000)) --------------------------------PhysicalOlapScan[date_dim] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000)) --------------------------------PhysicalOlapScan[date_dim] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000)) --------------------------------PhysicalOlapScan[date_dim] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[customer] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((t_w_secyear.dyear = 2000) and (t_w_secyear.sale_type = 'w')) --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((t_w_firstyear.dyear = 1999) and (t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year_total > 0.000000)) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((t_c_secyear.dyear = 2000) and (t_c_secyear.sale_type = 'c')) ----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_c_firstyear.customer_id)) otherCondition=() ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------filter((t_c_firstyear.dyear = 1999) and (t_c_firstyear.sale_type = 'c') and (t_c_firstyear.year_total > 0.000000)) --------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------filter((t_s_secyear.dyear = 2000) and (t_s_secyear.sale_type = 's')) ----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------filter((t_s_firstyear.dyear = 1999) and (t_s_firstyear.sale_type = 's') and (t_s_firstyear.year_total > 0.000000)) ----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query40.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query40.out index 8135cdf1b7..fe24268b63 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query40.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query40.out @@ -2,10 +2,10 @@ -- !ds_shape_40 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF2 w_warehouse_sk->[cs_warehouse_sk] @@ -15,17 +15,17 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) --------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_date <= '2001-05-02') and (date_dim.d_date >= '2001-03-03')) ------------------------------PhysicalOlapScan[date_dim] ----------------------PhysicalProject ------------------------PhysicalOlapScan[catalog_returns] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[warehouse] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query41.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query41.out index 584dda5785..f07731a85b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query41.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query41.out @@ -2,21 +2,21 @@ -- !ds_shape_41 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((item.i_manufact = i1.i_manufact)) otherCondition=() build RFs:RF0 i_manufact->[i_manufact] ------------------PhysicalProject --------------------filter((i1.i_manufact_id <= 788) and (i1.i_manufact_id >= 748)) ----------------------PhysicalOlapScan[item] apply RFs: RF0 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((item_cnt > 0)) ------------------------hashAgg[GLOBAL] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject --------------------------------filter((((((((((((item.i_category = 'Women') AND i_color IN ('aquamarine', 'gainsboro')) AND i_units IN ('Dozen', 'Ounce')) AND i_size IN ('economy', 'medium')) OR ((((item.i_category = 'Women') AND i_color IN ('chiffon', 'violet')) AND i_units IN ('Pound', 'Ton')) AND i_size IN ('extra large', 'small'))) OR ((((item.i_category = 'Women') AND i_color IN ('blanched', 'tomato')) AND i_units IN ('Case', 'Tbl')) AND i_size IN ('economy', 'medium'))) OR ((((item.i_category = 'Women') AND i_color IN ('almond', 'lime')) AND i_units IN ('Box', 'Dram')) AND i_size IN ('extra large', 'small'))) OR ((((item.i_category = 'Men') AND i_color IN ('blue', 'chartreuse')) AND i_units IN ('Each', 'Oz')) AND i_size IN ('N/A', 'large'))) OR ((((item.i_category = 'Men') AND i_color IN ('dodger', 'tan')) AND i_units IN ('Bunch', 'Tsp')) AND i_size IN ('economy', 'medium'))) OR ((((item.i_category = 'Men') AND i_color IN ('peru', 'saddle')) AND i_units IN ('Gram', 'Pallet')) AND i_size IN ('N/A', 'large'))) OR ((((item.i_category = 'Men') AND i_color IN ('indian', 'spring')) AND i_units IN ('Carton', 'Unknown')) AND i_size IN ('economy', 'medium')))) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query42.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query42.out index 7d6239b062..fe908b68c8 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query42.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query42.out @@ -2,21 +2,21 @@ -- !ds_shape_42 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((item.i_manager_id = 1)) --------------------------PhysicalOlapScan[item] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((dt.d_moy = 11) and (dt.d_year = 2002)) ------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query43.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query43.out index 445a381983..2de98f4e1f 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query43.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query43.out @@ -2,10 +2,10 @@ -- !ds_shape_43 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] @@ -13,11 +13,11 @@ PhysicalResultSink --------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_year = 2000)) ----------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((store.s_gmt_offset = -5.00)) ------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query44.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query44.out index a9fee885c5..3f377d4f21 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query44.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query44.out @@ -2,74 +2,74 @@ -- !ds_shape_44 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((asceding.rnk = descending.rnk)) otherCondition=() -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter((rnk < 11)) ------------------------------PhysicalWindow --------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------PhysicalQuickSort[LOCAL_SORT] --------------------------------------PhysicalPartitionTopN ----------------------------------------PhysicalProject ------------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DOUBLE) > cast((0.9 * rank_col) as DOUBLE)) --------------------------------------------PhysicalProject ----------------------------------------------hashAgg[GLOBAL] -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------------hashAgg[LOCAL] ----------------------------------------------------PhysicalProject ------------------------------------------------------filter((ss1.ss_store_sk = 146)) --------------------------------------------------------PhysicalOlapScan[store_sales] ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalAssertNumRows -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------------------PhysicalProject ----------------------------------------------------hashAgg[GLOBAL] -------------------------------------------------------PhysicalDistribute +------------------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------------------hashAgg[LOCAL] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL) --------------------------------------------------------------PhysicalOlapScan[store_sales] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter((rnk < 11)) ------------------------------PhysicalWindow --------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------PhysicalQuickSort[LOCAL_SORT] --------------------------------------PhysicalPartitionTopN ----------------------------------------PhysicalProject ------------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DOUBLE) > cast((0.9 * rank_col) as DOUBLE)) --------------------------------------------PhysicalProject ----------------------------------------------hashAgg[GLOBAL] -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------------hashAgg[LOCAL] ----------------------------------------------------PhysicalProject ------------------------------------------------------filter((ss1.ss_store_sk = 146)) --------------------------------------------------------PhysicalOlapScan[store_sales] ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalAssertNumRows -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------------------PhysicalProject ----------------------------------------------------hashAgg[GLOBAL] -------------------------------------------------------PhysicalDistribute +------------------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------------------hashAgg[LOCAL] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL) --------------------------------------------------------------PhysicalOlapScan[store_sales] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[item] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query45.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query45.out index d01db0886a..3617dbf4b5 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query45.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query45.out @@ -2,10 +2,10 @@ -- !ds_shape_45 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------filter((substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274') OR $c$1)) @@ -15,26 +15,26 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ws_item_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ws_bill_customer_sk] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF2 RF3 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer_address] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_qoy = 2) and (date_dim.d_year = 2000)) ------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter(i_item_sk IN (11, 13, 17, 19, 2, 23, 29, 3, 5, 7)) --------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query46.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query46.out index 478db9b52a..d4b2d98c35 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query46.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query46.out @@ -2,19 +2,19 @@ -- !ds_shape_46 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) build RFs:RF5 ca_address_sk->[c_current_addr_sk] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ss_addr_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------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_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] @@ -22,25 +22,25 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter(d_dow IN (0, 6) and d_year IN (1999, 2000, 2001)) ----------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter(((household_demographics.hd_dep_count = 6) OR (household_demographics.hd_vehicle_count = 0))) ------------------------------------------PhysicalOlapScan[household_demographics] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter(s_city IN ('Centerville', 'Fairview', 'Five Points', 'Liberty', 'Oak Grove')) ----------------------------------------PhysicalOlapScan[store] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer_address] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[customer] apply RFs: RF5 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query47.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query47.out index 804edea5ec..371ab5bf0a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query47.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query47.out @@ -7,10 +7,10 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------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] @@ -20,33 +20,33 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[item] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((((date_dim.d_year = 2001) OR ((date_dim.d_year = 2000) AND (date_dim.d_moy = 12))) OR ((date_dim.d_year = 2002) AND (date_dim.d_moy = 1)))) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store] --PhysicalResultSink ----PhysicalProject ------PhysicalTopN[MERGE_SORT] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1)) and (v1.s_company_name = v1_lead.s_company_name) and (v1.s_store_name = v1_lead.s_store_name)) otherCondition=() ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((v1.i_brand = v1_lag.i_brand) and (v1.i_category = v1_lag.i_category) and (v1.rn = expr_(rn + 1)) and (v1.s_company_name = v1_lag.s_company_name) and (v1.s_store_name = v1_lag.s_store_name)) otherCondition=() ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000) and (v2.avg_monthly_sales > 0.0000) and (v2.d_year = 2001)) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query48.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query48.out index 9d3aeff4bc..496160afe5 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query48.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query48.out @@ -2,7 +2,7 @@ -- !ds_shape_48 -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] @@ -11,22 +11,22 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] --------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=((((((customer_demographics.cd_marital_status = 'U') AND (customer_demographics.cd_education_status = 'Primary')) AND ((store_sales.ss_sales_price >= 100.00) AND (store_sales.ss_sales_price <= 150.00))) OR (((customer_demographics.cd_marital_status = 'W') AND (customer_demographics.cd_education_status = 'College')) AND ((store_sales.ss_sales_price >= 50.00) AND (store_sales.ss_sales_price <= 100.00)))) OR (((customer_demographics.cd_marital_status = 'D') AND (customer_demographics.cd_education_status = '2 yr Degree')) AND ((store_sales.ss_sales_price >= 150.00) AND (store_sales.ss_sales_price <= 200.00))))) build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((store_sales.ss_net_profit <= 25000.00) and (store_sales.ss_net_profit >= 0.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter(((((customer_demographics.cd_marital_status = 'U') AND (customer_demographics.cd_education_status = 'Primary')) OR ((customer_demographics.cd_marital_status = 'W') AND (customer_demographics.cd_education_status = 'College'))) OR ((customer_demographics.cd_marital_status = 'D') AND (customer_demographics.cd_education_status = '2 yr Degree')))) ----------------------------PhysicalOlapScan[customer_demographics] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter(((ca_state IN ('IA', 'MD', 'MN') OR ca_state IN ('IL', 'TX', 'VA')) OR ca_state IN ('IN', 'MI', 'WI')) and (customer_address.ca_country = 'United States')) ----------------------PhysicalOlapScan[customer_address] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalProject ----------------filter((date_dim.d_year = 1999)) ------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query49.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query49.out index 5066785a90..402043b9cd 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query49.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query49.out @@ -2,24 +2,24 @@ -- !ds_shape_49 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------filter(((return_rank <= 10) OR (currency_rank <= 10))) ----------------------PhysicalWindow ------------------------PhysicalQuickSort[LOCAL_SORT] --------------------------PhysicalWindow ----------------------------PhysicalQuickSort[MERGE_SORT] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------PhysicalQuickSort[LOCAL_SORT] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] @@ -31,22 +31,22 @@ PhysicalResultSink --------------------------------------------------PhysicalProject ----------------------------------------------------filter((wr.wr_return_amt > 10000.00)) ------------------------------------------------------PhysicalOlapScan[web_returns] -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) ----------------------------------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------filter(((return_rank <= 10) OR (currency_rank <= 10))) ----------------------PhysicalWindow ------------------------PhysicalQuickSort[LOCAL_SORT] --------------------------PhysicalWindow ----------------------------PhysicalQuickSort[MERGE_SORT] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------PhysicalQuickSort[LOCAL_SORT] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] @@ -58,22 +58,22 @@ PhysicalResultSink --------------------------------------------------PhysicalProject ----------------------------------------------------filter((cr.cr_return_amount > 10000.00)) ------------------------------------------------------PhysicalOlapScan[catalog_returns] -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) ----------------------------------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------filter(((return_rank <= 10) OR (currency_rank <= 10))) ----------------------PhysicalWindow ------------------------PhysicalQuickSort[LOCAL_SORT] --------------------------PhysicalWindow ----------------------------PhysicalQuickSort[MERGE_SORT] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------PhysicalQuickSort[LOCAL_SORT] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk] @@ -85,7 +85,7 @@ PhysicalResultSink --------------------------------------------------PhysicalProject ----------------------------------------------------filter((sr.sr_return_amt > 10000.00)) ------------------------------------------------------PhysicalOlapScan[store_returns] -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) ----------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query5.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query5.out index 77148e5b99..f033dc4498 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query5.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query5.out @@ -2,78 +2,78 @@ -- !ds_shape_5 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalUnion --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk,sr_returned_date_sk] --------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.store_sk = store.s_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk,sr_store_sk] ----------------------------------PhysicalUnion -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF1 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) --------------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk,cr_returned_date_sk] --------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() build RFs:RF2 cp_catalog_page_sk->[cs_catalog_page_sk,cr_catalog_page_sk] ----------------------------------PhysicalUnion -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 RF3 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_page] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) --------------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[ws_sold_date_sk,wr_returned_date_sk] --------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.wsr_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF6 web_site_sk->[ws_web_site_sk,ws_web_site_sk] ----------------------------------PhysicalUnion -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 wr_item_sk->[ws_item_sk];RF5 wr_order_number->[ws_order_number] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 RF6 ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF7 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[web_site] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) --------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query50.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query50.out index a41a717054..182e94c690 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query50.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query50.out @@ -2,10 +2,10 @@ -- !ds_shape_50 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[sr_returned_date_sk] @@ -18,13 +18,13 @@ PhysicalResultSink ------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[store_returns] apply RFs: RF5 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((d2.d_moy = 8) and (d2.d_year = 2001)) ------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query51.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query51.out index 0278c0a003..19f1ce2f7b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query51.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query51.out @@ -3,46 +3,46 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------filter((web_cumulative > store_cumulative)) --------------PhysicalWindow ----------------PhysicalQuickSort[LOCAL_SORT] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[FULL_OUTER_JOIN] hashCondition=((web.d_date = store.d_date) and (web.item_sk = store.item_sk)) otherCondition=() -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalWindow ------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) ----------------------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalWindow ------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) ----------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query52.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query52.out index 5dda178baf..965bdd14e5 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query52.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query52.out @@ -2,22 +2,22 @@ -- !ds_shape_52 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((item.i_manager_id = 1)) ----------------------------PhysicalOlapScan[item] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((dt.d_moy = 12) and (dt.d_year = 2002)) --------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query53.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query53.out index d68abeea8b..72eb97c8be 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query53.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query53.out @@ -3,16 +3,16 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------filter((if((avg_quarterly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_quarterly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_quarterly_sales), NULL) > 0.100000)) --------------PhysicalWindow ----------------PhysicalQuickSort[LOCAL_SORT] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------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] @@ -21,15 +21,15 @@ PhysicalResultSink ------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter(d_month_seq IN (1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211)) --------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((((i_category IN ('Books', 'Children', 'Electronics') AND i_class IN ('personal', 'portable', 'reference', 'self-help')) AND i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')) OR ((i_category IN ('Men', 'Music', 'Women') AND i_class IN ('accessories', 'classical', 'fragrances', 'pants')) AND i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')))) ------------------------------------------PhysicalOlapScan[item] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query54.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query54.out index 154cee12d9..2568cd4deb 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query54.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query54.out @@ -3,10 +3,10 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashAgg[LOCAL] @@ -17,63 +17,63 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN] hashCondition=((my_customers.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((my_customers.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF4 ----------------------------------PhysicalProject ------------------------------------hashAgg[LOCAL] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_customer_sk = cs_or_ws_sales.customer_sk)) otherCondition=() -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs_or_ws_sales.item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[cs_item_sk,ws_item_sk] ------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs_or_ws_sales.sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk,ws_sold_date_sk] --------------------------------------------------PhysicalUnion -----------------------------------------------------PhysicalDistribute +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------------PhysicalProject --------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 -----------------------------------------------------PhysicalDistribute +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------------PhysicalProject --------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 ---------------------------------------------------PhysicalDistribute +--------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------------PhysicalProject ------------------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) --------------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((item.i_category = 'Women') and (item.i_class = 'maternity')) ------------------------------------------------------PhysicalOlapScan[item] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer_address] apply RFs: RF5 RF6 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= (d_month_seq + 3)) --------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= (d_month_seq + 1)) ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalAssertNumRows ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------hashAgg[LOCAL] ----------------------------------------------PhysicalProject ------------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) --------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalAssertNumRows -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------hashAgg[GLOBAL] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------hashAgg[LOCAL] --------------------------------------------PhysicalProject ----------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) ------------------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query55.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query55.out index 315bb92b5a..db39db2da2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query55.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query55.out @@ -2,22 +2,22 @@ -- !ds_shape_55 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((item.i_manager_id = 100)) ----------------------------PhysicalOlapScan[item] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) --------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query56.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query56.out index 97de429208..71a6cca416 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query56.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query56.out @@ -2,15 +2,15 @@ -- !ds_shape_56 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] @@ -19,25 +19,25 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((customer_address.ca_gmt_offset = -6.00)) ----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] apply RFs: RF0 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter(i_color IN ('cyan', 'green', 'powder')) --------------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] @@ -46,25 +46,25 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[cs_bill_addr_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((customer_address.ca_gmt_offset = -6.00)) ----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] apply RFs: RF4 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter(i_color IN ('cyan', 'green', 'powder')) --------------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] @@ -73,19 +73,19 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[ws_bill_addr_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 RF11 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((customer_address.ca_gmt_offset = -6.00)) ----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] apply RFs: RF8 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter(i_color IN ('cyan', 'green', 'powder')) --------------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query57.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query57.out index d91bfb4c5e..9ebb7ceb6c 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query57.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query57.out @@ -7,10 +7,10 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((call_center.cc_call_center_sk = catalog_sales.cs_call_center_sk)) otherCondition=() build RFs:RF2 cc_call_center_sk->[cs_call_center_sk] @@ -20,33 +20,33 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[item] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((((date_dim.d_year = 1999) OR ((date_dim.d_year = 1998) AND (date_dim.d_moy = 12))) OR ((date_dim.d_year = 2000) AND (date_dim.d_moy = 1)))) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[call_center] --PhysicalResultSink ----PhysicalProject ------PhysicalTopN[MERGE_SORT] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((v1.cc_name = v1_lead.cc_name) and (v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1))) otherCondition=() ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((v1.cc_name = v1_lag.cc_name) and (v1.i_brand = v1_lag.i_brand) and (v1.i_category = v1_lag.i_category) and (v1.rn = expr_(rn + 1))) otherCondition=() ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000) and (v2.avg_monthly_sales > 0.0000) and (v2.d_year = 1999)) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query58.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query58.out index e54081b840..f6e88adcc4 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query58.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query58.out @@ -3,7 +3,7 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((ss_items.item_id = ws_items.item_id)) otherCondition=((cast(cs_item_rev as DOUBLE) <= cast((1.1 * ws_item_rev) as DOUBLE)) and (cast(cs_item_rev as DOUBLE) >= cast((0.9 * ws_item_rev) as DOUBLE)) and (cast(ss_item_rev as DOUBLE) <= cast((1.1 * ws_item_rev) as DOUBLE)) and (cast(ss_item_rev as DOUBLE) >= cast((0.9 * ws_item_rev) as DOUBLE)) and (cast(ws_item_rev as DOUBLE) <= cast((1.1 * cs_item_rev) as DOUBLE)) and (cast(ws_item_rev as DOUBLE) <= cast((1.1 * ss_item_rev) as DOUBLE)) and (cast(ws_item_rev as DOUBLE) >= cast((0.9 * cs_item_rev) as DOUBLE)) and (cast(ws_item_rev as DOUBLE) >= cast((0.9 * ss_item_rev) as DOUBLE))) build RFs:RF13 item_id->[i_item_id] @@ -11,7 +11,7 @@ PhysicalResultSink ----------------hashJoin[INNER_JOIN] hashCondition=((ss_items.item_id = cs_items.item_id)) otherCondition=((cast(cs_item_rev as DOUBLE) <= cast((1.1 * ss_item_rev) as DOUBLE)) and (cast(cs_item_rev as DOUBLE) >= cast((0.9 * ss_item_rev) as DOUBLE)) and (cast(ss_item_rev as DOUBLE) <= cast((1.1 * cs_item_rev) as DOUBLE)) and (cast(ss_item_rev as DOUBLE) >= cast((0.9 * cs_item_rev) as DOUBLE))) build RFs:RF12 item_id->[i_item_id] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[ss_sold_date_sk] @@ -19,30 +19,30 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ss_item_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF10 RF11 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[item] apply RFs: RF12 RF13 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF9 d_date->[d_date] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF8 d_week_seq->[d_week_seq] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF8 RF9 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalAssertNumRows -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_date = '2001-03-24')) ----------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] @@ -50,30 +50,30 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF6 RF7 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[item] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 RF5 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalAssertNumRows -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_date = '2001-03-24')) ----------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[date_dim] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ws_sold_date_sk] @@ -81,25 +81,25 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ws_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 RF1 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalAssertNumRows -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------------PhysicalProject ----------------------------------------------filter((date_dim.d_date = '2001-03-24')) ------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query59.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query59.out index 4b8285602d..19678a1f4d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query59.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query59.out @@ -4,19 +4,19 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------PhysicalProject ------------------PhysicalOlapScan[store_sales] apply RFs: RF0 -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalProject ------PhysicalTopN[MERGE_SORT] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((wss.ss_store_sk = store.s_store_sk) and (y.s_store_id1 = x.s_store_id2)) otherCondition=() build RFs:RF4 s_store_id2->[s_store_id];RF5 s_store_sk->[ss_store_sk] @@ -25,24 +25,24 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------hashJoin[INNER_JOIN] hashCondition=((d.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq] ----------------------hashJoin[INNER_JOIN] hashCondition=((d.d_week_seq = d_week_seq2)) otherCondition=() build RFs:RF1 d_week_seq->[d_week_seq] ------------------------hashJoin[INNER_JOIN] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(d_week_seq2 - 52))) otherCondition=() ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((d.d_month_seq <= 1219) and (d.d_month_seq >= 1208)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((d.d_month_seq <= 1207) and (d.d_month_seq >= 1196)) ----------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store] apply RFs: RF4 -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query6.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query6.out index d82ce7c274..c6f981470a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query6.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query6.out @@ -2,12 +2,12 @@ -- !ds_shape_6 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------filter((cnt >= 10)) ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((d.d_month_seq = date_dim.d_month_seq)) otherCondition=() build RFs:RF5 d_month_seq->[d_month_seq] @@ -18,35 +18,35 @@ PhysicalResultSink ------------------------------hashJoin[INNER_JOIN] hashCondition=((s.ss_item_sk = i.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[customer_address] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[item] apply RFs: RF4 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------hashAgg[GLOBAL] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashAgg[LOCAL] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[item] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalAssertNumRows ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------hashAgg[GLOBAL] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashAgg[LOCAL] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2002)) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query60.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query60.out index 9a996ac42b..faa8453bd7 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query60.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query60.out @@ -2,15 +2,15 @@ -- !ds_shape_60 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] @@ -19,26 +19,26 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((customer_address.ca_gmt_offset = -7.00)) ----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[item] apply RFs: RF0 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Children')) --------------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] @@ -47,26 +47,26 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[cs_bill_addr_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((customer_address.ca_gmt_offset = -7.00)) ----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[item] apply RFs: RF4 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Children')) --------------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] @@ -75,20 +75,20 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[ws_bill_addr_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 RF11 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((customer_address.ca_gmt_offset = -7.00)) ----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[item] apply RFs: RF8 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Children')) --------------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query61.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query61.out index e1ce18f828..06ab68f826 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query61.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query61.out @@ -6,7 +6,7 @@ PhysicalResultSink ------PhysicalTopN[LOCAL_SORT] --------NestedLoopJoin[CROSS_JOIN] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF10 s_store_sk->[ss_store_sk] @@ -17,35 +17,35 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[ss_item_sk] ------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[c_current_addr_sk] --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF7 RF8 RF9 RF10 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[customer] apply RFs: RF6 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((customer_address.ca_gmt_offset = -7.00)) --------------------------------------PhysicalOlapScan[customer_address] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((item.i_category = 'Jewelry')) ------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) ----------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((((promotion.p_channel_dmail = 'Y') OR (promotion.p_channel_email = 'Y')) OR (promotion.p_channel_tv = 'Y'))) ------------------------------PhysicalOlapScan[promotion] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((store.s_gmt_offset = -7.00)) --------------------------PhysicalOlapScan[store] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecReplicated] ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] @@ -55,25 +55,25 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ss_customer_sk] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF2 RF3 RF4 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((customer_address.ca_gmt_offset = -7.00)) --------------------------------------PhysicalOlapScan[customer_address] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) ------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((store.s_gmt_offset = -7.00)) --------------------------------PhysicalOlapScan[store] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((item.i_category = 'Jewelry')) ----------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query62.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query62.out index b2e92f957b..27d9bede78 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query62.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query62.out @@ -2,10 +2,10 @@ -- !ds_shape_62 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF3 w_warehouse_sk->[ws_warehouse_sk] @@ -15,17 +15,17 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF0 web_site_sk->[ws_web_site_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 RF3 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[web_site] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_month_seq <= 1205) and (date_dim.d_month_seq >= 1194)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[ship_mode] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[warehouse] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query63.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query63.out index 9e664bd4ac..10e570ae14 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query63.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query63.out @@ -2,16 +2,16 @@ -- !ds_shape_63 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000)) ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------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] @@ -20,15 +20,15 @@ PhysicalResultSink ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter(d_month_seq IN (1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192)) ------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((((i_category IN ('Books', 'Children', 'Electronics') AND i_class IN ('personal', 'portable', 'reference', 'self-help')) AND i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')) OR ((i_category IN ('Men', 'Music', 'Women') AND i_class IN ('accessories', 'classical', 'fragrances', 'pants')) AND i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')))) ----------------------------------------PhysicalOlapScan[item] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query64.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query64.out index 908e4d8652..62538dde90 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query64.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query64.out @@ -25,7 +25,7 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) --------------------------------------------PhysicalProject ----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF9 sr_item_sk->[ss_item_sk];RF10 sr_ticket_number->[ss_ticket_number] ------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF8 i_item_sk->[ss_item_sk] ---------------------------------------------------PhysicalDistribute +--------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------PhysicalProject ------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_first_shipto_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[c_first_shipto_date_sk] --------------------------------------------------------PhysicalProject @@ -34,69 +34,69 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) --------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = ad2.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[c_current_addr_sk] ----------------------------------------------------------------PhysicalProject ------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_cdemo_sk = cd1.cd_demo_sk)) otherCondition=(( not (cd_marital_status = cd_marital_status))) build RFs:RF4 cd_demo_sk->[ss_cdemo_sk] ---------------------------------------------------------------------PhysicalDistribute +--------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------------------------PhysicalProject ------------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ---------------------------------------------------------------------------PhysicalDistribute +--------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------------------------------PhysicalProject ------------------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 RF8 RF9 RF10 RF11 RF13 RF14 RF17 RF18 RF19 ---------------------------------------------------------------------------PhysicalDistribute +--------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------------------------------PhysicalProject ------------------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() build RFs:RF2 cd_demo_sk->[c_current_cdemo_sk] ---------------------------------------------------------------------------------PhysicalDistribute +--------------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------------------------------------PhysicalProject ------------------------------------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 RF5 RF6 RF7 RF12 ---------------------------------------------------------------------------------PhysicalDistribute +--------------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------------------------------------PhysicalProject ------------------------------------------------------------------------------------PhysicalOlapScan[customer_demographics] ---------------------------------------------------------------------PhysicalDistribute +--------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------------------------PhysicalProject ------------------------------------------------------------------------PhysicalOlapScan[customer_demographics] -----------------------------------------------------------------PhysicalDistribute +----------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------------------------PhysicalProject --------------------------------------------------------------------PhysicalOlapScan[customer_address] -------------------------------------------------------------PhysicalDistribute +------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------------------------PhysicalDistribute +--------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------------------PhysicalDistribute +--------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------PhysicalProject ------------------------------------------------------filter((item.i_current_price <= 33.00) and (item.i_current_price >= 24.00) and i_color IN ('blanched', 'brown', 'burlywood', 'chocolate', 'drab', 'medium')) --------------------------------------------------------PhysicalOlapScan[item] -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------------PhysicalProject ----------------------------------------------------PhysicalOlapScan[store_returns] ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[store] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF16 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF15 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[income_band] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[income_band] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter(d_year IN (2001, 2002)) --------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------PhysicalOlapScan[promotion] ------------PhysicalProject --------------filter((sale > (2 * refund))) ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF0 cr_order_number->[cs_order_number];RF1 cr_item_sk->[cs_item_sk] @@ -106,15 +106,15 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) ----------------------------PhysicalOlapScan[catalog_returns] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((cs1.item_sk = cs2.item_sk) and (cs1.store_name = cs2.store_name) and (cs1.store_zip = cs2.store_zip)) otherCondition=((cs2.cnt <= cs1.cnt)) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((cs1.syear = 2001)) --------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((cs2.syear = 2002)) --------------------PhysicalCteConsumer ( cteId=CTEId#1 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query65.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query65.out index ab0f422a10..b2ccb8ef10 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query65.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query65.out @@ -2,43 +2,43 @@ -- !ds_shape_65 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DOUBLE) <= cast((0.1 * ave) as DOUBLE))) build RFs:RF4 ss_store_sk->[ss_store_sk] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) ------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[store] ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) ------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query66.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query66.out index 1c222d00f2..3381e5c6aa 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query66.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query66.out @@ -2,15 +2,15 @@ -- !ds_shape_66 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF3 sm_ship_mode_sk->[ws_ship_mode_sk] @@ -21,24 +21,24 @@ PhysicalResultSink ------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 RF3 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_year = 1998)) --------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[warehouse] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((cast(t_time as BIGINT) <= 77621) and (time_dim.t_time >= 48821)) --------------------------------------PhysicalOlapScan[time_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter(sm_carrier IN ('GREAT EASTERN', 'LATVIAN')) ----------------------------------PhysicalOlapScan[ship_mode] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF7 sm_ship_mode_sk->[cs_ship_mode_sk] @@ -49,18 +49,18 @@ PhysicalResultSink ------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 RF6 RF7 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_year = 1998)) --------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[warehouse] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((cast(t_time as BIGINT) <= 77621) and (time_dim.t_time >= 48821)) --------------------------------------PhysicalOlapScan[time_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter(sm_carrier IN ('GREAT EASTERN', 'LATVIAN')) ----------------------------------PhysicalOlapScan[ship_mode] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query67.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query67.out index bb8c8724c7..d069db662b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query67.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query67.out @@ -2,16 +2,16 @@ -- !ds_shape_67 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------filter((rk <= 100)) ----------PhysicalWindow ------------PhysicalPartitionTopN ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalPartitionTopN ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalRepeat ----------------------------PhysicalProject @@ -21,14 +21,14 @@ PhysicalResultSink ------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_month_seq <= 1217) and (date_dim.d_month_seq >= 1206)) --------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[item] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query68.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query68.out index 6e468ca21d..6ecdd193a4 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query68.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query68.out @@ -2,19 +2,19 @@ -- !ds_shape_68 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) build RFs:RF5 ca_address_sk->[c_current_addr_sk] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ss_addr_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------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_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] @@ -22,25 +22,25 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_dom <= 2) and (date_dim.d_dom >= 1) and d_year IN (1998, 1999, 2000)) ----------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter(((household_demographics.hd_dep_count = 8) OR (household_demographics.hd_vehicle_count = -1))) ------------------------------------------PhysicalOlapScan[household_demographics] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter(s_city IN ('Five Points', 'Pleasant Hill')) ----------------------------------------PhysicalOlapScan[store] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer_address] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[customer] apply RFs: RF5 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query69.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query69.out index 8c8862e770..3ab0b1efc3 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query69.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query69.out @@ -3,54 +3,54 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF7 c_customer_sk->[ss_customer_sk] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000)) --------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject ----------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[cs_ship_customer_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000)) ------------------------------------PhysicalOlapScan[date_dim] ------------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ws_bill_customer_sk] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF1 cd_demo_sk->[c_current_cdemo_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF1 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter(ca_state IN ('MI', 'TX', 'VA')) ----------------------------------------PhysicalOlapScan[customer_address] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer_demographics] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query7.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query7.out index c76f6c3419..b5807e848e 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query7.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query7.out @@ -2,10 +2,10 @@ -- !ds_shape_7 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF3 p_promo_sk->[ss_promo_sk] @@ -16,18 +16,18 @@ PhysicalResultSink --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((customer_demographics.cd_education_status = 'College') and (customer_demographics.cd_gender = 'F') and (customer_demographics.cd_marital_status = 'W')) ----------------------------------PhysicalOlapScan[customer_demographics] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[item] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_year = 2001)) ----------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter(((promotion.p_channel_email = 'N') OR (promotion.p_channel_event = 'N'))) ------------------------PhysicalOlapScan[promotion] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query70.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query70.out index d83858e88e..63b6d3b5b4 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query70.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query70.out @@ -3,15 +3,15 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalRepeat ----------------------------PhysicalProject @@ -20,36 +20,36 @@ PhysicalResultSink ----------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((d1.d_month_seq <= 1224) and (d1.d_month_seq >= 1213)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((store.s_state = tmp1.s_state)) otherCondition=() -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------filter((ranking <= 5)) ------------------------------------------PhysicalWindow --------------------------------------------PhysicalPartitionTopN -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------PhysicalPartitionTopN --------------------------------------------------PhysicalProject ----------------------------------------------------hashAgg[GLOBAL] -------------------------------------------------------PhysicalDistribute +------------------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------------------hashAgg[LOCAL] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] --------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------------------------------PhysicalProject ------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------------------------------------------------PhysicalDistribute +----------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------------------------PhysicalProject --------------------------------------------------------------------filter((date_dim.d_month_seq <= 1224) and (date_dim.d_month_seq >= 1213)) ----------------------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------------------------------PhysicalDistribute +--------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------------------------PhysicalProject ------------------------------------------------------------------PhysicalOlapScan[store] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query71.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query71.out index 77172537ad..2d42a4f879 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query71.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query71.out @@ -2,48 +2,48 @@ -- !ds_shape_71 -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((tmp.sold_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ws_item_sk,cs_item_sk,ss_item_sk] --------------------hashJoin[INNER_JOIN] hashCondition=((tmp.time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ws_sold_time_sk,cs_sold_time_sk,ss_sold_time_sk] ----------------------PhysicalUnion -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF3 RF4 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1998)) ------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF3 RF4 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1998)) ------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 RF4 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1998)) ------------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter(t_meal_time IN ('breakfast', 'dinner')) ----------------------------PhysicalOlapScan[time_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((item.i_manager_id = 1)) --------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query72.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query72.out index 1b0c02965b..982d6d30c8 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query72.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query72.out @@ -2,10 +2,10 @@ -- !ds_shape_72 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((warehouse.w_warehouse_sk = inventory.inv_warehouse_sk)) otherCondition=() build RFs:RF8 w_warehouse_sk->[inv_warehouse_sk] @@ -22,40 +22,40 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF1 cd_demo_sk->[cs_bill_cdemo_sk] ----------------------------------------PhysicalProject ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = inventory.inv_item_sk)) otherCondition=((inventory.inv_quantity_on_hand < catalog_sales.cs_quantity)) build RFs:RF0 cs_item_sk->[inv_item_sk] ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF3 RF8 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((catalog_returns.cr_item_sk = catalog_sales.cs_item_sk) and (catalog_returns.cr_order_number = catalog_sales.cs_order_number)) otherCondition=() ------------------------------------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() --------------------------------------------------PhysicalProject ----------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF2 RF5 RF6 RF7 ---------------------------------------------------PhysicalDistribute +--------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------------PhysicalProject ------------------------------------------------------PhysicalOlapScan[promotion] ------------------------------------------------PhysicalProject --------------------------------------------------PhysicalOlapScan[catalog_returns] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((customer_demographics.cd_marital_status = 'W')) ----------------------------------------------PhysicalOlapScan[customer_demographics] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[item] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((d1.d_year = 2002)) ------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((household_demographics.hd_buy_potential = '501-1000')) ----------------------------PhysicalOlapScan[household_demographics] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[warehouse] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query73.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query73.out index 8ab062bf77..77c0f30866 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query73.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query73.out @@ -2,16 +2,16 @@ -- !ds_shape_73 -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((dj.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk] ------------PhysicalProject --------------PhysicalOlapScan[customer] apply RFs: RF3 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------filter((dj.cnt <= 5) and (dj.cnt >= 1)) ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------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] @@ -20,15 +20,15 @@ PhysicalResultSink ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_dom <= 2) and (date_dim.d_dom >= 1) and d_year IN (2000, 2001, 2002)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1) and hd_buy_potential IN ('501-1000', 'Unknown')) ----------------------------------PhysicalOlapScan[household_demographics] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(s_county IN ('Barrow County', 'Daviess County', 'Fairfield County', 'Walker County')) --------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query74.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query74.out index c9959e2820..bae17a5bda 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query74.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query74.out @@ -4,58 +4,58 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((PULL_UP_UNIFIED_OUTPUT_ALIAS = customer.c_customer_sk)) otherCondition=() ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalUnion --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000)) --------------------------------PhysicalOlapScan[date_dim] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000)) --------------------------------PhysicalOlapScan[date_dim] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[customer] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0), (year_total / year_total), NULL) > if((year_total > 0), (year_total / year_total), NULL))) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000)) --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year = 1999) and (t_w_firstyear.year_total > 0)) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ------------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((t_s_secyear.sale_type = 's') and (t_s_secyear.year = 2000)) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((t_s_firstyear.sale_type = 's') and (t_s_firstyear.year = 1999) and (t_s_firstyear.year_total > 0)) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query75.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query75.out index 78419a24e3..6203d20841 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query75.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query75.out @@ -3,13 +3,13 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalUnion -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ------------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() @@ -17,17 +17,17 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((item.i_category = 'Home')) ------------------------------------PhysicalOlapScan[item] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[catalog_returns] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter(d_year IN (1998, 1999)) ------------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ------------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() @@ -35,17 +35,17 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((item.i_category = 'Home')) ------------------------------------PhysicalOlapScan[item] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_returns] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter(d_year IN (1998, 1999)) ------------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] ------------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() @@ -53,26 +53,26 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ws_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((item.i_category = 'Home')) ------------------------------------PhysicalOlapScan[item] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_returns] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter(d_year IN (1998, 1999)) ------------------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((curr_yr.i_brand_id = prev_yr.i_brand_id) and (curr_yr.i_category_id = prev_yr.i_category_id) and (curr_yr.i_class_id = prev_yr.i_class_id) and (curr_yr.i_manufact_id = prev_yr.i_manufact_id)) otherCondition=(((cast(cast(sales_cnt as DECIMALV3(17, 2)) as DECIMALV3(23, 8)) / cast(sales_cnt as DECIMALV3(17, 2))) < 0.900000)) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------filter((curr_yr.d_year = 1999)) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------filter((prev_yr.d_year = 1998)) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query76.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query76.out index 7d8bcd65ad..3279ad95df 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query76.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query76.out @@ -2,13 +2,13 @@ -- !ds_shape_76 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------PhysicalProject @@ -16,13 +16,13 @@ PhysicalResultSink --------------------------PhysicalProject ----------------------------filter(ss_hdemo_sk IS NULL) ------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[item] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ws_sold_date_sk] ----------------------PhysicalProject @@ -30,13 +30,13 @@ PhysicalResultSink --------------------------PhysicalProject ----------------------------filter(ws_bill_addr_sk IS NULL) ------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[item] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ----------------------PhysicalProject @@ -44,10 +44,10 @@ PhysicalResultSink --------------------------PhysicalProject ----------------------------filter(cs_warehouse_sk IS NULL) ------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[item] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query77.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query77.out index b3c8305593..59df7cd5a6 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query77.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query77.out @@ -2,11 +2,11 @@ -- !ds_shape_77 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalUnion @@ -16,59 +16,59 @@ PhysicalResultSink --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) --------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[sr_store_sk] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF1 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ----------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store] --------------------PhysicalProject ----------------------NestedLoopJoin[CROSS_JOIN] ------------------------PhysicalProject --------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ------------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------hashAgg[GLOBAL] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashAgg[LOCAL] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cr_returned_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) --------------------------------------------PhysicalOlapScan[date_dim] @@ -78,33 +78,33 @@ PhysicalResultSink --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF9 wp_web_page_sk->[ws_web_page_sk] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) --------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_page] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF7 wp_web_page_sk->[wr_web_page_sk] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[wr_returned_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 RF7 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ----------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[web_page] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query78.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query78.out index 730493d316..a12f6215a0 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query78.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query78.out @@ -2,7 +2,7 @@ -- !ds_shape_78 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------filter(((coalesce(ws_qty, 0) > 0) OR (coalesce(cs_qty, 0) > 0))) @@ -11,14 +11,14 @@ PhysicalResultSink ----------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((ws.ws_customer_sk = ss.ss_customer_sk) and (ws.ws_item_sk = ss.ss_item_sk) and (ws.ws_sold_year = ss.ss_sold_year)) otherCondition=() ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((store_returns.sr_ticket_number = store_sales.ss_ticket_number) and (store_sales.ss_item_sk = store_returns.sr_item_sk)) otherCondition=() ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] @@ -26,14 +26,14 @@ PhysicalResultSink --------------------------------PhysicalOlapScan[store_returns] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((web_returns.wr_order_number = web_sales.ws_order_number) and (web_sales.ws_item_sk = web_returns.wr_item_sk)) otherCondition=() ------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] @@ -41,14 +41,14 @@ PhysicalResultSink --------------------------------PhysicalOlapScan[web_returns] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((catalog_returns.cr_order_number = catalog_sales.cs_order_number) and (catalog_sales.cs_item_sk = catalog_returns.cr_item_sk)) otherCondition=() --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_year = 2000)) ----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query79.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query79.out index c03fe95df9..8bed80b1f9 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query79.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query79.out @@ -2,14 +2,14 @@ -- !ds_shape_79 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((ms.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------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] @@ -18,19 +18,19 @@ PhysicalResultSink ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_dow = 1) and d_year IN (1998, 1999, 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter(((household_demographics.hd_dep_count = 5) OR (household_demographics.hd_vehicle_count > 4))) ----------------------------------PhysicalOlapScan[household_demographics] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((store.s_number_employees <= 295) and (store.s_number_employees >= 200)) --------------------------------PhysicalOlapScan[store] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query8.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query8.out index d3da9091cd..28aa0fc244 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query8.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query8.out @@ -2,10 +2,10 @@ -- !ds_shape_8 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((expr_substring(s_zip, 1, 2) = expr_substring(ca_zip, 1, 2))) otherCondition=() @@ -15,31 +15,31 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_qoy = 2) and (date_dim.d_year = 1998)) --------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalIntersect -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) ------------------------------PhysicalOlapScan[customer_address] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter((cnt > 10)) ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 c_current_addr_sk->[ca_address_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF0 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------filter((customer.c_preferred_cust_flag = 'Y')) ----------------------------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query80.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query80.out index 6f683ef29c..1d6bbead25 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query80.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query80.out @@ -2,17 +2,17 @@ -- !ds_shape_80 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalUnion --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF3 p_promo_sk->[ss_promo_sk] @@ -24,26 +24,26 @@ PhysicalResultSink ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalProject ------------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) --------------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[store_returns] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((item.i_current_price > 50.00)) --------------------------------------------PhysicalOlapScan[item] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((promotion.p_channel_tv = 'N')) --------------------------------------PhysicalOlapScan[promotion] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF7 p_promo_sk->[cs_promo_sk] @@ -55,26 +55,26 @@ PhysicalResultSink ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_catalog_page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() build RFs:RF4 cp_catalog_page_sk->[cs_catalog_page_sk] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 RF6 RF7 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[catalog_page] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter((item.i_current_price > 50.00)) ------------------------------------------------PhysicalOlapScan[item] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[catalog_returns] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((promotion.p_channel_tv = 'N')) --------------------------------------PhysicalOlapScan[promotion] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF11 p_promo_sk->[ws_promo_sk] @@ -86,20 +86,20 @@ PhysicalResultSink ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 RF10 RF11 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalProject ------------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) --------------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[web_returns] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((item.i_current_price > 50.00)) --------------------------------------------PhysicalOlapScan[item] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_site] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((promotion.p_channel_tv = 'N')) --------------------------------------PhysicalOlapScan[promotion] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query81.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query81.out index 854e4a7f41..b87814d156 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query81.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query81.out @@ -4,44 +4,44 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cr_returned_date_sk] ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cr_returning_addr_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[catalog_returns] apply RFs: RF0 RF1 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[customer_address] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((date_dim.d_year = 2002)) ----------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE))) -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ctr_customer_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[customer] apply RFs: RF3 ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------------PhysicalProject ----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((customer_address.ca_state = 'CA')) --------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query82.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query82.out index e5b1ee4038..7b3d360820 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query82.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query82.out @@ -2,28 +2,28 @@ -- !ds_shape_82 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[store_sales] apply RFs: RF2 ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk] --------------------------PhysicalProject ----------------------------filter((inventory.inv_quantity_on_hand <= 500) and (inventory.inv_quantity_on_hand >= 100)) ------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '1999-09-07') and (date_dim.d_date >= '1999-07-09')) --------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((item.i_current_price <= 47.00) and (item.i_current_price >= 17.00) and i_manufact_id IN (138, 169, 339, 639)) ----------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query83.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query83.out index 4588939125..500b145c00 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query83.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query83.out @@ -3,7 +3,7 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((sr_items.item_id = wr_items.item_id)) otherCondition=() build RFs:RF13 item_id->[i_item_id] @@ -11,7 +11,7 @@ PhysicalResultSink ----------------hashJoin[INNER_JOIN] hashCondition=((sr_items.item_id = cr_items.item_id)) otherCondition=() build RFs:RF12 item_id->[i_item_id] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[sr_returned_date_sk] @@ -19,27 +19,27 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[sr_item_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF10 RF11 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[item] apply RFs: RF12 RF13 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF9 d_date->[d_date] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF8 d_week_seq->[d_week_seq] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF8 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) ------------------------------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cr_returned_date_sk] @@ -47,27 +47,27 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cr_item_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF6 RF7 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[item] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) ------------------------------------------------PhysicalOlapScan[date_dim] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[wr_returned_date_sk] @@ -75,21 +75,21 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[wr_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_returns] apply RFs: RF2 RF3 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) --------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query84.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query84.out index d0e972ac92..f37631026c 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query84.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query84.out @@ -2,11 +2,11 @@ -- !ds_shape_84 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF4 cd_demo_sk->[sr_cdemo_sk] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------PhysicalOlapScan[store_returns] apply RFs: RF4 ------------PhysicalProject @@ -16,20 +16,20 @@ PhysicalResultSink --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] ------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[c_current_cdemo_sk] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF1 RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer_demographics] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((customer_address.ca_city = 'Oakwood')) ------------------------------PhysicalOlapScan[customer_address] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[household_demographics] apply RFs: RF3 -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((cast(ib_upper_bound as BIGINT) <= 55806) and (income_band.ib_lower_bound >= 5806)) ----------------------PhysicalOlapScan[income_band] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query85.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query85.out index 1e0b72101a..29433f93b4 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query85.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query85.out @@ -2,11 +2,11 @@ -- !ds_shape_85 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((reason.r_reason_sk = web_returns.wr_reason_sk)) otherCondition=() build RFs:RF9 r_reason_sk->[wr_reason_sk] @@ -16,11 +16,11 @@ PhysicalResultSink --------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = web_returns.wr_refunded_addr_sk)) otherCondition=((((ca_state IN ('DE', 'FL', 'TX') AND ((web_sales.ws_net_profit >= 100.00) AND (web_sales.ws_net_profit <= 200.00))) OR (ca_state IN ('ID', 'IN', 'ND') AND ((web_sales.ws_net_profit >= 150.00) AND (web_sales.ws_net_profit <= 300.00)))) OR (ca_state IN ('IL', 'MT', 'OH') AND ((web_sales.ws_net_profit >= 50.00) AND (web_sales.ws_net_profit <= 250.00))))) build RFs:RF7 ca_address_sk->[wr_refunded_addr_sk] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((cd1.cd_education_status = cd2.cd_education_status) and (cd1.cd_marital_status = cd2.cd_marital_status) and (cd2.cd_demo_sk = web_returns.wr_returning_cdemo_sk)) otherCondition=() build RFs:RF4 cd_marital_status->[cd_marital_status];RF5 cd_education_status->[cd_education_status];RF6 cd_demo_sk->[wr_returning_cdemo_sk] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] 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] hashCondition=((cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk)) otherCondition=((((((cd1.cd_marital_status = 'M') AND (cd1.cd_education_status = '4 yr Degree')) AND ((web_sales.ws_sales_price >= 100.00) AND (web_sales.ws_sales_price <= 150.00))) OR (((cd1.cd_marital_status = 'S') AND (cd1.cd_education_status = 'Secondary')) AND ((web_sales.ws_sales_price >= 50.00) AND (web_sales.ws_sales_price <= 100.00)))) OR (((cd1.cd_marital_status = 'W') AND (cd1.cd_education_status = 'Advanced Degree')) AND ((web_sales.ws_sales_price >= 150.00) AND (web_sales.ws_sales_price <= 200.00))))) build RFs:RF2 cd_demo_sk->[wr_refunded_cdemo_sk] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF0 ws_item_sk->[wr_item_sk];RF1 ws_order_number->[wr_order_number] ----------------------------------------------PhysicalProject @@ -28,25 +28,25 @@ PhysicalResultSink ----------------------------------------------PhysicalProject ------------------------------------------------filter((web_sales.ws_net_profit <= 300.00) and (web_sales.ws_net_profit >= 50.00) and (web_sales.ws_sales_price <= 200.00) and (web_sales.ws_sales_price >= 50.00)) --------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF8 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------filter(((((cd1.cd_marital_status = 'M') AND (cd1.cd_education_status = '4 yr Degree')) OR ((cd1.cd_marital_status = 'S') AND (cd1.cd_education_status = 'Secondary'))) OR ((cd1.cd_marital_status = 'W') AND (cd1.cd_education_status = 'Advanced Degree')))) ----------------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF4 RF5 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[web_page] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[customer_demographics] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter(((ca_state IN ('DE', 'FL', 'TX') OR ca_state IN ('ID', 'IN', 'ND')) OR ca_state IN ('IL', 'MT', 'OH')) and (customer_address.ca_country = 'United States')) ----------------------------------PhysicalOlapScan[customer_address] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_year = 2000)) ------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[reason] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query86.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query86.out index 53f8db118a..6b9cf04d04 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query86.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query86.out @@ -3,15 +3,15 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalRepeat ----------------------------PhysicalProject @@ -19,10 +19,10 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[item] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((d1.d_month_seq <= 1235) and (d1.d_month_seq >= 1224)) --------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query87.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query87.out index 6ae69062e0..e0672ae2c4 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query87.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query87.out @@ -2,58 +2,58 @@ -- !ds_shape_87 -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------PhysicalExcept ------------PhysicalProject --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ss_customer_sk] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) ------------------------------PhysicalOlapScan[date_dim] ------------PhysicalProject --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cs_bill_customer_sk] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) ------------------------------PhysicalOlapScan[date_dim] ------------PhysicalProject --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ws_bill_customer_sk] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) ------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query88.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query88.out index 71b7c40ab2..9225360005 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 @@ -10,7 +10,7 @@ PhysicalResultSink --------------NestedLoopJoin[CROSS_JOIN] ----------------NestedLoopJoin[CROSS_JOIN] ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------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] @@ -19,21 +19,21 @@ PhysicalResultSink --------------------------------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 +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) ----------------------------------------PhysicalOlapScan[time_dim] ---------------------------------PhysicalDistribute +--------------------------------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 +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((store.s_store_name = 'ese')) ----------------------------------PhysicalOlapScan[store] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------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] @@ -42,21 +42,21 @@ PhysicalResultSink ----------------------------------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 +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute < 30)) ------------------------------------------PhysicalOlapScan[time_dim] -----------------------------------PhysicalDistribute +----------------------------------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 +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((store.s_store_name = 'ese')) ------------------------------------PhysicalOlapScan[store] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------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] @@ -65,21 +65,21 @@ PhysicalResultSink --------------------------------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: RF15 RF16 RF17 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute >= 30)) ----------------------------------------PhysicalOlapScan[time_dim] ---------------------------------PhysicalDistribute +--------------------------------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 +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((store.s_store_name = 'ese')) ----------------------------------PhysicalOlapScan[store] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------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] @@ -88,21 +88,21 @@ PhysicalResultSink ------------------------------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: RF12 RF13 RF14 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute < 30)) --------------------------------------PhysicalOlapScan[time_dim] -------------------------------PhysicalDistribute +------------------------------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 +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((store.s_store_name = 'ese')) --------------------------------PhysicalOlapScan[store] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------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] @@ -111,21 +111,21 @@ PhysicalResultSink ----------------------------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: RF9 RF10 RF11 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute >= 30)) ------------------------------------PhysicalOlapScan[time_dim] -----------------------------PhysicalDistribute +----------------------------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 +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((store.s_store_name = 'ese')) ------------------------------PhysicalOlapScan[store] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecReplicated] ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------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] @@ -134,21 +134,21 @@ PhysicalResultSink --------------------------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: RF6 RF7 RF8 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute < 30)) ----------------------------------PhysicalOlapScan[time_dim] ---------------------------PhysicalDistribute +--------------------------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 +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((store.s_store_name = 'ese')) ----------------------------PhysicalOlapScan[store] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------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] @@ -157,21 +157,21 @@ PhysicalResultSink ------------------------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: RF3 RF4 RF5 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute >= 30)) --------------------------------PhysicalOlapScan[time_dim] -------------------------PhysicalDistribute +------------------------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 +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((store.s_store_name = 'ese')) --------------------------PhysicalOlapScan[store] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecReplicated] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------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] @@ -180,15 +180,15 @@ PhysicalResultSink ----------------------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 +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((time_dim.t_hour = 12) and (time_dim.t_minute < 30)) ------------------------------PhysicalOlapScan[time_dim] -----------------------PhysicalDistribute +----------------------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 +------------------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/query89.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query89.out index f31cf2f6db..032da35b51 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query89.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query89.out @@ -3,16 +3,16 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------filter((if(( not (avg_monthly_sales = 0.0000)), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000)) --------------PhysicalWindow ----------------PhysicalQuickSort[LOCAL_SORT] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------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] @@ -22,15 +22,15 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter(((i_category IN ('Electronics', 'Jewelry', 'Shoes') AND i_class IN ('athletic', 'portable', 'semi-precious')) OR (i_category IN ('Men', 'Music', 'Women') AND i_class IN ('accessories', 'maternity', 'rock')))) ----------------------------------------------PhysicalOlapScan[item] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_year = 1999)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query9.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query9.out index 5b3610bc2e..6f64f57ee2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query9.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query9.out @@ -1,7 +1,7 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_9 -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------NestedLoopJoin[CROSS_JOIN] --------NestedLoopJoin[CROSS_JOIN] @@ -22,122 +22,122 @@ PhysicalResultSink --------------------------------------PhysicalProject ----------------------------------------filter((reason.r_reason_sk = 1)) ------------------------------------------PhysicalOlapScan[reason] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalAssertNumRows ------------------------------------------hashAgg[GLOBAL] ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------------hashAgg[LOCAL] ------------------------------------------------PhysicalProject --------------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ----------------------------------------------------PhysicalOlapScan[store_sales] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalAssertNumRows --------------------------------------hashAgg[GLOBAL] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------------hashAgg[LOCAL] --------------------------------------------PhysicalProject ----------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ------------------------------------------------PhysicalOlapScan[store_sales] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalAssertNumRows ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ----------------------------------------------PhysicalOlapScan[store_sales] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalAssertNumRows ----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------hashAgg[LOCAL] ----------------------------------------PhysicalProject ------------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21)) --------------------------------------------PhysicalOlapScan[store_sales] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalAssertNumRows --------------------------------hashAgg[GLOBAL] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------hashAgg[LOCAL] --------------------------------------PhysicalProject ----------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21)) ------------------------------------------PhysicalOlapScan[store_sales] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalAssertNumRows ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21)) ----------------------------------------PhysicalOlapScan[store_sales] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalAssertNumRows ----------------------------hashAgg[GLOBAL] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------hashAgg[LOCAL] ----------------------------------PhysicalProject ------------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41)) --------------------------------------PhysicalOlapScan[store_sales] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalAssertNumRows --------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject ----------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41)) ------------------------------------PhysicalOlapScan[store_sales] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalAssertNumRows ------------------------hashAgg[GLOBAL] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject --------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41)) ----------------------------------PhysicalOlapScan[store_sales] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalAssertNumRows ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecGather] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61)) --------------------------------PhysicalOlapScan[store_sales] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalAssertNumRows --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecGather] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61)) ------------------------------PhysicalOlapScan[store_sales] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------PhysicalAssertNumRows ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecGather] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61)) ----------------------------PhysicalOlapScan[store_sales] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalAssertNumRows ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecGather] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) --------------------------PhysicalOlapScan[store_sales] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecReplicated] ------------PhysicalAssertNumRows --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecGather] ------------------hashAgg[LOCAL] --------------------PhysicalProject ----------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) ------------------------PhysicalOlapScan[store_sales] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalAssertNumRows ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query90.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query90.out index a1a7a1d890..0628931542 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query90.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query90.out @@ -6,7 +6,7 @@ PhysicalResultSink ------PhysicalProject --------NestedLoopJoin[CROSS_JOIN] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] 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] @@ -15,21 +15,21 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] 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 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((time_dim.t_hour <= 11) and (time_dim.t_hour >= 10)) --------------------------------PhysicalOlapScan[time_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((household_demographics.hd_dep_count = 2)) ------------------------------PhysicalOlapScan[household_demographics] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) --------------------------PhysicalOlapScan[web_page] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecReplicated] ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] 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] @@ -38,15 +38,15 @@ PhysicalResultSink --------------------------hashJoin[INNER_JOIN] 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 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((time_dim.t_hour <= 17) and (time_dim.t_hour >= 16)) ----------------------------------PhysicalOlapScan[time_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((household_demographics.hd_dep_count = 2)) --------------------------------PhysicalOlapScan[household_demographics] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------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/no_stats_shape/query91.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query91.out index 3d6d62e4a3..34e35e958d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query91.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query91.out @@ -2,45 +2,45 @@ -- !ds_shape_91 -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF5 hd_demo_sk->[c_current_hdemo_sk] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF4 cd_demo_sk->[c_current_cdemo_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cr_call_center_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cr_returned_date_sk] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] ------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returning_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[cr_returning_customer_sk] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF0 RF2 RF3 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 RF4 RF5 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((customer_address.ca_gmt_offset = -6.00)) ------------------------------------------PhysicalOlapScan[customer_address] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001)) ----------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[call_center] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter((((customer_demographics.cd_marital_status = 'M') AND (customer_demographics.cd_education_status = 'Unknown')) OR ((customer_demographics.cd_marital_status = 'W') AND (customer_demographics.cd_education_status = 'Advanced Degree')))) ------------------------------PhysicalOlapScan[customer_demographics] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((hd_buy_potential like '1001-5000%')) --------------------------PhysicalOlapScan[household_demographics] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query92.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query92.out index cb095c4426..03fe8c943d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query92.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query92.out @@ -4,24 +4,24 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalProject --------------filter((cast(ws_ext_discount_amt as DECIMALV3(38, 5)) > (1.3 * avg(cast(ws_ext_discount_amt as DECIMALV3(9, 4))) OVER(PARTITION BY i_item_sk)))) ----------------PhysicalWindow ------------------PhysicalQuickSort[LOCAL_SORT] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((item.i_manufact_id = 320)) ------------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '2002-05-27') and (date_dim.d_date >= '2002-02-26')) --------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query93.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query93.out index 66be953027..6dc48f7c96 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query93.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query93.out @@ -2,10 +2,10 @@ -- !ds_shape_93 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_reason_sk = reason.r_reason_sk)) otherCondition=() build RFs:RF2 r_reason_sk->[sr_reason_sk] @@ -15,7 +15,7 @@ PhysicalResultSink ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_returns] apply RFs: RF2 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((reason.r_reason_desc = 'duplicate purchase')) ------------------------PhysicalOlapScan[reason] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query94.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query94.out index a7f921c597..ceb9643e66 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query94.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query94.out @@ -4,7 +4,7 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] ------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[DISTINCT_LOCAL] ------------hashAgg[GLOBAL] --------------hashAgg[LOCAL] @@ -12,27 +12,27 @@ PhysicalResultSink ------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() --------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] ----------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF2 ws_order_number->[ws_order_number] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk] ----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_ship_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF3 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) ------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((customer_address.ca_state = 'OK')) ----------------------------------PhysicalOlapScan[customer_address] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((web_site.web_company_name = 'pri')) ----------------------------PhysicalOlapScan[web_site] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------PhysicalOlapScan[web_returns] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query95.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query95.out index 9fb38391e5..b54e3c5c0e 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query95.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query95.out @@ -4,17 +4,17 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF6 RF7 ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[DISTINCT_GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecGather] ------------hashAgg[DISTINCT_LOCAL] --------------hashAgg[GLOBAL] ----------------hashAgg[LOCAL] @@ -22,31 +22,31 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF5 wr_order_number->[ws_order_number];RF7 wr_order_number->[ws_order_number,ws_order_number] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[web_returns] ----------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF4 ws_order_number->[ws_order_number];RF6 ws_order_number->[ws_order_number,ws_order_number] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] ----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ws_ship_addr_sk] ------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_ship_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) --------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((customer_address.ca_state = 'NC')) ------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((web_site.web_company_name = 'pri')) ----------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query96.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query96.out index daf0b67a0e..4f48a46df2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query96.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query96.out @@ -4,7 +4,7 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------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] @@ -13,15 +13,15 @@ PhysicalResultSink --------------------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 +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) ----------------------------PhysicalOlapScan[time_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((household_demographics.hd_dep_count = 3)) --------------------------PhysicalOlapScan[household_demographics] -----------------PhysicalDistribute +----------------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/query97.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query97.out index 7b8832c172..c8dd9bf8bd 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query97.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query97.out @@ -4,31 +4,31 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[FULL_OUTER_JOIN] hashCondition=((ssci.customer_sk = csci.customer_sk) and (ssci.item_sk = csci.item_sk)) otherCondition=() ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_month_seq <= 1225) and (date_dim.d_month_seq >= 1214)) ----------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_month_seq <= 1225) and (date_dim.d_month_seq >= 1214)) ----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query98.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query98.out index 9b770419b7..2eb2876c02 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query98.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query98.out @@ -2,14 +2,14 @@ -- !ds_shape_98 -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] @@ -17,11 +17,11 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter(i_category IN ('Music', 'Shoes', 'Sports')) ------------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '2002-06-19') and (date_dim.d_date >= '2002-05-20')) --------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query99.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query99.out index aed6b97685..65b2322356 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query99.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query99.out @@ -2,10 +2,10 @@ -- !ds_shape_99 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF3 w_warehouse_sk->[cs_warehouse_sk] @@ -15,17 +15,17 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF0 cc_call_center_sk->[cs_call_center_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 RF3 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[call_center] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_month_seq <= 1235) and (date_dim.d_month_seq >= 1224)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[ship_mode] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[warehouse] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query1.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query1.out index edd2c441da..66550bfccf 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query1.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query1.out @@ -4,40 +4,40 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] ----------------PhysicalProject ------------------PhysicalOlapScan[store_returns] apply RFs: RF0 -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((date_dim.d_year = 2000)) ----------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ctr_customer_sk->[c_customer_sk] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------PhysicalOlapScan[customer] apply RFs: RF2 ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE))) ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = ctr1.ctr_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ctr_store_sk] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((store.s_state = 'SD')) ----------------------------PhysicalOlapScan[store] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------------PhysicalProject ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query10.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query10.out index 223a7168b3..dab1ca1091 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query10.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query10.out @@ -3,7 +3,7 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------hashAgg[LOCAL] ------------PhysicalProject @@ -13,41 +13,41 @@ PhysicalResultSink --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 c_current_cdemo_sk->[cd_demo_sk] ------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF5 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) ------------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[c_current_addr_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County')) ----------------------------------------PhysicalOlapScan[customer_address] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) --------------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) ------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query11.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query11.out index 78d4ac74ab..20e3fd8652 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query11.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query11.out @@ -4,57 +4,57 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((PULL_UP_UNIFIED_OUTPUT_ALIAS = customer.c_customer_sk)) otherCondition=() ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalUnion --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (2001, 2002)) --------------------------------PhysicalOlapScan[date_dim] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (2001, 2002)) --------------------------------PhysicalOlapScan[date_dim] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[customer] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000) > if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000))) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((t_w_firstyear.dyear = 2001) and (t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year_total > 0.00)) --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------filter((t_s_secyear.dyear = 2002) and (t_s_secyear.sale_type = 's')) ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((t_w_secyear.dyear = 2002) and (t_w_secyear.sale_type = 'w')) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((t_s_firstyear.dyear = 2001) and (t_s_firstyear.sale_type = 's') and (t_s_firstyear.year_total > 0.00)) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query12.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query12.out index e8671ca916..08c2eb6a15 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query12.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query12.out @@ -2,26 +2,26 @@ -- !ds_shape_12 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ws_item_sk] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_date <= '1998-05-06') and (date_dim.d_date >= '1998-04-06')) ------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------filter(i_category IN ('Books', 'Men', 'Sports')) --------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query13.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query13.out index 9565e553c2..5e8f8d4e9b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query13.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query13.out @@ -2,36 +2,36 @@ -- !ds_shape_13 -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF4 ss_store_sk->[s_store_sk] ------------PhysicalProject --------------PhysicalOlapScan[store] apply RFs: RF4 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=(((((((customer_demographics.cd_marital_status = 'D') AND (customer_demographics.cd_education_status = 'Unknown')) AND ((store_sales.ss_sales_price >= 100.00) AND (store_sales.ss_sales_price <= 150.00))) AND (household_demographics.hd_dep_count = 3)) OR ((((customer_demographics.cd_marital_status = 'S') AND (customer_demographics.cd_education_status = 'College')) AND ((store_sales.ss_sales_price >= 50.00) AND (store_sales.ss_sales_price <= 100.00))) AND (household_demographics.hd_dep_count = 1))) OR ((((customer_demographics.cd_marital_status = 'M') AND (customer_demographics.cd_education_status = '4 yr Degree')) AND ((store_sales.ss_sales_price >= 150.00) AND (store_sales.ss_sales_price <= 200.00))) AND (household_demographics.hd_dep_count = 1)))) build RFs:RF3 ss_cdemo_sk->[cd_demo_sk] ------------------PhysicalProject --------------------filter(((((customer_demographics.cd_marital_status = 'D') AND (customer_demographics.cd_education_status = 'Unknown')) OR ((customer_demographics.cd_marital_status = 'S') AND (customer_demographics.cd_education_status = 'College'))) OR ((customer_demographics.cd_marital_status = 'M') AND (customer_demographics.cd_education_status = '4 yr Degree')))) ----------------------PhysicalOlapScan[customer_demographics] apply RFs: RF3 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=((((ca_state IN ('KS', 'MI', 'SD') AND ((store_sales.ss_net_profit >= 100.00) AND (store_sales.ss_net_profit <= 200.00))) OR (ca_state IN ('CO', 'MO', 'ND') AND ((store_sales.ss_net_profit >= 150.00) AND (store_sales.ss_net_profit <= 300.00)))) OR (ca_state IN ('NH', 'OH', 'TX') AND ((store_sales.ss_net_profit >= 50.00) AND (store_sales.ss_net_profit <= 250.00))))) build RFs:RF0 ca_address_sk->[ss_addr_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------filter((store_sales.ss_net_profit <= 300.00) and (store_sales.ss_net_profit >= 50.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------filter(((ca_state IN ('KS', 'MI', 'SD') OR ca_state IN ('CO', 'MO', 'ND')) OR ca_state IN ('NH', 'OH', 'TX')) and (customer_address.ca_country = 'United States')) ----------------------------------PhysicalOlapScan[customer_address] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_year = 2001)) --------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter(hd_dep_count IN (1, 3)) ------------------------------PhysicalOlapScan[household_demographics] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query14.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query14.out index a8423aa81d..65cafd1d15 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query14.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query14.out @@ -6,94 +6,94 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------hashJoin[INNER_JOIN] hashCondition=((item.i_brand_id = t.brand_id) and (item.i_category_id = t.category_id) and (item.i_class_id = t.class_id)) otherCondition=() build RFs:RF6 class_id->[i_class_id];RF7 category_id->[i_category_id];RF8 brand_id->[i_brand_id] --------PhysicalProject ----------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8 ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalIntersect ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = iss.i_item_sk)) otherCondition=() ----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((d1.d_year <= 2002) and (d1.d_year >= 2000)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[item] ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = ics.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[cs_item_sk] ----------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((d2.d_year <= 2002) and (d2.d_year >= 2000)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[item] ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = iws.i_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[ws_item_sk] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((d3.d_year <= 2002) and (d3.d_year >= 2000)) --------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[item] --PhysicalCteAnchor ( cteId=CTEId#1 ) ----PhysicalCteProducer ( cteId=CTEId#1 ) ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalUnion ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ss_sold_date_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[store_sales] apply RFs: RF9 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_year <= 2002) and (date_dim.d_year >= 2000)) --------------------------PhysicalOlapScan[date_dim] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF10 d_date_sk->[cs_sold_date_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF10 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_year <= 2002) and (date_dim.d_year >= 2000)) --------------------------PhysicalOlapScan[date_dim] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[ws_sold_date_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[web_sales] apply RFs: RF11 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_year <= 2002) and (date_dim.d_year >= 2000)) --------------------------PhysicalOlapScan[date_dim] ----PhysicalResultSink ------PhysicalTopN[MERGE_SORT] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalRepeat ----------------------PhysicalUnion @@ -101,78 +101,78 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------NestedLoopJoin[INNER_JOIN](cast(sales as DOUBLE) > cast(average_sales as DOUBLE)) ----------------------------PhysicalProject ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((store_sales.ss_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF14 ss_item_sk->[ss_item_sk] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF13 i_item_sk->[ss_item_sk] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF12 d_date_sk->[ss_sold_date_sk] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF12 RF13 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) ----------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalAssertNumRows ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ------------------------PhysicalProject --------------------------NestedLoopJoin[INNER_JOIN](cast(sales as DOUBLE) > cast(average_sales as DOUBLE)) ----------------------------PhysicalProject ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((catalog_sales.cs_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF17 cs_item_sk->[ss_item_sk] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF16 i_item_sk->[cs_item_sk] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF15 d_date_sk->[cs_sold_date_sk] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF15 RF16 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) ----------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalAssertNumRows ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ------------------------PhysicalProject --------------------------NestedLoopJoin[INNER_JOIN](cast(sales as DOUBLE) > cast(average_sales as DOUBLE)) ----------------------------PhysicalProject ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF20 ws_item_sk->[ss_item_sk] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF19 i_item_sk->[ws_item_sk] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF18 d_date_sk->[ws_sold_date_sk] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF18 RF19 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) ----------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalAssertNumRows ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query15.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query15.out index d6bb6db8ee..7b670f886a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query15.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query15.out @@ -2,28 +2,28 @@ -- !ds_shape_15 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=(((substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274') OR ca_state IN ('CA', 'GA', 'WA')) OR (catalog_sales.cs_sales_price > 500.00))) -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_qoy = 1) and (date_dim.d_year = 2001)) ----------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[customer] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query16.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query16.out index f715eb2136..869cd73977 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query16.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query16.out @@ -4,34 +4,34 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] ------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[DISTINCT_LOCAL] ------------hashAgg[GLOBAL] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF4 cs_order_number->[cs_order_number] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 --------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk] ----------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() build RFs:RF2 cs_order_number->[cr_order_number] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk] ----------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cs_ship_addr_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF3 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((customer_address.ca_state = 'WV')) ------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) ----------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) ----------------------------PhysicalOlapScan[call_center] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query17.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query17.out index 8f0b805f6e..218fd1bb40 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query17.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query17.out @@ -3,47 +3,47 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF8 sr_customer_sk->[cs_bill_customer_sk];RF9 sr_item_sk->[cs_item_sk] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 RF8 RF9 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) --------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() --------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF2 sr_customer_sk->[ss_customer_sk];RF3 sr_item_sk->[ss_item_sk];RF4 sr_ticket_number->[ss_ticket_number] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((d1.d_quarter_name = '2001Q1')) ------------------------------------------PhysicalOlapScan[date_dim] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) ------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query18.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query18.out index ee0413e0c4..83b9ccb064 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query18.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query18.out @@ -2,48 +2,48 @@ -- !ds_shape_18 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF5 cs_item_sk->[i_item_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] apply RFs: RF5 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF2 cd_demo_sk->[cs_bill_cdemo_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 RF4 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((cd1.cd_education_status = 'Advanced Degree') and (cd1.cd_gender = 'F')) --------------------------------------------PhysicalOlapScan[customer_demographics] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() build RFs:RF1 c_current_cdemo_sk->[cd_demo_sk] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF1 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------filter(c_birth_month IN (1, 10, 2, 4, 7, 8)) ------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------filter(ca_state IN ('GA', 'IN', 'ME', 'NC', 'OK', 'WA', 'WY')) ------------------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_year = 1998)) ----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query19.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query19.out index 8ba138b518..5abe9c9a75 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query19.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query19.out @@ -2,11 +2,11 @@ -- !ds_shape_19 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=(( not (substring(ca_zip, 1, 5) = substring(s_zip, 1, 5)))) @@ -14,27 +14,27 @@ PhysicalResultSink ----------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 c_current_addr_sk->[ca_address_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ss_customer_sk->[c_customer_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer] apply RFs: RF2 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((item.i_manager_id = 2)) --------------------------------------------PhysicalOlapScan[item] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query2.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query2.out index 8d41fe4578..3b3bde6bac 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query2.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query2.out @@ -3,43 +3,43 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) --PhysicalCteProducer ( cteId=CTEId#1 ) ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = wscs.sold_date_sk)) otherCondition=() --------------PhysicalUnion -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[web_sales] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[catalog_sales] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------PhysicalProject ------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(d_week_seq2 - 53))) otherCondition=() ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject ------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_year = 1998)) --------------------------PhysicalOlapScan[date_dim] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_week_seq = d_week_seq2)) otherCondition=() build RFs:RF1 d_week_seq->[d_week_seq] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject ------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_year = 1999)) --------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query20.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query20.out index a0dc7ea17e..50756d2605 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query20.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query20.out @@ -2,26 +2,26 @@ -- !ds_shape_20 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[cs_item_sk] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_date <= '2002-02-25') and (date_dim.d_date >= '2002-01-26')) ------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------filter(i_category IN ('Books', 'Shoes', 'Women')) --------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query21.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query21.out index c67307e33f..448937184b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query21.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query21.out @@ -2,11 +2,11 @@ -- !ds_shape_21 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------filter((if((inv_before > 0), (cast(inv_after as DOUBLE) / cast(inv_before as DOUBLE)), NULL) <= 1.5) and (if((inv_before > 0), (cast(inv_after as DOUBLE) / cast(inv_before as DOUBLE)), NULL) >= cast((2.000000 / 3.0) as DOUBLE))) ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() @@ -14,15 +14,15 @@ PhysicalResultSink ----------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] ------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] --------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) --------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_date <= '2002-03-29') and (date_dim.d_date >= '2002-01-28')) ------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[warehouse] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query22.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query22.out index c4c5c91428..32f891229a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query22.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query22.out @@ -2,11 +2,11 @@ -- !ds_shape_22 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject @@ -14,10 +14,10 @@ PhysicalResultSink ----------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() ------------------------PhysicalProject --------------------------PhysicalOlapScan[inventory] apply RFs: RF1 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[item] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_month_seq <= 1199) and (date_dim.d_month_seq >= 1188)) ----------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query23.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query23.out index e1aafd4c5a..4ae641ee37 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query23.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query23.out @@ -5,7 +5,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalProject ------filter((cnt > 4)) --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() @@ -13,11 +13,11 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter(d_year IN (2000, 2001, 2002, 2003)) ----------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[item] --PhysicalCteAnchor ( cteId=CTEId#2 ) @@ -25,26 +25,26 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalProject --------NestedLoopJoin[INNER_JOIN](cast(ssales as DOUBLE) > cast((0.9500 * tpcds_cmax) as DOUBLE)) ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------filter(( not ss_customer_sk IS NULL)) --------------------PhysicalOlapScan[store_sales] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecReplicated] ------------PhysicalProject --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecGather] ------------------hashAgg[LOCAL] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------filter(( not ss_customer_sk IS NULL)) ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter(d_year IN (2000, 2001, 2002, 2003)) --------------------------------------PhysicalOlapScan[date_dim] @@ -52,45 +52,45 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalLimit[GLOBAL] --------PhysicalLimit[LOCAL] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalUnion ------------------PhysicalProject --------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[cs_bill_customer_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) ------------------PhysicalProject --------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF6 c_customer_sk->[ws_bill_customer_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF5 RF6 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query24.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query24.out index e8ad4ab923..1d9fde7a75 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query24.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query24.out @@ -4,56 +4,56 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashJoin[INNER_JOIN] hashCondition=((store.s_zip = customer_address.ca_zip) and (store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((store.s_market_id = 8)) ------------------------------------PhysicalOlapScan[store] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=(( not (c_birth_country = upper(ca_country)))) -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer_address] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[store_returns] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalProject ------------NestedLoopJoin[INNER_JOIN](cast(paid as DOUBLE) > cast((0.05 * avg(cast(netpaid as DECIMALV3(38, 4)))) as DOUBLE)) --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject ------------------------filter((ssales.i_color = 'beige')) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecGather] ----------------------hashAgg[LOCAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------------PhysicalProject ----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query25.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query25.out index 610a113c74..05a891bcf7 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query25.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query25.out @@ -2,47 +2,47 @@ -- !ds_shape_25 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF8 sr_customer_sk->[cs_bill_customer_sk];RF9 sr_item_sk->[cs_item_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 RF8 RF9 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((d3.d_moy <= 10) and (d3.d_moy >= 4) and (d3.d_year = 2000)) ------------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() ------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF2 sr_customer_sk->[ss_customer_sk];RF3 sr_item_sk->[ss_item_sk];RF4 sr_ticket_number->[ss_ticket_number] --------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((d2.d_moy <= 10) and (d2.d_moy >= 4) and (d2.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query26.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query26.out index b0c991f37a..a83a3b91eb 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query26.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query26.out @@ -2,14 +2,14 @@ -- !ds_shape_26 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF2 p_promo_sk->[cs_promo_sk] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] @@ -17,19 +17,19 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[cs_bill_cdemo_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((customer_demographics.cd_education_status = 'Unknown') and (customer_demographics.cd_gender = 'M') and (customer_demographics.cd_marital_status = 'S')) ------------------------------------PhysicalOlapScan[customer_demographics] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_year = 2001)) --------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter(((promotion.p_channel_email = 'N') OR (promotion.p_channel_event = 'N'))) ----------------------------PhysicalOlapScan[promotion] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query27.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query27.out index 32645c2e06..611ecc14a2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query27.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query27.out @@ -3,35 +3,35 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalRepeat --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF3 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((customer_demographics.cd_education_status = 'Secondary') and (customer_demographics.cd_gender = 'F') and (customer_demographics.cd_marital_status = 'D')) ------------------------------------------PhysicalOlapScan[customer_demographics] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_year = 1999)) --------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter(s_state IN ('AL', 'LA', 'MI', 'MO', 'SC', 'TN')) ------------------------------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 079837446a..08f72b84ba 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 @@ -15,47 +15,47 @@ PhysicalResultSink ------------------------NestedLoopJoin[CROSS_JOIN] --------------------------PhysicalLimit[LOCAL] ----------------------------hashAgg[GLOBAL] -------------------------------PhysicalDistribute +------------------------------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 +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalLimit[LOCAL] ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------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 +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalLimit[LOCAL] --------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute +----------------------------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 +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalLimit[LOCAL] ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------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 +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------PhysicalLimit[LOCAL] ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------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 +----------PhysicalDistribute[DistributionSpecReplicated] ------------PhysicalLimit[LOCAL] --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------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)) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query29.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query29.out index 0a890c4e35..02d504f24a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query29.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query29.out @@ -2,10 +2,10 @@ -- !ds_shape_29 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[cs_sold_date_sk] @@ -13,33 +13,33 @@ PhysicalResultSink --------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF7 sr_customer_sk->[cs_bill_customer_sk];RF8 sr_item_sk->[cs_item_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 RF8 RF9 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() --------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF2 sr_customer_sk->[ss_customer_sk];RF3 sr_item_sk->[ss_item_sk];RF4 sr_ticket_number->[ss_ticket_number] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1999)) ------------------------------------------PhysicalOlapScan[date_dim] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((d2.d_moy <= 7) and (d2.d_moy >= 4) and (d2.d_year = 1999)) ------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[store] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter(d_year IN (1999, 2000, 2001)) ------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query3.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query3.out index 7704d94620..5a86e9fdb7 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query3.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query3.out @@ -2,22 +2,22 @@ -- !ds_shape_3 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((item.i_manufact_id = 816)) ----------------------------PhysicalOlapScan[item] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((dt.d_moy = 11)) --------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query30.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query30.out index 05a7965c22..1455f42051 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query30.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query30.out @@ -4,45 +4,45 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[wr_returned_date_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[web_returns] apply RFs: RF0 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_year = 2002)) ----------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[customer_address] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE))) --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ctr_customer_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[c_current_addr_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[customer] apply RFs: RF2 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((customer_address.ca_state = 'IN')) ----------------------------PhysicalOlapScan[customer_address] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------------PhysicalProject --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query31.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query31.out index 3a317c3ce3..3f3b3c5b8e 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query31.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query31.out @@ -4,74 +4,74 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((ss.d_year = 2000) and d_qoy IN (1, 2, 3)) ----------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[customer_address] --PhysicalCteAnchor ( cteId=CTEId#1 ) ----PhysicalCteProducer ( cteId=CTEId#1 ) ------PhysicalProject --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ws_bill_addr_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((ws.d_year = 2000) and d_qoy IN (1, 2, 3)) ------------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[customer_address] ----PhysicalResultSink ------PhysicalQuickSort[MERGE_SORT] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------PhysicalQuickSort[LOCAL_SORT] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((ws1.ca_county = ws3.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------filter((ws3.d_qoy = 3) and (ws3.d_year = 2000)) ----------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((ss2.ca_county = ss3.ca_county)) otherCondition=() ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((ss3.d_qoy = 3) and (ss3.d_year = 2000)) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ca_county = ws2.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) ----------------------hashJoin[INNER_JOIN] hashCondition=((ss1.ca_county = ws1.ca_county)) otherCondition=() ------------------------hashJoin[INNER_JOIN] hashCondition=((ss1.ca_county = ss2.ca_county)) otherCondition=() ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------filter((ss1.d_qoy = 1) and (ss1.d_year = 2000)) --------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------filter((ss2.d_qoy = 2) and (ss2.d_year = 2000)) --------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter((ws1.d_qoy = 1) and (ws1.d_year = 2000)) ------------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((ws2.d_qoy = 2) and (ws2.d_year = 2000)) ----------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query32.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query32.out index fa698587ba..4ba68645ec 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query32.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query32.out @@ -4,24 +4,24 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalProject --------------filter((cast(cs_ext_discount_amt as DECIMALV3(38, 5)) > (1.3 * avg(cast(cs_ext_discount_amt as DECIMALV3(9, 4))) OVER(PARTITION BY i_item_sk)))) ----------------PhysicalWindow ------------------PhysicalQuickSort[LOCAL_SORT] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((item.i_manufact_id = 29)) ------------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '1999-04-07') and (date_dim.d_date >= '1999-01-07')) --------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query33.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query33.out index 7ed55c113a..4f960339fa 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query33.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query33.out @@ -2,98 +2,98 @@ -- !ds_shape_33 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF3 i_manufact_id->[i_manufact_id] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((item.i_category = 'Home')) --------------------------PhysicalOlapScan[item] apply RFs: RF3 --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) ------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ------------------------------------------PhysicalOlapScan[customer_address] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF7 i_manufact_id->[i_manufact_id] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((item.i_category = 'Home')) --------------------------PhysicalOlapScan[item] apply RFs: RF7 --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[cs_bill_addr_sk] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 RF6 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) ------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ------------------------------------------PhysicalOlapScan[customer_address] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF11 i_manufact_id->[i_manufact_id] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((item.i_category = 'Home')) --------------------------PhysicalOlapScan[item] apply RFs: RF11 --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 ws_item_sk->[i_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[item] apply RFs: RF10 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[ws_bill_addr_sk] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) ------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ------------------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query34.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query34.out index ac5d62c541..00161e3291 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query34.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query34.out @@ -2,16 +2,16 @@ -- !ds_shape_34 -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk] ------------PhysicalProject --------------PhysicalOlapScan[customer] apply RFs: RF3 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------filter((dn.cnt <= 20) and (dn.cnt >= 15)) ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------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] @@ -20,15 +20,15 @@ PhysicalResultSink ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((((date_dim.d_dom >= 1) AND (date_dim.d_dom <= 3)) OR ((date_dim.d_dom >= 25) AND (date_dim.d_dom <= 28))) and d_year IN (1998, 1999, 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.2) and hd_buy_potential IN ('0-500', '1001-5000')) ----------------------------------PhysicalOlapScan[household_demographics] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(s_county IN ('Barrow County', 'Daviess County', 'Franklin Parish', 'Luce County', 'Richland County', 'Walker County', 'Williamson County', 'Ziebach County')) --------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query35.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query35.out index 55fc703f21..7beb459e11 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query35.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query35.out @@ -3,10 +3,10 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------filter(($c$1 OR $c$2)) @@ -14,44 +14,44 @@ PhysicalResultSink ----------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalProject ------------------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) --------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[customer] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer_demographics] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ------------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query36.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query36.out index 222d13f645..a5a10f4fc0 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query36.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query36.out @@ -3,15 +3,15 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalRepeat ----------------------------PhysicalProject @@ -22,14 +22,14 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF2 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((d1.d_year = 2002)) ----------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[item] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter(s_state IN ('AL', 'GA', 'MI', 'MO', 'OH', 'SC', 'SD', 'TN')) --------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query37.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query37.out index 3ac16407fa..28e8aac54c 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query37.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query37.out @@ -2,16 +2,16 @@ -- !ds_shape_37 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk] ------------------PhysicalProject --------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] ------------------------PhysicalProject @@ -19,11 +19,11 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------filter((inventory.inv_quantity_on_hand <= 500) and (inventory.inv_quantity_on_hand >= 100)) --------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((item.i_current_price <= 75.00) and (item.i_current_price >= 45.00) and i_manufact_id IN (1000, 707, 747, 856)) ----------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_date <= '1999-04-22') and (date_dim.d_date >= '1999-02-21')) ------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query38.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query38.out index 216d0c5531..d7d71de6f4 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query38.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query38.out @@ -4,62 +4,62 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalProject --------------PhysicalIntersect ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ----------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ----------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ----------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer] 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 a105c7bec9..6429c3f87c 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 @@ -7,32 +7,32 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------hashAgg[LOCAL] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() --------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk] ----------------------PhysicalOlapScan[inventory] apply RFs: RF0 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_year = 1998) and d_moy IN (1, 2)) ----------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------PhysicalOlapScan[warehouse] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] -------PhysicalDistribute +------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 +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((inv1.d_moy = 1)) --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalDistribute +--------------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/query4.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query4.out index 81e9dc9527..133758d014 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query4.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query4.out @@ -4,80 +4,80 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((PULL_UP_UNIFIED_OUTPUT_ALIAS = customer.c_customer_sk)) otherCondition=() ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalUnion --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000)) --------------------------------PhysicalOlapScan[date_dim] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000)) --------------------------------PhysicalOlapScan[date_dim] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000)) --------------------------------PhysicalOlapScan[date_dim] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[customer] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((t_w_firstyear.dyear = 1999) and (t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year_total > 0.000000)) --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=() -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------filter((t_w_secyear.dyear = 2000) and (t_w_secyear.sale_type = 'w')) ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_c_firstyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((t_c_firstyear.dyear = 1999) and (t_c_firstyear.sale_type = 'c') and (t_c_firstyear.year_total > 0.000000)) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((t_s_secyear.dyear = 2000) and (t_s_secyear.sale_type = 's')) ----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=() -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter((t_c_secyear.dyear = 2000) and (t_c_secyear.sale_type = 'c')) ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter((t_s_firstyear.dyear = 1999) and (t_s_firstyear.sale_type = 's') and (t_s_firstyear.year_total > 0.000000)) ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query40.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query40.out index f032163867..4cf3577369 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query40.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query40.out @@ -2,10 +2,10 @@ -- !ds_shape_40 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() @@ -17,15 +17,15 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) --------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_date <= '2001-05-02') and (date_dim.d_date >= '2001-03-03')) ------------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[warehouse] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query41.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query41.out index 584dda5785..f07731a85b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query41.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query41.out @@ -2,21 +2,21 @@ -- !ds_shape_41 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((item.i_manufact = i1.i_manufact)) otherCondition=() build RFs:RF0 i_manufact->[i_manufact] ------------------PhysicalProject --------------------filter((i1.i_manufact_id <= 788) and (i1.i_manufact_id >= 748)) ----------------------PhysicalOlapScan[item] apply RFs: RF0 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((item_cnt > 0)) ------------------------hashAgg[GLOBAL] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject --------------------------------filter((((((((((((item.i_category = 'Women') AND i_color IN ('aquamarine', 'gainsboro')) AND i_units IN ('Dozen', 'Ounce')) AND i_size IN ('economy', 'medium')) OR ((((item.i_category = 'Women') AND i_color IN ('chiffon', 'violet')) AND i_units IN ('Pound', 'Ton')) AND i_size IN ('extra large', 'small'))) OR ((((item.i_category = 'Women') AND i_color IN ('blanched', 'tomato')) AND i_units IN ('Case', 'Tbl')) AND i_size IN ('economy', 'medium'))) OR ((((item.i_category = 'Women') AND i_color IN ('almond', 'lime')) AND i_units IN ('Box', 'Dram')) AND i_size IN ('extra large', 'small'))) OR ((((item.i_category = 'Men') AND i_color IN ('blue', 'chartreuse')) AND i_units IN ('Each', 'Oz')) AND i_size IN ('N/A', 'large'))) OR ((((item.i_category = 'Men') AND i_color IN ('dodger', 'tan')) AND i_units IN ('Bunch', 'Tsp')) AND i_size IN ('economy', 'medium'))) OR ((((item.i_category = 'Men') AND i_color IN ('peru', 'saddle')) AND i_units IN ('Gram', 'Pallet')) AND i_size IN ('N/A', 'large'))) OR ((((item.i_category = 'Men') AND i_color IN ('indian', 'spring')) AND i_units IN ('Carton', 'Unknown')) AND i_size IN ('economy', 'medium')))) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query42.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query42.out index 7d6239b062..fe908b68c8 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query42.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query42.out @@ -2,21 +2,21 @@ -- !ds_shape_42 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((item.i_manager_id = 1)) --------------------------PhysicalOlapScan[item] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((dt.d_moy = 11) and (dt.d_year = 2002)) ------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query43.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query43.out index 445a381983..2de98f4e1f 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query43.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query43.out @@ -2,10 +2,10 @@ -- !ds_shape_43 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] @@ -13,11 +13,11 @@ PhysicalResultSink --------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_year = 2000)) ----------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((store.s_gmt_offset = -5.00)) ------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query44.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query44.out index 35ca3b8e45..cde6a04b5d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query44.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query44.out @@ -2,68 +2,68 @@ -- !ds_shape_44 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() build RFs:RF1 item_sk->[i_item_sk] ------------PhysicalProject --------------PhysicalOlapScan[item] apply RFs: RF1 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((asceding.rnk = descending.rnk)) otherCondition=() ------------------hashJoin[INNER_JOIN] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() build RFs:RF0 item_sk->[i_item_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[item] apply RFs: RF0 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((rnk < 11)) --------------------------PhysicalWindow ----------------------------PhysicalQuickSort[MERGE_SORT] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------PhysicalQuickSort[LOCAL_SORT] ----------------------------------PhysicalPartitionTopN ------------------------------------PhysicalProject --------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DOUBLE) > cast((0.9 * rank_col) as DOUBLE)) ----------------------------------------PhysicalProject ------------------------------------------hashAgg[GLOBAL] ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------hashAgg[LOCAL] ------------------------------------------------PhysicalProject --------------------------------------------------filter((ss1.ss_store_sk = 146)) ----------------------------------------------------PhysicalOlapScan[store_sales] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalAssertNumRows ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------------PhysicalProject ------------------------------------------------hashAgg[GLOBAL] ---------------------------------------------------PhysicalDistribute +--------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------hashAgg[LOCAL] ------------------------------------------------------PhysicalProject --------------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL) ----------------------------------------------------------PhysicalOlapScan[store_sales] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((rnk < 11)) ------------------------PhysicalWindow --------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------PhysicalQuickSort[LOCAL_SORT] --------------------------------PhysicalPartitionTopN ----------------------------------PhysicalProject ------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DOUBLE) > cast((0.9 * rank_col) as DOUBLE)) --------------------------------------PhysicalProject ----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------hashAgg[LOCAL] ----------------------------------------------PhysicalProject ------------------------------------------------filter((ss1.ss_store_sk = 146)) --------------------------------------------------PhysicalOlapScan[store_sales] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalAssertNumRows -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------------PhysicalProject ----------------------------------------------hashAgg[GLOBAL] -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------------hashAgg[LOCAL] ----------------------------------------------------PhysicalProject ------------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query45.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query45.out index df8cc18930..c73e08c0fc 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query45.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query45.out @@ -2,40 +2,40 @@ -- !ds_shape_45 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------filter((substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274') OR $c$1)) ------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_qoy = 2) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer_address] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter(i_item_sk IN (11, 13, 17, 19, 2, 23, 29, 3, 5, 7)) --------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query46.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query46.out index a317f24236..3aefef56ee 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query46.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query46.out @@ -2,16 +2,16 @@ -- !ds_shape_46 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=(( not (ca_city = bought_city))) -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] @@ -19,27 +19,27 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter(d_dow IN (0, 6) and d_year IN (1999, 2000, 2001)) ----------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter(((household_demographics.hd_dep_count = 6) OR (household_demographics.hd_vehicle_count = 0))) ------------------------------------PhysicalOlapScan[household_demographics] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter(s_city IN ('Centerville', 'Fairview', 'Five Points', 'Liberty', 'Oak Grove')) ----------------------------------PhysicalOlapScan[store] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer_address] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=() -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[customer] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query47.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query47.out index 62a5a0520f..174fd05d61 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query47.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query47.out @@ -7,10 +7,10 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() @@ -19,32 +19,32 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((((date_dim.d_year = 2001) OR ((date_dim.d_year = 2000) AND (date_dim.d_moy = 12))) OR ((date_dim.d_year = 2002) AND (date_dim.d_moy = 1)))) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store] --PhysicalResultSink ----PhysicalProject ------PhysicalTopN[MERGE_SORT] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((v1.i_brand = v1_lag.i_brand) and (v1.i_category = v1_lag.i_category) and (v1.rn = expr_(rn + 1)) and (v1.s_company_name = v1_lag.s_company_name) and (v1.s_store_name = v1_lag.s_store_name)) otherCondition=() ----------------hashJoin[INNER_JOIN] hashCondition=((v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1)) and (v1.s_company_name = v1_lead.s_company_name) and (v1.s_store_name = v1_lead.s_store_name)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000) and (v2.avg_monthly_sales > 0.0000) and (v2.d_year = 2001)) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query48.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query48.out index 6f8c32bfeb..a4f0b1a09f 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query48.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query48.out @@ -2,7 +2,7 @@ -- !ds_shape_48 -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() @@ -10,24 +10,24 @@ PhysicalResultSink --------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=((((ca_state IN ('IA', 'MD', 'MN') AND ((store_sales.ss_net_profit >= 0.00) AND (store_sales.ss_net_profit <= 2000.00))) OR (ca_state IN ('IL', 'TX', 'VA') AND ((store_sales.ss_net_profit >= 150.00) AND (store_sales.ss_net_profit <= 3000.00)))) OR (ca_state IN ('IN', 'MI', 'WI') AND ((store_sales.ss_net_profit >= 50.00) AND (store_sales.ss_net_profit <= 25000.00))))) build RFs:RF1 ca_address_sk->[ss_addr_sk] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=((((((customer_demographics.cd_marital_status = 'U') AND (customer_demographics.cd_education_status = 'Primary')) AND ((store_sales.ss_sales_price >= 100.00) AND (store_sales.ss_sales_price <= 150.00))) OR (((customer_demographics.cd_marital_status = 'W') AND (customer_demographics.cd_education_status = 'College')) AND ((store_sales.ss_sales_price >= 50.00) AND (store_sales.ss_sales_price <= 100.00)))) OR (((customer_demographics.cd_marital_status = 'D') AND (customer_demographics.cd_education_status = '2 yr Degree')) AND ((store_sales.ss_sales_price >= 150.00) AND (store_sales.ss_sales_price <= 200.00))))) build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] ------------------------PhysicalProject --------------------------filter((store_sales.ss_net_profit <= 25000.00) and (store_sales.ss_net_profit >= 0.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter(((((customer_demographics.cd_marital_status = 'U') AND (customer_demographics.cd_education_status = 'Primary')) OR ((customer_demographics.cd_marital_status = 'W') AND (customer_demographics.cd_education_status = 'College'))) OR ((customer_demographics.cd_marital_status = 'D') AND (customer_demographics.cd_education_status = '2 yr Degree')))) ------------------------------PhysicalOlapScan[customer_demographics] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter(((ca_state IN ('IA', 'MD', 'MN') OR ca_state IN ('IL', 'TX', 'VA')) OR ca_state IN ('IN', 'MI', 'WI')) and (customer_address.ca_country = 'United States')) --------------------------PhysicalOlapScan[customer_address] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((date_dim.d_year = 1999)) ----------------------PhysicalOlapScan[date_dim] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalProject ----------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query49.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query49.out index b3ae487ebe..7fb023642d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query49.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query49.out @@ -2,24 +2,24 @@ -- !ds_shape_49 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------filter(((return_rank <= 10) OR (currency_rank <= 10))) ----------------------PhysicalWindow ------------------------PhysicalQuickSort[LOCAL_SORT] --------------------------PhysicalWindow ----------------------------PhysicalQuickSort[MERGE_SORT] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------PhysicalQuickSort[LOCAL_SORT] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number];RF2 ws_item_sk->[wr_item_sk] @@ -30,22 +30,22 @@ PhysicalResultSink ------------------------------------------------PhysicalProject --------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) ----------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) ------------------------------------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------filter(((return_rank <= 10) OR (currency_rank <= 10))) ----------------------PhysicalWindow ------------------------PhysicalQuickSort[LOCAL_SORT] --------------------------PhysicalWindow ----------------------------PhysicalQuickSort[MERGE_SORT] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------PhysicalQuickSort[LOCAL_SORT] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF4 cs_order_number->[cr_order_number];RF5 cs_item_sk->[cr_item_sk] @@ -56,22 +56,22 @@ PhysicalResultSink ------------------------------------------------PhysicalProject --------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) ----------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) ------------------------------------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------filter(((return_rank <= 10) OR (currency_rank <= 10))) ----------------------PhysicalWindow ------------------------PhysicalQuickSort[LOCAL_SORT] --------------------------PhysicalWindow ----------------------------PhysicalQuickSort[MERGE_SORT] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------PhysicalQuickSort[LOCAL_SORT] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF7 ss_ticket_number->[sr_ticket_number];RF8 ss_item_sk->[sr_item_sk] @@ -82,7 +82,7 @@ PhysicalResultSink ------------------------------------------------PhysicalProject --------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) ----------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) ------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query5.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query5.out index 9e38aadcf2..8a8f8b1180 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query5.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query5.out @@ -2,82 +2,82 @@ -- !ds_shape_5 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalUnion --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.store_sk = store.s_store_sk)) otherCondition=() --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk,sr_returned_date_sk] ------------------------------------PhysicalUnion ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk,cr_returned_date_sk] ------------------------------------PhysicalUnion ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF1 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[catalog_page] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.wsr_web_site_sk = web_site.web_site_sk)) otherCondition=() --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk,wr_returned_date_sk] ------------------------------------PhysicalUnion ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF2 wr_item_sk->[ws_item_sk];RF3 wr_order_number->[ws_order_number] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF4 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query50.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query50.out index 60807f8e30..f92a4b59d0 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query50.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query50.out @@ -2,10 +2,10 @@ -- !ds_shape_50 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() @@ -18,14 +18,14 @@ PhysicalResultSink --------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((d2.d_moy = 8) and (d2.d_year = 2001)) ----------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query51.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query51.out index 0278c0a003..19f1ce2f7b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query51.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query51.out @@ -3,46 +3,46 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------filter((web_cumulative > store_cumulative)) --------------PhysicalWindow ----------------PhysicalQuickSort[LOCAL_SORT] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[FULL_OUTER_JOIN] hashCondition=((web.d_date = store.d_date) and (web.item_sk = store.item_sk)) otherCondition=() -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalWindow ------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) ----------------------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalWindow ------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) ----------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query52.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query52.out index 5dda178baf..965bdd14e5 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query52.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query52.out @@ -2,22 +2,22 @@ -- !ds_shape_52 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((item.i_manager_id = 1)) ----------------------------PhysicalOlapScan[item] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((dt.d_moy = 12) and (dt.d_year = 2002)) --------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query53.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query53.out index 2581a0fc3e..822cb5b88a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query53.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query53.out @@ -3,16 +3,16 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------filter((if((avg_quarterly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_quarterly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_quarterly_sales), NULL) > 0.100000)) --------------PhysicalWindow ----------------PhysicalQuickSort[LOCAL_SORT] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() @@ -22,15 +22,15 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((((i_category IN ('Books', 'Children', 'Electronics') AND i_class IN ('personal', 'portable', 'reference', 'self-help')) AND i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')) OR ((i_category IN ('Men', 'Music', 'Women') AND i_class IN ('accessories', 'classical', 'fragrances', 'pants')) AND i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')))) ----------------------------------------------PhysicalOlapScan[item] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter(d_month_seq IN (1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query54.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query54.out index e33b59033c..1bacc9f548 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query54.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query54.out @@ -3,14 +3,14 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= (d_month_seq + 3)) @@ -18,66 +18,66 @@ PhysicalResultSink ------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= (d_month_seq + 1)) --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((my_customers.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_county = store.s_county) and (customer_address.ca_state = store.s_state)) otherCondition=() build RFs:RF3 s_county->[ca_county];RF4 s_state->[ca_state] ------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((my_customers.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 c_current_addr_sk->[ca_address_sk] --------------------------------------------------PhysicalProject ----------------------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF2 RF3 RF4 ---------------------------------------------------PhysicalDistribute +--------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------PhysicalProject ------------------------------------------------------hashAgg[GLOBAL] ---------------------------------------------------------PhysicalDistribute +--------------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------------hashAgg[LOCAL] ------------------------------------------------------------PhysicalProject --------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_customer_sk = cs_or_ws_sales.customer_sk)) otherCondition=() build RFs:RF1 customer_sk->[c_customer_sk] ----------------------------------------------------------------PhysicalProject ------------------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 -----------------------------------------------------------------PhysicalDistribute +----------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------------------------PhysicalProject --------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs_or_ws_sales.sold_date_sk = date_dim.d_date_sk)) otherCondition=() ----------------------------------------------------------------------PhysicalProject ------------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs_or_ws_sales.item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk,ws_item_sk] --------------------------------------------------------------------------PhysicalUnion -----------------------------------------------------------------------------PhysicalDistribute +----------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------------------------------------PhysicalProject --------------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 -----------------------------------------------------------------------------PhysicalDistribute +----------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------------------------------------PhysicalProject --------------------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 ---------------------------------------------------------------------------PhysicalDistribute +--------------------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------------------------------------PhysicalProject ------------------------------------------------------------------------------filter((item.i_category = 'Women') and (item.i_class = 'maternity')) --------------------------------------------------------------------------------PhysicalOlapScan[item] -----------------------------------------------------------------------PhysicalDistribute +----------------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------------------------------PhysicalProject --------------------------------------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) ----------------------------------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------PhysicalProject ----------------------------------------------------PhysicalOlapScan[store] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalAssertNumRows -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------hashAgg[GLOBAL] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------hashAgg[LOCAL] --------------------------------------------PhysicalProject ----------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) ------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalAssertNumRows ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------hashAgg[LOCAL] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query55.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query55.out index 315bb92b5a..db39db2da2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query55.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query55.out @@ -2,22 +2,22 @@ -- !ds_shape_55 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((item.i_manager_id = 100)) ----------------------------PhysicalOlapScan[item] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) --------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query56.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query56.out index 9dc5d65a80..dc83888ade 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query56.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query56.out @@ -2,91 +2,91 @@ -- !ds_shape_56 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ss_addr_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[item] apply RFs: RF0 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter(i_color IN ('cyan', 'green', 'powder')) ------------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------filter((customer_address.ca_gmt_offset = -6.00)) ----------------------------------PhysicalOlapScan[customer_address] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF7 cs_bill_addr_sk->[ca_address_sk] ----------------------------PhysicalProject ------------------------------filter((customer_address.ca_gmt_offset = -6.00)) --------------------------------PhysicalOlapScan[customer_address] apply RFs: RF7 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[item] apply RFs: RF4 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter(i_color IN ('cyan', 'green', 'powder')) ------------------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF11 ws_bill_addr_sk->[ca_address_sk] ----------------------------PhysicalProject ------------------------------filter((customer_address.ca_gmt_offset = -6.00)) --------------------------------PhysicalOlapScan[customer_address] apply RFs: RF11 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ws_item_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[item] apply RFs: RF8 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter(i_color IN ('cyan', 'green', 'powder')) ------------------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query57.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query57.out index c53df8f4e6..d09ed9ca40 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query57.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query57.out @@ -8,44 +8,44 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] --------------PhysicalProject -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((call_center.cc_call_center_sk = catalog_sales.cs_call_center_sk)) otherCondition=() ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((((date_dim.d_year = 1999) OR ((date_dim.d_year = 1998) AND (date_dim.d_moy = 12))) OR ((date_dim.d_year = 2000) AND (date_dim.d_moy = 1)))) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[call_center] --PhysicalResultSink ----PhysicalProject ------PhysicalTopN[MERGE_SORT] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((v1.cc_name = v1_lag.cc_name) and (v1.i_brand = v1_lag.i_brand) and (v1.i_category = v1_lag.i_category) and (v1.rn = expr_(rn + 1))) otherCondition=() ----------------hashJoin[INNER_JOIN] hashCondition=((v1.cc_name = v1_lead.cc_name) and (v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1))) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000) and (v2.avg_monthly_sales > 0.0000) and (v2.d_year = 1999)) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query58.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query58.out index 9defe6848b..d49c4adfe9 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query58.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query58.out @@ -3,96 +3,96 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((ss_items.item_id = cs_items.item_id)) otherCondition=((cast(cs_item_rev as DOUBLE) <= cast((1.1 * ss_item_rev) as DOUBLE)) and (cast(cs_item_rev as DOUBLE) <= cast((1.1 * ws_item_rev) as DOUBLE)) and (cast(cs_item_rev as DOUBLE) >= cast((0.9 * ss_item_rev) as DOUBLE)) and (cast(cs_item_rev as DOUBLE) >= cast((0.9 * ws_item_rev) as DOUBLE)) and (cast(ss_item_rev as DOUBLE) <= cast((1.1 * cs_item_rev) as DOUBLE)) and (cast(ss_item_rev as DOUBLE) >= cast((0.9 * cs_item_rev) as DOUBLE)) and (cast(ws_item_rev as DOUBLE) <= cast((1.1 * cs_item_rev) as DOUBLE)) and (cast(ws_item_rev as DOUBLE) >= cast((0.9 * cs_item_rev) as DOUBLE))) build RFs:RF13 item_id->[i_item_id] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF12 i_item_sk->[cs_item_sk] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF11 RF12 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF10 d_date->[d_date] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF10 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF9 d_week_seq->[d_week_seq] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalAssertNumRows -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_date = '2001-03-24')) ----------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[item] apply RFs: RF13 --------------hashJoin[INNER_JOIN] hashCondition=((ss_items.item_id = ws_items.item_id)) otherCondition=((cast(ss_item_rev as DOUBLE) <= cast((1.1 * ws_item_rev) as DOUBLE)) and (cast(ss_item_rev as DOUBLE) >= cast((0.9 * ws_item_rev) as DOUBLE)) and (cast(ws_item_rev as DOUBLE) <= cast((1.1 * ss_item_rev) as DOUBLE)) and (cast(ws_item_rev as DOUBLE) >= cast((0.9 * ss_item_rev) as DOUBLE))) build RFs:RF8 item_id->[i_item_id] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[ws_item_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ws_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalAssertNumRows -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((date_dim.d_date = '2001-03-24')) ------------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[item] apply RFs: RF8 ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalAssertNumRows -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((date_dim.d_date = '2001-03-24')) ------------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query59.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query59.out index 2aa68aef78..56c5d51905 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query59.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query59.out @@ -4,48 +4,48 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() ----------------PhysicalProject ------------------PhysicalOlapScan[store_sales] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalProject ------PhysicalTopN[MERGE_SORT] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(d_week_seq2 - 52)) and (y.s_store_id1 = x.s_store_id2)) otherCondition=() -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((wss.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF4 s_store_sk->[ss_store_sk] ----------------------hashJoin[INNER_JOIN] hashCondition=((d.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF3 d_week_seq->[d_week_seq] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------------PhysicalProject ----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((d.d_month_seq <= 1207) and (d.d_month_seq >= 1196)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((wss.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] ----------------------hashJoin[INNER_JOIN] hashCondition=((d.d_week_seq = d_week_seq2)) otherCondition=() build RFs:RF1 d_week_seq->[d_week_seq] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------------PhysicalProject ----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((d.d_month_seq <= 1219) and (d.d_month_seq >= 1208)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query6.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query6.out index 8d5029ff5d..07fa54e46b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query6.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query6.out @@ -2,53 +2,53 @@ -- !ds_shape_6 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------filter((cnt >= 10)) ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer] apply RFs: RF4 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((s.ss_item_sk = i.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((s.ss_sold_date_sk = d.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((d.d_month_seq = date_dim.d_month_seq)) otherCondition=() build RFs:RF1 d_month_seq->[d_month_seq] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalAssertNumRows -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------------------hashAgg[GLOBAL] -----------------------------------------------------PhysicalDistribute +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------------hashAgg[LOCAL] --------------------------------------------------------PhysicalProject ----------------------------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2002)) ------------------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------hashJoin[INNER_JOIN] hashCondition=((j.i_category = i.i_category)) otherCondition=((cast(i_current_price as DECIMALV3(38, 5)) > (1.2 * avg(cast(i_current_price as DECIMALV3(9, 4)))))) --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[item] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------hashAgg[LOCAL] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[item] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query60.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query60.out index 753c5b9826..0f1627194c 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query60.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query60.out @@ -2,96 +2,96 @@ -- !ds_shape_60 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ss_addr_sk] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) --------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------filter((customer_address.ca_gmt_offset = -7.00)) --------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] apply RFs: RF0 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Children')) --------------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[cs_bill_addr_sk] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) --------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------filter((customer_address.ca_gmt_offset = -7.00)) --------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] apply RFs: RF4 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Children')) --------------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_bill_addr_sk] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 RF11 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) --------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------filter((customer_address.ca_gmt_offset = -7.00)) --------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] apply RFs: RF8 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Children')) --------------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query61.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query61.out index f55fd6c365..ee708bee9b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query61.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query61.out @@ -6,73 +6,73 @@ PhysicalResultSink ------PhysicalTopN[LOCAL_SORT] --------NestedLoopJoin[CROSS_JOIN] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF10 c_current_addr_sk->[ca_address_sk] --------------------PhysicalProject ----------------------filter((customer_address.ca_gmt_offset = -7.00)) ------------------------PhysicalOlapScan[customer_address] apply RFs: RF10 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF9 ss_customer_sk->[c_customer_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[customer] apply RFs: RF9 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF8 ss_item_sk->[i_item_sk] ------------------------------PhysicalProject --------------------------------filter((item.i_category = 'Jewelry')) ----------------------------------PhysicalOlapScan[item] apply RFs: RF8 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF7 ss_promo_sk->[p_promo_sk] ------------------------------------PhysicalProject --------------------------------------filter((((promotion.p_channel_dmail = 'Y') OR (promotion.p_channel_email = 'Y')) OR (promotion.p_channel_tv = 'Y'))) ----------------------------------------PhysicalOlapScan[promotion] apply RFs: RF7 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 ss_sold_date_sk->[d_date_sk] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) --------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF6 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((store.s_gmt_offset = -7.00)) ----------------------------------------------------PhysicalOlapScan[store] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecReplicated] ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF4 c_current_addr_sk->[ca_address_sk] ----------------------PhysicalProject ------------------------filter((customer_address.ca_gmt_offset = -7.00)) --------------------------PhysicalOlapScan[customer_address] apply RFs: RF4 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 ss_item_sk->[i_item_sk] --------------------------PhysicalProject ----------------------------filter((item.i_category = 'Jewelry')) ------------------------------PhysicalOlapScan[item] apply RFs: RF3 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 ss_sold_date_sk->[d_date_sk] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) ------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF2 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 ss_customer_sk->[c_customer_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter((store.s_gmt_offset = -7.00)) ------------------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query62.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query62.out index 62ef4fdabe..ee40a79bf9 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query62.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query62.out @@ -2,10 +2,10 @@ -- !ds_shape_62 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() @@ -15,17 +15,17 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_ship_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_month_seq <= 1205) and (date_dim.d_month_seq >= 1194)) --------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_site] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[ship_mode] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[warehouse] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query63.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query63.out index 7787aca403..090b07328a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query63.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query63.out @@ -2,16 +2,16 @@ -- !ds_shape_63 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000)) ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() @@ -21,15 +21,15 @@ PhysicalResultSink ------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((((i_category IN ('Books', 'Children', 'Electronics') AND i_class IN ('personal', 'portable', 'reference', 'self-help')) AND i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')) OR ((i_category IN ('Men', 'Music', 'Women') AND i_class IN ('accessories', 'classical', 'fragrances', 'pants')) AND i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')))) --------------------------------------------PhysicalOlapScan[item] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter(d_month_seq IN (1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192)) ----------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query64.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query64.out index 5f9a7063a8..f7fa3929c9 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query64.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query64.out @@ -4,7 +4,7 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) --PhysicalCteProducer ( cteId=CTEId#1 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((customer.c_first_shipto_date_sk = d3.d_date_sk)) otherCondition=() @@ -12,50 +12,50 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) ------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_first_sales_date_sk = d2.d_date_sk)) otherCondition=() --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=(( not (cd_marital_status = cd_marital_status))) build RFs:RF17 ss_customer_sk->[c_customer_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = ad2.ca_address_sk)) otherCondition=() -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_hdemo_sk = hd2.hd_demo_sk)) otherCondition=() ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[customer] apply RFs: RF17 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((hd2.hd_income_band_sk = ib2.ib_income_band_sk)) otherCondition=() ------------------------------------------------PhysicalProject --------------------------------------------------PhysicalOlapScan[household_demographics] -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------PhysicalProject ----------------------------------------------------PhysicalOlapScan[income_band] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[customer_demographics] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer_address] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF11 ss_item_sk->[sr_item_sk];RF12 ss_ticket_number->[sr_ticket_number] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_returns] apply RFs: RF11 RF12 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF9 ss_cdemo_sk->[cd_demo_sk] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF9 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = ad1.ca_address_sk)) otherCondition=() build RFs:RF8 ss_addr_sk->[ca_address_sk] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF8 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[ss_item_sk] --------------------------------------------------PhysicalProject ----------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() @@ -69,11 +69,11 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) --------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[ss_item_sk] ----------------------------------------------------------------------PhysicalProject ------------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 RF7 -----------------------------------------------------------------------PhysicalDistribute +----------------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------------------------------PhysicalProject --------------------------------------------------------------------------filter((sale > (2 * refund))) ----------------------------------------------------------------------------hashAgg[GLOBAL] -------------------------------------------------------------------------------PhysicalDistribute +------------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------------------------------------------hashAgg[LOCAL] ----------------------------------------------------------------------------------PhysicalProject ------------------------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF0 cr_order_number->[cs_order_number];RF1 cr_item_sk->[cs_item_sk] @@ -81,43 +81,43 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) ----------------------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 --------------------------------------------------------------------------------------PhysicalProject ----------------------------------------------------------------------------------------PhysicalOlapScan[catalog_returns] -------------------------------------------------------------------PhysicalDistribute +------------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------------------------PhysicalProject ----------------------------------------------------------------------filter(d_year IN (2001, 2002)) ------------------------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------------------------------PhysicalDistribute +--------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------------------------PhysicalProject ------------------------------------------------------------------PhysicalOlapScan[household_demographics] -----------------------------------------------------------PhysicalDistribute +----------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------------------PhysicalProject --------------------------------------------------------------PhysicalOlapScan[income_band] -------------------------------------------------------PhysicalDistribute +------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------------PhysicalProject ----------------------------------------------------------PhysicalOlapScan[store] ---------------------------------------------------PhysicalDistribute +--------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------------PhysicalProject ------------------------------------------------------filter((item.i_current_price <= 33.00) and (item.i_current_price >= 24.00) and i_color IN ('blanched', 'brown', 'burlywood', 'chocolate', 'drab', 'medium')) --------------------------------------------------------PhysicalOlapScan[item] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[promotion] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((cs1.item_sk = cs2.item_sk) and (cs1.store_name = cs2.store_name) and (cs1.store_zip = cs2.store_zip)) otherCondition=((cs2.cnt <= cs1.cnt)) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((cs1.syear = 2001)) --------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((cs2.syear = 2002)) --------------------PhysicalCteConsumer ( cteId=CTEId#1 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query65.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query65.out index 26cedb18d1..ffa6e0821b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query65.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query65.out @@ -2,45 +2,45 @@ -- !ds_shape_65 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=() ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=() -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashJoin[INNER_JOIN] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DOUBLE) <= cast((0.1 * ave) as DOUBLE))) build RFs:RF2 ss_store_sk->[ss_store_sk] --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) ------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) ----------------------------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[item] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalProject ----------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query66.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query66.out index 2a5301871a..22bb067cd5 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query66.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query66.out @@ -2,15 +2,15 @@ -- !ds_shape_66 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() @@ -21,24 +21,24 @@ PhysicalResultSink ------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF0 sm_ship_mode_sk->[ws_ship_mode_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter(sm_carrier IN ('GREAT EASTERN', 'LATVIAN')) --------------------------------------------PhysicalOlapScan[ship_mode] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_year = 1998)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((cast(t_time as BIGINT) <= 77621) and (time_dim.t_time >= 48821)) --------------------------------------PhysicalOlapScan[time_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[warehouse] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF7 w_warehouse_sk->[cs_warehouse_sk] @@ -49,19 +49,19 @@ PhysicalResultSink ------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF4 sm_ship_mode_sk->[cs_ship_mode_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 RF6 RF7 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter(sm_carrier IN ('GREAT EASTERN', 'LATVIAN')) --------------------------------------------PhysicalOlapScan[ship_mode] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_year = 1998)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((cast(t_time as BIGINT) <= 77621) and (time_dim.t_time >= 48821)) --------------------------------------PhysicalOlapScan[time_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[warehouse] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query67.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query67.out index 66d43c102e..bd3f6458a3 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query67.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query67.out @@ -2,16 +2,16 @@ -- !ds_shape_67 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------filter((rk <= 100)) ----------PhysicalWindow ------------PhysicalPartitionTopN ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalPartitionTopN ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalRepeat ----------------------------PhysicalProject @@ -21,14 +21,14 @@ PhysicalResultSink ------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_month_seq <= 1217) and (date_dim.d_month_seq >= 1206)) --------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[item] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query68.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query68.out index 129724a5e4..8683dd548f 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query68.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query68.out @@ -2,26 +2,26 @@ -- !ds_shape_68 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) build RFs:RF5 c_current_addr_sk->[ca_address_sk] ------------PhysicalProject --------------PhysicalOlapScan[customer_address] apply RFs: RF5 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[customer] apply RFs: RF4 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ss_addr_sk->[ca_address_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] ----------------------------------PhysicalProject @@ -30,15 +30,15 @@ PhysicalResultSink ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter((date_dim.d_dom <= 2) and (date_dim.d_dom >= 1) and d_year IN (1998, 1999, 2000)) ------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter(s_city IN ('Five Points', 'Pleasant Hill')) --------------------------------------------PhysicalOlapScan[store] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter(((household_demographics.hd_dep_count = 8) OR (household_demographics.hd_vehicle_count = -1))) ----------------------------------------PhysicalOlapScan[household_demographics] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query69.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query69.out index 8d090b2347..a04010cc8f 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query69.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query69.out @@ -3,54 +3,54 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF7 c_customer_sk->[ss_customer_sk] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000)) --------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject ----------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[cs_ship_customer_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000)) ------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF3 c_current_cdemo_sk->[cd_demo_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF3 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ws_bill_customer_sk] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000)) --------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter(ca_state IN ('MI', 'TX', 'VA')) ------------------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query7.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query7.out index d7b746ed2d..e5bbc4df3d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query7.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query7.out @@ -2,14 +2,14 @@ -- !ds_shape_7 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF2 p_promo_sk->[ss_promo_sk] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] @@ -17,19 +17,19 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((customer_demographics.cd_education_status = 'College') and (customer_demographics.cd_gender = 'F') and (customer_demographics.cd_marital_status = 'W')) ------------------------------------PhysicalOlapScan[customer_demographics] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_year = 2001)) --------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter(((promotion.p_channel_email = 'N') OR (promotion.p_channel_event = 'N'))) ----------------------------PhysicalOlapScan[promotion] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query70.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query70.out index 05ce7c5c43..d9995e7762 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query70.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query70.out @@ -3,15 +3,15 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalRepeat ----------------------------PhysicalProject @@ -20,35 +20,35 @@ PhysicalResultSink ----------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((d1.d_month_seq <= 1224) and (d1.d_month_seq >= 1213)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((store.s_state = tmp1.s_state)) otherCondition=() build RFs:RF2 s_state->[s_state] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store] apply RFs: RF2 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((ranking <= 5)) ------------------------------------------PhysicalWindow --------------------------------------------PhysicalPartitionTopN -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------PhysicalPartitionTopN --------------------------------------------------PhysicalProject ----------------------------------------------------hashAgg[GLOBAL] -------------------------------------------------------PhysicalDistribute +------------------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------------------hashAgg[LOCAL] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() --------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------------------------------PhysicalProject ------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 -----------------------------------------------------------------PhysicalDistribute +----------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------------------------PhysicalProject --------------------------------------------------------------------filter((date_dim.d_month_seq <= 1224) and (date_dim.d_month_seq >= 1213)) ----------------------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------------------------------PhysicalDistribute +--------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------------------------PhysicalProject ------------------------------------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query71.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query71.out index 99e1f5621a..536aef9335 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query71.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query71.out @@ -2,50 +2,50 @@ -- !ds_shape_71 -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((tmp.time_sk = time_dim.t_time_sk)) otherCondition=() ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((tmp.sold_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ws_item_sk,cs_item_sk,ss_item_sk] --------------------------PhysicalUnion -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF3 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1998)) ----------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF3 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1998)) ----------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1998)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((item.i_manager_id = 1)) --------------------------------PhysicalOlapScan[item] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter(t_meal_time IN ('breakfast', 'dinner')) --------------------------PhysicalOlapScan[time_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query72.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query72.out index 9f007e62aa..92933fa585 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query72.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query72.out @@ -2,63 +2,63 @@ -- !ds_shape_72 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((catalog_returns.cr_item_sk = catalog_sales.cs_item_sk) and (catalog_returns.cr_order_number = catalog_sales.cs_order_number)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((warehouse.w_warehouse_sk = inventory.inv_warehouse_sk)) otherCondition=() ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = inventory.inv_item_sk) and (inventory.inv_date_sk = d2.d_date_sk)) otherCondition=((inventory.inv_quantity_on_hand < catalog_sales.cs_quantity)) build RFs:RF6 d_date_sk->[inv_date_sk];RF7 cs_item_sk->[inv_item_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalOlapScan[inventory] apply RFs: RF6 RF7 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_week_seq = d2.d_week_seq)) otherCondition=() ----------------------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_ship_date_sk = d3.d_date_sk)) otherCondition=((d3.d_date > days_add(d_date, INTERVAL 5 DAY))) ----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF2 cd_demo_sk->[cs_bill_cdemo_sk] -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ----------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF0 hd_demo_sk->[cs_bill_hdemo_sk] ------------------------------------------------------PhysicalProject --------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 -------------------------------------------------------PhysicalDistribute +------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------------PhysicalProject ----------------------------------------------------------filter((household_demographics.hd_buy_potential = '501-1000')) ------------------------------------------------------------PhysicalOlapScan[household_demographics] -----------------------------------------------------PhysicalDistribute +----------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------------PhysicalProject --------------------------------------------------------filter((d1.d_year = 2002)) ----------------------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((customer_demographics.cd_marital_status = 'W')) ------------------------------------------------------PhysicalOlapScan[customer_demographics] -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[item] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[promotion] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[warehouse] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[catalog_returns] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query73.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query73.out index 8ab062bf77..77c0f30866 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query73.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query73.out @@ -2,16 +2,16 @@ -- !ds_shape_73 -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((dj.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk] ------------PhysicalProject --------------PhysicalOlapScan[customer] apply RFs: RF3 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------filter((dj.cnt <= 5) and (dj.cnt >= 1)) ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------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] @@ -20,15 +20,15 @@ PhysicalResultSink ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_dom <= 2) and (date_dim.d_dom >= 1) and d_year IN (2000, 2001, 2002)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1) and hd_buy_potential IN ('501-1000', 'Unknown')) ----------------------------------PhysicalOlapScan[household_demographics] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(s_county IN ('Barrow County', 'Daviess County', 'Fairfield County', 'Walker County')) --------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query74.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query74.out index 6961a52420..4e12ffe982 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query74.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query74.out @@ -4,57 +4,57 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((PULL_UP_UNIFIED_OUTPUT_ALIAS = customer.c_customer_sk)) otherCondition=() ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalUnion --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000)) --------------------------------PhysicalOlapScan[date_dim] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000)) --------------------------------PhysicalOlapScan[date_dim] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[customer] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=((if((year_total > 0), (year_total / year_total), NULL) > if((year_total > 0), (year_total / year_total), NULL))) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year = 1999) and (t_w_firstyear.year_total > 0)) --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=() ----------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((t_s_firstyear.sale_type = 's') and (t_s_firstyear.year = 1999) and (t_s_firstyear.year_total > 0)) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((t_s_secyear.sale_type = 's') and (t_s_secyear.year = 2000)) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000)) ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query75.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query75.out index 6bf1c9b168..154e525aa5 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query75.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query75.out @@ -3,13 +3,13 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalUnion -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------PhysicalProject ----------------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF2 cs_order_number->[cr_order_number];RF3 cs_item_sk->[cr_item_sk] ------------------------PhysicalProject @@ -20,15 +20,15 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Home')) --------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter(d_year IN (1998, 1999)) ----------------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------PhysicalProject ----------------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF6 ss_ticket_number->[sr_ticket_number];RF7 ss_item_sk->[sr_item_sk] ------------------------PhysicalProject @@ -39,15 +39,15 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Home')) --------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter(d_year IN (1998, 1999)) ----------------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------PhysicalProject ----------------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF10 ws_order_number->[wr_order_number];RF11 ws_item_sk->[wr_item_sk] ------------------------PhysicalProject @@ -58,24 +58,24 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF8 i_item_sk->[ws_item_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Home')) --------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter(d_year IN (1998, 1999)) ----------------------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((curr_yr.i_brand_id = prev_yr.i_brand_id) and (curr_yr.i_category_id = prev_yr.i_category_id) and (curr_yr.i_class_id = prev_yr.i_class_id) and (curr_yr.i_manufact_id = prev_yr.i_manufact_id)) otherCondition=(((cast(cast(sales_cnt as DECIMALV3(17, 2)) as DECIMALV3(23, 8)) / cast(sales_cnt as DECIMALV3(17, 2))) < 0.900000)) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------filter((curr_yr.d_year = 1999)) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------filter((prev_yr.d_year = 1998)) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query76.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query76.out index 00c4bba1df..bbb934bf88 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query76.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query76.out @@ -2,48 +2,48 @@ -- !ds_shape_76 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 ss_item_sk->[i_item_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] apply RFs: RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 ss_sold_date_sk->[d_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(ss_hdemo_sk IS NULL) --------------------------------PhysicalOlapScan[store_sales] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 ws_item_sk->[i_item_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] apply RFs: RF3 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 ws_sold_date_sk->[d_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[date_dim] apply RFs: RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(ws_bill_addr_sk IS NULL) --------------------------------PhysicalOlapScan[web_sales] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF5 cs_item_sk->[i_item_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] apply RFs: RF5 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 cs_sold_date_sk->[d_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(cs_warehouse_sk IS NULL) --------------------------------PhysicalOlapScan[catalog_sales] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query77.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query77.out index abe938dcd8..1ac424b09c 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query77.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query77.out @@ -2,11 +2,11 @@ -- !ds_shape_77 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalUnion @@ -14,7 +14,7 @@ PhysicalResultSink ----------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((ss.s_store_sk = sr.s_store_sk)) otherCondition=() ------------------------PhysicalProject --------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() @@ -22,16 +22,16 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ----------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store] ------------------------PhysicalProject --------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_store_sk = store.s_store_sk)) otherCondition=() @@ -39,37 +39,37 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ----------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store] --------------------PhysicalProject ----------------------NestedLoopJoin[CROSS_JOIN] ------------------------PhysicalProject --------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ------------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------hashAgg[GLOBAL] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashAgg[LOCAL] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cr_returned_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) --------------------------------------------PhysicalOlapScan[date_dim] @@ -77,7 +77,7 @@ PhysicalResultSink ----------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((ws.wp_web_page_sk = wr.wp_web_page_sk)) otherCondition=() ------------------------PhysicalProject --------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF9 wp_web_page_sk->[ws_web_page_sk] @@ -85,27 +85,27 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ----------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_page] ------------------------PhysicalProject --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF7 wp_web_page_sk->[wr_web_page_sk] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[wr_returned_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 RF7 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) --------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_page] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query78.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query78.out index 730493d316..a12f6215a0 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query78.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query78.out @@ -2,7 +2,7 @@ -- !ds_shape_78 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------filter(((coalesce(ws_qty, 0) > 0) OR (coalesce(cs_qty, 0) > 0))) @@ -11,14 +11,14 @@ PhysicalResultSink ----------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((ws.ws_customer_sk = ss.ss_customer_sk) and (ws.ws_item_sk = ss.ss_item_sk) and (ws.ws_sold_year = ss.ss_sold_year)) otherCondition=() ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((store_returns.sr_ticket_number = store_sales.ss_ticket_number) and (store_sales.ss_item_sk = store_returns.sr_item_sk)) otherCondition=() ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] @@ -26,14 +26,14 @@ PhysicalResultSink --------------------------------PhysicalOlapScan[store_returns] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((web_returns.wr_order_number = web_sales.ws_order_number) and (web_sales.ws_item_sk = web_returns.wr_item_sk)) otherCondition=() ------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] @@ -41,14 +41,14 @@ PhysicalResultSink --------------------------------PhysicalOlapScan[web_returns] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((catalog_returns.cr_order_number = catalog_sales.cs_order_number) and (catalog_sales.cs_item_sk = catalog_returns.cr_item_sk)) otherCondition=() --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_year = 2000)) ----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query79.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query79.out index 2487900aac..61d1db9cb0 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query79.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query79.out @@ -2,14 +2,14 @@ -- !ds_shape_79 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((ms.ss_customer_sk = customer.c_customer_sk)) otherCondition=() -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------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] @@ -18,19 +18,19 @@ PhysicalResultSink ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_dow = 1) and d_year IN (1998, 1999, 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter(((household_demographics.hd_dep_count = 5) OR (household_demographics.hd_vehicle_count > 4))) ----------------------------------PhysicalOlapScan[household_demographics] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((store.s_number_employees <= 295) and (store.s_number_employees >= 200)) --------------------------------PhysicalOlapScan[store] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query8.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query8.out index 192541e875..8cc8346be1 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query8.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query8.out @@ -2,10 +2,10 @@ -- !ds_shape_8 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((expr_substring(s_zip, 1, 2) = expr_substring(ca_zip, 1, 2))) otherCondition=() @@ -15,31 +15,31 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_qoy = 2) and (date_dim.d_year = 1998)) --------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalIntersect -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) ------------------------------PhysicalOlapScan[customer_address] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter((cnt > 10)) ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 c_current_addr_sk->[ca_address_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF0 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------filter((customer.c_preferred_cust_flag = 'Y')) ----------------------------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query80.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query80.out index 46e33bda9b..3764d69438 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query80.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query80.out @@ -2,17 +2,17 @@ -- !ds_shape_80 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalUnion --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF4 ss_item_sk->[sr_item_sk];RF5 ss_ticket_number->[sr_ticket_number] @@ -26,24 +26,24 @@ PhysicalResultSink ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalProject ------------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) --------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter((item.i_current_price > 50.00)) ------------------------------------------------PhysicalOlapScan[item] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((promotion.p_channel_tv = 'N')) --------------------------------------------PhysicalOlapScan[promotion] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_catalog_page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() build RFs:RF11 cp_catalog_page_sk->[cs_catalog_page_sk] @@ -57,24 +57,24 @@ PhysicalResultSink ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[cs_sold_date_sk] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF6 RF7 RF8 RF11 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalProject ------------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) --------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter((item.i_current_price > 50.00)) ------------------------------------------------PhysicalOlapScan[item] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((promotion.p_channel_tv = 'N')) --------------------------------------------PhysicalOlapScan[promotion] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[catalog_page] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF16 ws_item_sk->[wr_item_sk];RF17 ws_order_number->[wr_order_number] @@ -88,19 +88,19 @@ PhysicalResultSink ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF12 d_date_sk->[ws_sold_date_sk] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF12 RF13 RF14 RF15 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalProject ------------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) --------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter((item.i_current_price > 50.00)) ------------------------------------------------PhysicalOlapScan[item] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((promotion.p_channel_tv = 'N')) --------------------------------------------PhysicalOlapScan[promotion] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query81.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query81.out index cc30cbb826..a684a664a3 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query81.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query81.out @@ -4,46 +4,46 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cr_returned_date_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF0 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_year = 2002)) ----------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[customer_address] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE))) --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ctr_customer_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[c_current_addr_sk] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer] apply RFs: RF2 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((customer_address.ca_state = 'CA')) ----------------------------PhysicalOlapScan[customer_address] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------------PhysicalProject --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query82.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query82.out index 1e05dc2e4c..83dc77f244 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query82.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query82.out @@ -2,16 +2,16 @@ -- !ds_shape_82 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] ------------------PhysicalProject --------------------PhysicalOlapScan[store_sales] apply RFs: RF2 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] ------------------------PhysicalProject @@ -19,11 +19,11 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------filter((inventory.inv_quantity_on_hand <= 500) and (inventory.inv_quantity_on_hand >= 100)) --------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((item.i_current_price <= 47.00) and (item.i_current_price >= 17.00) and i_manufact_id IN (138, 169, 339, 639)) ----------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_date <= '1999-09-07') and (date_dim.d_date >= '1999-07-09')) ------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query83.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query83.out index 0ab5a380ee..a9962b09d3 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query83.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query83.out @@ -3,87 +3,87 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((sr_items.item_id = cr_items.item_id)) otherCondition=() build RFs:RF13 item_id->[i_item_id] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF12 cr_item_sk->[i_item_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[item] apply RFs: RF12 RF13 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[cr_returned_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF11 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF10 d_date->[d_date] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF10 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF9 d_week_seq->[d_week_seq] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) ------------------------------------------------PhysicalOlapScan[date_dim] --------------hashJoin[INNER_JOIN] hashCondition=((sr_items.item_id = wr_items.item_id)) otherCondition=() build RFs:RF8 item_id->[i_item_id] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[sr_item_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[sr_returned_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 RF7 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalProject ------------------------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) --------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[item] apply RFs: RF8 ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 wr_item_sk->[i_item_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[item] apply RFs: RF3 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[wr_returned_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[web_returns] apply RFs: RF2 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalProject ------------------------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) --------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query84.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query84.out index 113c710131..5bb63bd26a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query84.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query84.out @@ -2,33 +2,33 @@ -- !ds_shape_84 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF4 cd_demo_sk->[sr_cdemo_sk] ------------PhysicalProject --------------PhysicalOlapScan[store_returns] apply RFs: RF4 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF3 c_current_cdemo_sk->[cd_demo_sk] ------------------PhysicalProject --------------------PhysicalOlapScan[customer_demographics] apply RFs: RF3 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[c_current_hdemo_sk] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer] apply RFs: RF1 RF2 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((customer_address.ca_city = 'Oakwood')) ----------------------------------PhysicalOlapScan[customer_address] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------hashJoin[INNER_JOIN] hashCondition=((income_band.ib_income_band_sk = household_demographics.hd_income_band_sk)) otherCondition=() build RFs:RF0 ib_income_band_sk->[hd_income_band_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((cast(ib_upper_bound as BIGINT) <= 55806) and (income_band.ib_lower_bound >= 5806)) ----------------------------------PhysicalOlapScan[income_band] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query85.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query85.out index a79804a81d..c6f76a0e6b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query85.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query85.out @@ -2,11 +2,11 @@ -- !ds_shape_85 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((reason.r_reason_sk = web_returns.wr_reason_sk)) otherCondition=() @@ -16,13 +16,13 @@ PhysicalResultSink --------------------------hashJoin[INNER_JOIN] hashCondition=((cd1.cd_education_status = cd2.cd_education_status) and (cd1.cd_marital_status = cd2.cd_marital_status) and (cd2.cd_demo_sk = web_returns.wr_returning_cdemo_sk)) otherCondition=() build RFs:RF5 cd_marital_status->[cd_marital_status];RF6 cd_education_status->[cd_education_status];RF7 wr_returning_cdemo_sk->[cd_demo_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF5 RF6 RF7 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk)) otherCondition=((((((cd1.cd_marital_status = 'M') AND (cd1.cd_education_status = '4 yr Degree')) AND ((web_sales.ws_sales_price >= 100.00) AND (web_sales.ws_sales_price <= 150.00))) OR (((cd1.cd_marital_status = 'S') AND (cd1.cd_education_status = 'Secondary')) AND ((web_sales.ws_sales_price >= 50.00) AND (web_sales.ws_sales_price <= 100.00)))) OR (((cd1.cd_marital_status = 'W') AND (cd1.cd_education_status = 'Advanced Degree')) AND ((web_sales.ws_sales_price >= 150.00) AND (web_sales.ws_sales_price <= 200.00))))) build RFs:RF4 wr_refunded_cdemo_sk->[cd_demo_sk] ----------------------------------PhysicalProject ------------------------------------filter(((((cd1.cd_marital_status = 'M') AND (cd1.cd_education_status = '4 yr Degree')) OR ((cd1.cd_marital_status = 'S') AND (cd1.cd_education_status = 'Secondary'))) OR ((cd1.cd_marital_status = 'W') AND (cd1.cd_education_status = 'Advanced Degree')))) --------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF4 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = web_returns.wr_refunded_addr_sk)) otherCondition=((((ca_state IN ('DE', 'FL', 'TX') AND ((web_sales.ws_net_profit >= 100.00) AND (web_sales.ws_net_profit <= 200.00))) OR (ca_state IN ('ID', 'IN', 'ND') AND ((web_sales.ws_net_profit >= 150.00) AND (web_sales.ws_net_profit <= 300.00)))) OR (ca_state IN ('IL', 'MT', 'OH') AND ((web_sales.ws_net_profit >= 50.00) AND (web_sales.ws_net_profit <= 250.00))))) build RFs:RF3 ca_address_sk->[wr_refunded_addr_sk] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF1 ws_item_sk->[wr_item_sk];RF2 ws_order_number->[wr_order_number] @@ -32,18 +32,18 @@ PhysicalResultSink --------------------------------------------PhysicalProject ----------------------------------------------filter((web_sales.ws_net_profit <= 300.00) and (web_sales.ws_net_profit >= 50.00) and (web_sales.ws_sales_price <= 200.00) and (web_sales.ws_sales_price >= 50.00)) ------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalProject ------------------------------------------------filter((date_dim.d_year = 2000)) --------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter(((ca_state IN ('DE', 'FL', 'TX') OR ca_state IN ('ID', 'IN', 'ND')) OR ca_state IN ('IL', 'MT', 'OH')) and (customer_address.ca_country = 'United States')) --------------------------------------------PhysicalOlapScan[customer_address] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_page] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[reason] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query86.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query86.out index 7867bb396e..7dcb8c35fb 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query86.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query86.out @@ -3,29 +3,29 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalRepeat ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((d1.d_month_seq <= 1235) and (d1.d_month_seq >= 1224)) --------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query87.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query87.out index 81331316f7..4ed67c2332 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query87.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query87.out @@ -2,62 +2,62 @@ -- !ds_shape_87 -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------PhysicalExcept ------------PhysicalProject --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) ------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[customer] ------------PhysicalProject --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) ------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[customer] ------------PhysicalProject --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) ------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[customer] 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 71b7c40ab2..9225360005 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 @@ -10,7 +10,7 @@ PhysicalResultSink --------------NestedLoopJoin[CROSS_JOIN] ----------------NestedLoopJoin[CROSS_JOIN] ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------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] @@ -19,21 +19,21 @@ PhysicalResultSink --------------------------------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 +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) ----------------------------------------PhysicalOlapScan[time_dim] ---------------------------------PhysicalDistribute +--------------------------------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 +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((store.s_store_name = 'ese')) ----------------------------------PhysicalOlapScan[store] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------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] @@ -42,21 +42,21 @@ PhysicalResultSink ----------------------------------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 +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute < 30)) ------------------------------------------PhysicalOlapScan[time_dim] -----------------------------------PhysicalDistribute +----------------------------------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 +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((store.s_store_name = 'ese')) ------------------------------------PhysicalOlapScan[store] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------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] @@ -65,21 +65,21 @@ PhysicalResultSink --------------------------------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: RF15 RF16 RF17 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute >= 30)) ----------------------------------------PhysicalOlapScan[time_dim] ---------------------------------PhysicalDistribute +--------------------------------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 +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((store.s_store_name = 'ese')) ----------------------------------PhysicalOlapScan[store] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------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] @@ -88,21 +88,21 @@ PhysicalResultSink ------------------------------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: RF12 RF13 RF14 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute < 30)) --------------------------------------PhysicalOlapScan[time_dim] -------------------------------PhysicalDistribute +------------------------------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 +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((store.s_store_name = 'ese')) --------------------------------PhysicalOlapScan[store] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------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] @@ -111,21 +111,21 @@ PhysicalResultSink ----------------------------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: RF9 RF10 RF11 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute >= 30)) ------------------------------------PhysicalOlapScan[time_dim] -----------------------------PhysicalDistribute +----------------------------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 +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((store.s_store_name = 'ese')) ------------------------------PhysicalOlapScan[store] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecReplicated] ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------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] @@ -134,21 +134,21 @@ PhysicalResultSink --------------------------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: RF6 RF7 RF8 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute < 30)) ----------------------------------PhysicalOlapScan[time_dim] ---------------------------PhysicalDistribute +--------------------------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 +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((store.s_store_name = 'ese')) ----------------------------PhysicalOlapScan[store] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------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] @@ -157,21 +157,21 @@ PhysicalResultSink ------------------------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: RF3 RF4 RF5 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute >= 30)) --------------------------------PhysicalOlapScan[time_dim] -------------------------PhysicalDistribute +------------------------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 +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((store.s_store_name = 'ese')) --------------------------PhysicalOlapScan[store] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecReplicated] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------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] @@ -180,15 +180,15 @@ PhysicalResultSink ----------------------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 +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((time_dim.t_hour = 12) and (time_dim.t_minute < 30)) ------------------------------PhysicalOlapScan[time_dim] -----------------------PhysicalDistribute +----------------------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 +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((store.s_store_name = 'ese')) ------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query89.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query89.out index 94d35b4873..db864c472b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query89.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query89.out @@ -3,16 +3,16 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------filter((if(( not (avg_monthly_sales = 0.0000)), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000)) --------------PhysicalWindow ----------------PhysicalQuickSort[LOCAL_SORT] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() @@ -22,15 +22,15 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter(((i_category IN ('Electronics', 'Jewelry', 'Shoes') AND i_class IN ('athletic', 'portable', 'semi-precious')) OR (i_category IN ('Men', 'Music', 'Women') AND i_class IN ('accessories', 'maternity', 'rock')))) ----------------------------------------------PhysicalOlapScan[item] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_year = 1999)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query9.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query9.out index 5b3610bc2e..6f64f57ee2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query9.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query9.out @@ -1,7 +1,7 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_9 -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------NestedLoopJoin[CROSS_JOIN] --------NestedLoopJoin[CROSS_JOIN] @@ -22,122 +22,122 @@ PhysicalResultSink --------------------------------------PhysicalProject ----------------------------------------filter((reason.r_reason_sk = 1)) ------------------------------------------PhysicalOlapScan[reason] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalAssertNumRows ------------------------------------------hashAgg[GLOBAL] ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------------hashAgg[LOCAL] ------------------------------------------------PhysicalProject --------------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ----------------------------------------------------PhysicalOlapScan[store_sales] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalAssertNumRows --------------------------------------hashAgg[GLOBAL] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------------hashAgg[LOCAL] --------------------------------------------PhysicalProject ----------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ------------------------------------------------PhysicalOlapScan[store_sales] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalAssertNumRows ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ----------------------------------------------PhysicalOlapScan[store_sales] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalAssertNumRows ----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------hashAgg[LOCAL] ----------------------------------------PhysicalProject ------------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21)) --------------------------------------------PhysicalOlapScan[store_sales] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalAssertNumRows --------------------------------hashAgg[GLOBAL] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------hashAgg[LOCAL] --------------------------------------PhysicalProject ----------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21)) ------------------------------------------PhysicalOlapScan[store_sales] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalAssertNumRows ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21)) ----------------------------------------PhysicalOlapScan[store_sales] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalAssertNumRows ----------------------------hashAgg[GLOBAL] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------hashAgg[LOCAL] ----------------------------------PhysicalProject ------------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41)) --------------------------------------PhysicalOlapScan[store_sales] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalAssertNumRows --------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject ----------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41)) ------------------------------------PhysicalOlapScan[store_sales] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalAssertNumRows ------------------------hashAgg[GLOBAL] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject --------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41)) ----------------------------------PhysicalOlapScan[store_sales] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalAssertNumRows ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecGather] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61)) --------------------------------PhysicalOlapScan[store_sales] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalAssertNumRows --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecGather] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61)) ------------------------------PhysicalOlapScan[store_sales] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------PhysicalAssertNumRows ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecGather] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61)) ----------------------------PhysicalOlapScan[store_sales] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalAssertNumRows ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecGather] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) --------------------------PhysicalOlapScan[store_sales] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecReplicated] ------------PhysicalAssertNumRows --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecGather] ------------------hashAgg[LOCAL] --------------------PhysicalProject ----------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) ------------------------PhysicalOlapScan[store_sales] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalAssertNumRows ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) 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 7f18c83f83..b74a499038 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 @@ -6,7 +6,7 @@ PhysicalResultSink ------PhysicalProject --------NestedLoopJoin[CROSS_JOIN] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF5 hd_demo_sk->[ws_ship_hdemo_sk] @@ -15,21 +15,21 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] 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] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) --------------------------------PhysicalOlapScan[web_page] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((time_dim.t_hour <= 11) and (time_dim.t_hour >= 10)) ------------------------------PhysicalOlapScan[time_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((household_demographics.hd_dep_count = 2)) --------------------------PhysicalOlapScan[household_demographics] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecReplicated] ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ws_ship_hdemo_sk] @@ -38,15 +38,15 @@ PhysicalResultSink --------------------------hashJoin[INNER_JOIN] 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] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) ----------------------------------PhysicalOlapScan[web_page] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((time_dim.t_hour <= 17) and (time_dim.t_hour >= 16)) --------------------------------PhysicalOlapScan[time_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((household_demographics.hd_dep_count = 2)) ----------------------------PhysicalOlapScan[household_demographics] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query91.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query91.out index 093e912db1..bb07b407f2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query91.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query91.out @@ -2,46 +2,46 @@ -- !ds_shape_91 -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF5 c_current_addr_sk->[ca_address_sk] --------------------PhysicalProject ----------------------filter((customer_address.ca_gmt_offset = -6.00)) ------------------------PhysicalOlapScan[customer_address] apply RFs: RF5 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returning_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cr_returning_customer_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cr_returned_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 RF3 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001)) ------------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashJoin[INNER_JOIN] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[c_current_hdemo_sk] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[c_current_cdemo_sk] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF1 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------filter((((customer_demographics.cd_marital_status = 'M') AND (customer_demographics.cd_education_status = 'Unknown')) OR ((customer_demographics.cd_marital_status = 'W') AND (customer_demographics.cd_education_status = 'Advanced Degree')))) ------------------------------------------PhysicalOlapScan[customer_demographics] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((hd_buy_potential like '1001-5000%')) ----------------------------------------PhysicalOlapScan[household_demographics] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[call_center] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query92.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query92.out index cb095c4426..03fe8c943d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query92.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query92.out @@ -4,24 +4,24 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalProject --------------filter((cast(ws_ext_discount_amt as DECIMALV3(38, 5)) > (1.3 * avg(cast(ws_ext_discount_amt as DECIMALV3(9, 4))) OVER(PARTITION BY i_item_sk)))) ----------------PhysicalWindow ------------------PhysicalQuickSort[LOCAL_SORT] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((item.i_manufact_id = 320)) ------------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '2002-05-27') and (date_dim.d_date >= '2002-02-26')) --------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query93.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query93.out index a94e70c914..e3e4a1f5b8 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query93.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query93.out @@ -2,10 +2,10 @@ -- !ds_shape_93 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_item_sk = store_sales.ss_item_sk) and (store_returns.sr_ticket_number = store_sales.ss_ticket_number)) otherCondition=() build RFs:RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] @@ -14,7 +14,7 @@ PhysicalResultSink ------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_reason_sk = reason.r_reason_sk)) otherCondition=() build RFs:RF0 r_reason_sk->[sr_reason_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[store_returns] apply RFs: RF0 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((reason.r_reason_desc = 'duplicate purchase')) --------------------------PhysicalOlapScan[reason] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query94.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query94.out index 4c4f311c28..05fda5a654 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query94.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query94.out @@ -4,34 +4,34 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] ------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[DISTINCT_LOCAL] ------------hashAgg[GLOBAL] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF4 ws_order_number->[ws_order_number] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 --------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() build RFs:RF3 ws_order_number->[wr_order_number] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[web_returns] apply RFs: RF3 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_sk] --------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_ship_date_sk] ----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((customer_address.ca_state = 'OK')) ------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) ----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((web_site.web_company_name = 'pri')) --------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query95.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query95.out index acee79a67e..4973a40f07 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query95.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query95.out @@ -4,17 +4,17 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF6 RF7 ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[DISTINCT_GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecGather] ------------hashAgg[DISTINCT_LOCAL] --------------hashAgg[GLOBAL] ----------------hashAgg[LOCAL] @@ -22,31 +22,31 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF5 wr_order_number->[ws_order_number];RF7 wr_order_number->[ws_order_number,ws_order_number] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[web_returns] ----------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF4 ws_order_number->[ws_order_number];RF6 ws_order_number->[ws_order_number,ws_order_number] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] ----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_ship_date_sk] ------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((customer_address.ca_state = 'NC')) --------------------------------------PhysicalOlapScan[customer_address] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) ------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((web_site.web_company_name = 'pri')) ----------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query96.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query96.out index daf0b67a0e..4f48a46df2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query96.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query96.out @@ -4,7 +4,7 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------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] @@ -13,15 +13,15 @@ PhysicalResultSink --------------------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 +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) ----------------------------PhysicalOlapScan[time_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((household_demographics.hd_dep_count = 3)) --------------------------PhysicalOlapScan[household_demographics] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((store.s_store_name = 'ese')) ----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query97.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query97.out index 7b8832c172..c8dd9bf8bd 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query97.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query97.out @@ -4,31 +4,31 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[FULL_OUTER_JOIN] hashCondition=((ssci.customer_sk = csci.customer_sk) and (ssci.item_sk = csci.item_sk)) otherCondition=() ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_month_seq <= 1225) and (date_dim.d_month_seq >= 1214)) ----------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_month_seq <= 1225) and (date_dim.d_month_seq >= 1214)) ----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query98.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query98.out index d75c1d9409..1d4c4a216c 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query98.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query98.out @@ -2,26 +2,26 @@ -- !ds_shape_98 -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_date <= '2002-06-19') and (date_dim.d_date >= '2002-05-20')) ------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------filter(i_category IN ('Music', 'Shoes', 'Sports')) --------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query99.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query99.out index 27b0035b6e..921f227b02 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query99.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query99.out @@ -2,10 +2,10 @@ -- !ds_shape_99 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() @@ -15,17 +15,17 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_ship_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_month_seq <= 1235) and (date_dim.d_month_seq >= 1224)) --------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[call_center] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[ship_mode] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[warehouse] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query1.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query1.out index edd2c441da..66550bfccf 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query1.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query1.out @@ -4,40 +4,40 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] ----------------PhysicalProject ------------------PhysicalOlapScan[store_returns] apply RFs: RF0 -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((date_dim.d_year = 2000)) ----------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ctr_customer_sk->[c_customer_sk] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------PhysicalOlapScan[customer] apply RFs: RF2 ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE))) ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = ctr1.ctr_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ctr_store_sk] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((store.s_state = 'SD')) ----------------------------PhysicalOlapScan[store] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------------PhysicalProject ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query10.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query10.out index 223a7168b3..dab1ca1091 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query10.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query10.out @@ -3,7 +3,7 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------hashAgg[LOCAL] ------------PhysicalProject @@ -13,41 +13,41 @@ PhysicalResultSink --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 c_current_cdemo_sk->[cd_demo_sk] ------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF5 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) ------------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[c_current_addr_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County')) ----------------------------------------PhysicalOlapScan[customer_address] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) --------------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) ------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query11.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query11.out index 78d4ac74ab..20e3fd8652 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query11.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query11.out @@ -4,57 +4,57 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((PULL_UP_UNIFIED_OUTPUT_ALIAS = customer.c_customer_sk)) otherCondition=() ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalUnion --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (2001, 2002)) --------------------------------PhysicalOlapScan[date_dim] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (2001, 2002)) --------------------------------PhysicalOlapScan[date_dim] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[customer] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000) > if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000))) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((t_w_firstyear.dyear = 2001) and (t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year_total > 0.00)) --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------filter((t_s_secyear.dyear = 2002) and (t_s_secyear.sale_type = 's')) ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((t_w_secyear.dyear = 2002) and (t_w_secyear.sale_type = 'w')) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((t_s_firstyear.dyear = 2001) and (t_s_firstyear.sale_type = 's') and (t_s_firstyear.year_total > 0.00)) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query12.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query12.out index e8671ca916..08c2eb6a15 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query12.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query12.out @@ -2,26 +2,26 @@ -- !ds_shape_12 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ws_item_sk] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_date <= '1998-05-06') and (date_dim.d_date >= '1998-04-06')) ------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------filter(i_category IN ('Books', 'Men', 'Sports')) --------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query13.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query13.out index 9565e553c2..5e8f8d4e9b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query13.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query13.out @@ -2,36 +2,36 @@ -- !ds_shape_13 -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF4 ss_store_sk->[s_store_sk] ------------PhysicalProject --------------PhysicalOlapScan[store] apply RFs: RF4 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=(((((((customer_demographics.cd_marital_status = 'D') AND (customer_demographics.cd_education_status = 'Unknown')) AND ((store_sales.ss_sales_price >= 100.00) AND (store_sales.ss_sales_price <= 150.00))) AND (household_demographics.hd_dep_count = 3)) OR ((((customer_demographics.cd_marital_status = 'S') AND (customer_demographics.cd_education_status = 'College')) AND ((store_sales.ss_sales_price >= 50.00) AND (store_sales.ss_sales_price <= 100.00))) AND (household_demographics.hd_dep_count = 1))) OR ((((customer_demographics.cd_marital_status = 'M') AND (customer_demographics.cd_education_status = '4 yr Degree')) AND ((store_sales.ss_sales_price >= 150.00) AND (store_sales.ss_sales_price <= 200.00))) AND (household_demographics.hd_dep_count = 1)))) build RFs:RF3 ss_cdemo_sk->[cd_demo_sk] ------------------PhysicalProject --------------------filter(((((customer_demographics.cd_marital_status = 'D') AND (customer_demographics.cd_education_status = 'Unknown')) OR ((customer_demographics.cd_marital_status = 'S') AND (customer_demographics.cd_education_status = 'College'))) OR ((customer_demographics.cd_marital_status = 'M') AND (customer_demographics.cd_education_status = '4 yr Degree')))) ----------------------PhysicalOlapScan[customer_demographics] apply RFs: RF3 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=((((ca_state IN ('KS', 'MI', 'SD') AND ((store_sales.ss_net_profit >= 100.00) AND (store_sales.ss_net_profit <= 200.00))) OR (ca_state IN ('CO', 'MO', 'ND') AND ((store_sales.ss_net_profit >= 150.00) AND (store_sales.ss_net_profit <= 300.00)))) OR (ca_state IN ('NH', 'OH', 'TX') AND ((store_sales.ss_net_profit >= 50.00) AND (store_sales.ss_net_profit <= 250.00))))) build RFs:RF0 ca_address_sk->[ss_addr_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------filter((store_sales.ss_net_profit <= 300.00) and (store_sales.ss_net_profit >= 50.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------filter(((ca_state IN ('KS', 'MI', 'SD') OR ca_state IN ('CO', 'MO', 'ND')) OR ca_state IN ('NH', 'OH', 'TX')) and (customer_address.ca_country = 'United States')) ----------------------------------PhysicalOlapScan[customer_address] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_year = 2001)) --------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter(hd_dep_count IN (1, 3)) ------------------------------PhysicalOlapScan[household_demographics] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query14.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query14.out index 4b2834046c..eddff073c8 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query14.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query14.out @@ -6,94 +6,94 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------hashJoin[INNER_JOIN] hashCondition=((item.i_brand_id = t.brand_id) and (item.i_category_id = t.category_id) and (item.i_class_id = t.class_id)) otherCondition=() build RFs:RF6 class_id->[i_class_id];RF7 category_id->[i_category_id];RF8 brand_id->[i_brand_id] --------PhysicalProject ----------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8 ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalIntersect ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = iss.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] ----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((d1.d_year <= 2002) and (d1.d_year >= 2000)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[item] ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = ics.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[cs_item_sk] ----------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((d2.d_year <= 2002) and (d2.d_year >= 2000)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[item] ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = iws.i_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[ws_item_sk] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((d3.d_year <= 2002) and (d3.d_year >= 2000)) --------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[item] --PhysicalCteAnchor ( cteId=CTEId#1 ) ----PhysicalCteProducer ( cteId=CTEId#1 ) ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalUnion ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ss_sold_date_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[store_sales] apply RFs: RF9 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_year <= 2002) and (date_dim.d_year >= 2000)) --------------------------PhysicalOlapScan[date_dim] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF10 d_date_sk->[cs_sold_date_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF10 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_year <= 2002) and (date_dim.d_year >= 2000)) --------------------------PhysicalOlapScan[date_dim] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[ws_sold_date_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[web_sales] apply RFs: RF11 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_year <= 2002) and (date_dim.d_year >= 2000)) --------------------------PhysicalOlapScan[date_dim] ----PhysicalResultSink ------PhysicalTopN[MERGE_SORT] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalRepeat ----------------------PhysicalUnion @@ -101,78 +101,78 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------NestedLoopJoin[INNER_JOIN](cast(sales as DOUBLE) > cast(average_sales as DOUBLE)) ----------------------------PhysicalProject ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((store_sales.ss_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF14 ss_item_sk->[ss_item_sk] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF13 i_item_sk->[ss_item_sk] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF12 d_date_sk->[ss_sold_date_sk] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF12 RF13 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) ----------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalAssertNumRows ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ------------------------PhysicalProject --------------------------NestedLoopJoin[INNER_JOIN](cast(sales as DOUBLE) > cast(average_sales as DOUBLE)) ----------------------------PhysicalProject ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((catalog_sales.cs_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF17 cs_item_sk->[ss_item_sk] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF16 i_item_sk->[cs_item_sk] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF15 d_date_sk->[cs_sold_date_sk] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF15 RF16 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) ----------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalAssertNumRows ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ------------------------PhysicalProject --------------------------NestedLoopJoin[INNER_JOIN](cast(sales as DOUBLE) > cast(average_sales as DOUBLE)) ----------------------------PhysicalProject ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF20 ws_item_sk->[ss_item_sk] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF19 i_item_sk->[ws_item_sk] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF18 d_date_sk->[ws_sold_date_sk] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF18 RF19 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) ----------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalAssertNumRows ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query15.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query15.out index 252a5a386f..763ac71df8 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query15.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query15.out @@ -2,28 +2,28 @@ -- !ds_shape_15 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=(((substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274') OR ca_state IN ('CA', 'GA', 'WA')) OR (catalog_sales.cs_sales_price > 500.00))) build RFs:RF2 c_customer_sk->[cs_bill_customer_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF2 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_qoy = 1) and (date_dim.d_year = 2001)) ----------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[customer] apply RFs: RF0 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query16.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query16.out index f715eb2136..869cd73977 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query16.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query16.out @@ -4,34 +4,34 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] ------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[DISTINCT_LOCAL] ------------hashAgg[GLOBAL] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF4 cs_order_number->[cs_order_number] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 --------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk] ----------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() build RFs:RF2 cs_order_number->[cr_order_number] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk] ----------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cs_ship_addr_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF3 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((customer_address.ca_state = 'WV')) ------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) ----------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) ----------------------------PhysicalOlapScan[call_center] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query17.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query17.out index 6fe2631fc2..fcccba6021 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query17.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query17.out @@ -3,47 +3,47 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF8 sr_customer_sk->[cs_bill_customer_sk];RF9 sr_item_sk->[cs_item_sk] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 RF8 RF9 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) --------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF6 s_store_sk->[ss_store_sk] --------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[ss_item_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF2 sr_customer_sk->[ss_customer_sk];RF3 sr_item_sk->[ss_item_sk];RF4 sr_ticket_number->[ss_ticket_number] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 RF5 RF6 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((d1.d_quarter_name = '2001Q1')) ------------------------------------------PhysicalOlapScan[date_dim] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) ------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query18.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query18.out index ee0413e0c4..83b9ccb064 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query18.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query18.out @@ -2,48 +2,48 @@ -- !ds_shape_18 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF5 cs_item_sk->[i_item_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] apply RFs: RF5 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF2 cd_demo_sk->[cs_bill_cdemo_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 RF4 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((cd1.cd_education_status = 'Advanced Degree') and (cd1.cd_gender = 'F')) --------------------------------------------PhysicalOlapScan[customer_demographics] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() build RFs:RF1 c_current_cdemo_sk->[cd_demo_sk] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF1 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------filter(c_birth_month IN (1, 10, 2, 4, 7, 8)) ------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------PhysicalProject ----------------------------------------------filter(ca_state IN ('GA', 'IN', 'ME', 'NC', 'OK', 'WA', 'WY')) ------------------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_year = 1998)) ----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query19.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query19.out index e4170d004a..d685827491 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query19.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query19.out @@ -2,11 +2,11 @@ -- !ds_shape_19 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=(( not (substring(ca_zip, 1, 5) = substring(s_zip, 1, 5)))) build RFs:RF4 s_store_sk->[ss_store_sk] @@ -14,27 +14,27 @@ PhysicalResultSink ----------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 c_current_addr_sk->[ca_address_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ss_customer_sk->[c_customer_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer] apply RFs: RF2 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF4 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((item.i_manager_id = 2)) --------------------------------------------PhysicalOlapScan[item] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query2.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query2.out index 4ef14e4020..69e7fe08dd 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query2.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query2.out @@ -3,43 +3,43 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) --PhysicalCteProducer ( cteId=CTEId#1 ) ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = wscs.sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk,cs_sold_date_sk] --------------PhysicalUnion -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[web_sales] apply RFs: RF0 -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------PhysicalProject ------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(d_week_seq2 - 53))) otherCondition=() ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject ------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_year = 1998)) --------------------------PhysicalOlapScan[date_dim] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_week_seq = d_week_seq2)) otherCondition=() build RFs:RF1 d_week_seq->[d_week_seq] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject ------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_year = 1999)) --------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query20.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query20.out index a0dc7ea17e..50756d2605 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query20.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query20.out @@ -2,26 +2,26 @@ -- !ds_shape_20 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[cs_item_sk] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_date <= '2002-02-25') and (date_dim.d_date >= '2002-01-26')) ------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------filter(i_category IN ('Books', 'Shoes', 'Women')) --------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query21.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query21.out index 1e1c0d9793..7d4c036294 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query21.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query21.out @@ -2,11 +2,11 @@ -- !ds_shape_21 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------filter((if((inv_before > 0), (cast(inv_after as DOUBLE) / cast(inv_before as DOUBLE)), NULL) <= 1.5) and (if((inv_before > 0), (cast(inv_after as DOUBLE) / cast(inv_before as DOUBLE)), NULL) >= cast((2.000000 / 3.0) as DOUBLE))) ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF2 w_warehouse_sk->[inv_warehouse_sk] @@ -14,15 +14,15 @@ PhysicalResultSink ----------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] ------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] --------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) --------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_date <= '2002-03-29') and (date_dim.d_date >= '2002-01-28')) ------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[warehouse] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query22.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query22.out index ca25b08047..d528b3cc29 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query22.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query22.out @@ -2,11 +2,11 @@ -- !ds_shape_22 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject @@ -14,10 +14,10 @@ PhysicalResultSink ----------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[item] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_month_seq <= 1199) and (date_dim.d_month_seq >= 1188)) ----------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query23.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query23.out index 54d92b454d..40248cb830 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query23.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query23.out @@ -5,7 +5,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalProject ------filter((cnt > 4)) --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] @@ -13,11 +13,11 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter(d_year IN (2000, 2001, 2002, 2003)) ----------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[item] --PhysicalCteAnchor ( cteId=CTEId#2 ) @@ -25,26 +25,26 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalProject --------NestedLoopJoin[INNER_JOIN](cast(ssales as DOUBLE) > cast((0.9500 * tpcds_cmax) as DOUBLE)) ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------filter(( not ss_customer_sk IS NULL)) --------------------PhysicalOlapScan[store_sales] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecReplicated] ------------PhysicalProject --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecGather] ------------------hashAgg[LOCAL] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------filter(( not ss_customer_sk IS NULL)) ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter(d_year IN (2000, 2001, 2002, 2003)) --------------------------------------PhysicalOlapScan[date_dim] @@ -52,45 +52,45 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalLimit[GLOBAL] --------PhysicalLimit[LOCAL] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalUnion ------------------PhysicalProject --------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[cs_bill_customer_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) ------------------PhysicalProject --------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF6 c_customer_sk->[ws_bill_customer_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF5 RF6 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query24.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query24.out index 485880ab7e..ff1ea2cb66 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query24.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query24.out @@ -4,56 +4,56 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF5 sr_item_sk->[ss_item_sk];RF6 sr_ticket_number->[ss_ticket_number] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashJoin[INNER_JOIN] hashCondition=((store.s_zip = customer_address.ca_zip) and (store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ca_zip->[s_zip];RF3 c_customer_sk->[ss_customer_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF3 RF4 RF5 RF6 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((store.s_market_id = 8)) ------------------------------------PhysicalOlapScan[store] apply RFs: RF2 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=(( not (c_birth_country = upper(ca_country)))) build RFs:RF0 ca_address_sk->[c_current_addr_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer_address] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[store_returns] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalProject ------------NestedLoopJoin[INNER_JOIN](cast(paid as DOUBLE) > cast((0.05 * avg(cast(netpaid as DECIMALV3(38, 4)))) as DOUBLE)) --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject ------------------------filter((ssales.i_color = 'beige')) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecGather] ----------------------hashAgg[LOCAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------------PhysicalProject ----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query25.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query25.out index 0f3f59ab4e..f03e994d14 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query25.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query25.out @@ -2,47 +2,47 @@ -- !ds_shape_25 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF8 sr_customer_sk->[cs_bill_customer_sk];RF9 sr_item_sk->[cs_item_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 RF8 RF9 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((d3.d_moy <= 10) and (d3.d_moy >= 4) and (d3.d_year = 2000)) ------------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF6 s_store_sk->[ss_store_sk] ------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[ss_item_sk] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF2 sr_customer_sk->[ss_customer_sk];RF3 sr_item_sk->[ss_item_sk];RF4 sr_ticket_number->[ss_ticket_number] --------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 RF5 RF6 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((d2.d_moy <= 10) and (d2.d_moy >= 4) and (d2.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query26.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query26.out index 87c1d759fe..8620067978 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query26.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query26.out @@ -2,14 +2,14 @@ -- !ds_shape_26 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[cs_item_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF2 p_promo_sk->[cs_promo_sk] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] @@ -17,19 +17,19 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[cs_bill_cdemo_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 RF3 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((customer_demographics.cd_education_status = 'Unknown') and (customer_demographics.cd_gender = 'M') and (customer_demographics.cd_marital_status = 'S')) ------------------------------------PhysicalOlapScan[customer_demographics] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_year = 2001)) --------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter(((promotion.p_channel_email = 'N') OR (promotion.p_channel_event = 'N'))) ----------------------------PhysicalOlapScan[promotion] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query27.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query27.out index 74b008f4c7..4261969124 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query27.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query27.out @@ -3,35 +3,35 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalRepeat --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((customer_demographics.cd_education_status = 'Secondary') and (customer_demographics.cd_gender = 'F') and (customer_demographics.cd_marital_status = 'D')) ------------------------------------------PhysicalOlapScan[customer_demographics] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_year = 1999)) --------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter(s_state IN ('AL', 'LA', 'MI', 'MO', 'SC', 'TN')) ------------------------------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 079837446a..08f72b84ba 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 @@ -15,47 +15,47 @@ PhysicalResultSink ------------------------NestedLoopJoin[CROSS_JOIN] --------------------------PhysicalLimit[LOCAL] ----------------------------hashAgg[GLOBAL] -------------------------------PhysicalDistribute +------------------------------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 +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalLimit[LOCAL] ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------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 +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalLimit[LOCAL] --------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute +----------------------------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 +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalLimit[LOCAL] ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------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 +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------PhysicalLimit[LOCAL] ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------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 +----------PhysicalDistribute[DistributionSpecReplicated] ------------PhysicalLimit[LOCAL] --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------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)) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query29.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query29.out index f8a0352d6f..c7a67607b9 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query29.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query29.out @@ -2,10 +2,10 @@ -- !ds_shape_29 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[cs_sold_date_sk] @@ -13,33 +13,33 @@ PhysicalResultSink --------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF7 sr_customer_sk->[cs_bill_customer_sk];RF8 sr_item_sk->[cs_item_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 RF8 RF9 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF6 s_store_sk->[ss_store_sk] --------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[ss_item_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF2 sr_customer_sk->[ss_customer_sk];RF3 sr_item_sk->[ss_item_sk];RF4 sr_ticket_number->[ss_ticket_number] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 RF5 RF6 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1999)) ------------------------------------------PhysicalOlapScan[date_dim] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((d2.d_moy <= 7) and (d2.d_moy >= 4) and (d2.d_year = 1999)) ------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[store] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter(d_year IN (1999, 2000, 2001)) ------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query3.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query3.out index 7704d94620..5a86e9fdb7 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query3.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query3.out @@ -2,22 +2,22 @@ -- !ds_shape_3 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((item.i_manufact_id = 816)) ----------------------------PhysicalOlapScan[item] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((dt.d_moy = 11)) --------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query30.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query30.out index c734431a1a..c70c5d0dda 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query30.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query30.out @@ -4,45 +4,45 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[wr_returning_addr_sk] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[wr_returned_date_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[web_returns] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_year = 2002)) ----------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[customer_address] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE))) --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ctr_customer_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[c_current_addr_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[customer] apply RFs: RF2 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((customer_address.ca_state = 'IN')) ----------------------------PhysicalOlapScan[customer_address] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------------PhysicalProject --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query31.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query31.out index 48208ce7b2..f12c5e5cb2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query31.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query31.out @@ -4,74 +4,74 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((ss.d_year = 2000) and d_qoy IN (1, 2, 3)) ----------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[customer_address] --PhysicalCteAnchor ( cteId=CTEId#1 ) ----PhysicalCteProducer ( cteId=CTEId#1 ) ------PhysicalProject --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ws_bill_addr_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((ws.d_year = 2000) and d_qoy IN (1, 2, 3)) ------------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[customer_address] ----PhysicalResultSink ------PhysicalQuickSort[MERGE_SORT] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------PhysicalQuickSort[LOCAL_SORT] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((ws1.ca_county = ws3.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------filter((ws3.d_qoy = 3) and (ws3.d_year = 2000)) ----------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((ss2.ca_county = ss3.ca_county)) otherCondition=() ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((ss3.d_qoy = 3) and (ss3.d_year = 2000)) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ca_county = ws2.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) ----------------------hashJoin[INNER_JOIN] hashCondition=((ss1.ca_county = ws1.ca_county)) otherCondition=() ------------------------hashJoin[INNER_JOIN] hashCondition=((ss1.ca_county = ss2.ca_county)) otherCondition=() ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------filter((ss1.d_qoy = 1) and (ss1.d_year = 2000)) --------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------filter((ss2.d_qoy = 2) and (ss2.d_year = 2000)) --------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter((ws1.d_qoy = 1) and (ws1.d_year = 2000)) ------------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((ws2.d_qoy = 2) and (ws2.d_year = 2000)) ----------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query32.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query32.out index fa698587ba..4ba68645ec 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query32.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query32.out @@ -4,24 +4,24 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalProject --------------filter((cast(cs_ext_discount_amt as DECIMALV3(38, 5)) > (1.3 * avg(cast(cs_ext_discount_amt as DECIMALV3(9, 4))) OVER(PARTITION BY i_item_sk)))) ----------------PhysicalWindow ------------------PhysicalQuickSort[LOCAL_SORT] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((item.i_manufact_id = 29)) ------------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '1999-04-07') and (date_dim.d_date >= '1999-01-07')) --------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query33.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query33.out index a8cc78c96d..ef9997b0f5 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query33.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query33.out @@ -2,98 +2,98 @@ -- !ds_shape_33 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF3 i_manufact_id->[i_manufact_id] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((item.i_category = 'Home')) --------------------------PhysicalOlapScan[item] apply RFs: RF3 --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) ------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ------------------------------------------PhysicalOlapScan[customer_address] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF7 i_manufact_id->[i_manufact_id] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((item.i_category = 'Home')) --------------------------PhysicalOlapScan[item] apply RFs: RF7 --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[cs_bill_addr_sk] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 RF6 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) ------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ------------------------------------------PhysicalOlapScan[customer_address] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF11 i_manufact_id->[i_manufact_id] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((item.i_category = 'Home')) --------------------------PhysicalOlapScan[item] apply RFs: RF11 --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 ws_item_sk->[i_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[item] apply RFs: RF10 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[ws_bill_addr_sk] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) ------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ------------------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query34.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query34.out index ac5d62c541..00161e3291 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query34.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query34.out @@ -2,16 +2,16 @@ -- !ds_shape_34 -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk] ------------PhysicalProject --------------PhysicalOlapScan[customer] apply RFs: RF3 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------filter((dn.cnt <= 20) and (dn.cnt >= 15)) ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------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] @@ -20,15 +20,15 @@ PhysicalResultSink ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((((date_dim.d_dom >= 1) AND (date_dim.d_dom <= 3)) OR ((date_dim.d_dom >= 25) AND (date_dim.d_dom <= 28))) and d_year IN (1998, 1999, 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.2) and hd_buy_potential IN ('0-500', '1001-5000')) ----------------------------------PhysicalOlapScan[household_demographics] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(s_county IN ('Barrow County', 'Daviess County', 'Franklin Parish', 'Luce County', 'Richland County', 'Walker County', 'Williamson County', 'Ziebach County')) --------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query35.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query35.out index 7cfa049bd3..0b1662a0be 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query35.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query35.out @@ -3,10 +3,10 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------filter(($c$1 OR $c$2)) @@ -14,44 +14,44 @@ PhysicalResultSink ----------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalProject ------------------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) --------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer_demographics] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ------------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query36.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query36.out index 939fa1983f..fc2a90e47d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query36.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query36.out @@ -3,15 +3,15 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalRepeat ----------------------------PhysicalProject @@ -22,14 +22,14 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((d1.d_year = 2002)) ----------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[item] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter(s_state IN ('AL', 'GA', 'MI', 'MO', 'OH', 'SC', 'SD', 'TN')) --------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query37.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query37.out index 3ac16407fa..28e8aac54c 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query37.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query37.out @@ -2,16 +2,16 @@ -- !ds_shape_37 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk] ------------------PhysicalProject --------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] ------------------------PhysicalProject @@ -19,11 +19,11 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------filter((inventory.inv_quantity_on_hand <= 500) and (inventory.inv_quantity_on_hand >= 100)) --------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((item.i_current_price <= 75.00) and (item.i_current_price >= 45.00) and i_manufact_id IN (1000, 707, 747, 856)) ----------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_date <= '1999-04-22') and (date_dim.d_date >= '1999-02-21')) ------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query38.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query38.out index d34d69ac4c..79bb99dd56 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query38.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query38.out @@ -4,62 +4,62 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalProject --------------PhysicalIntersect ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ----------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ----------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ----------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer] 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 3743c5863b..6a89de8b69 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 @@ -7,32 +7,32 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------hashAgg[LOCAL] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF2 w_warehouse_sk->[inv_warehouse_sk] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] --------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk] ----------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_year = 1998) and d_moy IN (1, 2)) ----------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------PhysicalOlapScan[warehouse] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] -------PhysicalDistribute +------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 +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((inv1.d_moy = 1)) --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((inv2.d_moy = 2)) --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query4.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query4.out index 81e9dc9527..133758d014 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query4.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query4.out @@ -4,80 +4,80 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((PULL_UP_UNIFIED_OUTPUT_ALIAS = customer.c_customer_sk)) otherCondition=() ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalUnion --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000)) --------------------------------PhysicalOlapScan[date_dim] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000)) --------------------------------PhysicalOlapScan[date_dim] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000)) --------------------------------PhysicalOlapScan[date_dim] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[customer] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((t_w_firstyear.dyear = 1999) and (t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year_total > 0.000000)) --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=() -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------filter((t_w_secyear.dyear = 2000) and (t_w_secyear.sale_type = 'w')) ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_c_firstyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((t_c_firstyear.dyear = 1999) and (t_c_firstyear.sale_type = 'c') and (t_c_firstyear.year_total > 0.000000)) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((t_s_secyear.dyear = 2000) and (t_s_secyear.sale_type = 's')) ----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=() -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter((t_c_secyear.dyear = 2000) and (t_c_secyear.sale_type = 'c')) ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter((t_s_firstyear.dyear = 1999) and (t_s_firstyear.sale_type = 's') and (t_s_firstyear.year_total > 0.000000)) ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query40.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query40.out index bf14602045..67242e90a5 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query40.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query40.out @@ -2,10 +2,10 @@ -- !ds_shape_40 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF4 w_warehouse_sk->[cs_warehouse_sk] @@ -17,15 +17,15 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF4 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) --------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_date <= '2001-05-02') and (date_dim.d_date >= '2001-03-03')) ------------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[warehouse] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query41.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query41.out index 584dda5785..f07731a85b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query41.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query41.out @@ -2,21 +2,21 @@ -- !ds_shape_41 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((item.i_manufact = i1.i_manufact)) otherCondition=() build RFs:RF0 i_manufact->[i_manufact] ------------------PhysicalProject --------------------filter((i1.i_manufact_id <= 788) and (i1.i_manufact_id >= 748)) ----------------------PhysicalOlapScan[item] apply RFs: RF0 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((item_cnt > 0)) ------------------------hashAgg[GLOBAL] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject --------------------------------filter((((((((((((item.i_category = 'Women') AND i_color IN ('aquamarine', 'gainsboro')) AND i_units IN ('Dozen', 'Ounce')) AND i_size IN ('economy', 'medium')) OR ((((item.i_category = 'Women') AND i_color IN ('chiffon', 'violet')) AND i_units IN ('Pound', 'Ton')) AND i_size IN ('extra large', 'small'))) OR ((((item.i_category = 'Women') AND i_color IN ('blanched', 'tomato')) AND i_units IN ('Case', 'Tbl')) AND i_size IN ('economy', 'medium'))) OR ((((item.i_category = 'Women') AND i_color IN ('almond', 'lime')) AND i_units IN ('Box', 'Dram')) AND i_size IN ('extra large', 'small'))) OR ((((item.i_category = 'Men') AND i_color IN ('blue', 'chartreuse')) AND i_units IN ('Each', 'Oz')) AND i_size IN ('N/A', 'large'))) OR ((((item.i_category = 'Men') AND i_color IN ('dodger', 'tan')) AND i_units IN ('Bunch', 'Tsp')) AND i_size IN ('economy', 'medium'))) OR ((((item.i_category = 'Men') AND i_color IN ('peru', 'saddle')) AND i_units IN ('Gram', 'Pallet')) AND i_size IN ('N/A', 'large'))) OR ((((item.i_category = 'Men') AND i_color IN ('indian', 'spring')) AND i_units IN ('Carton', 'Unknown')) AND i_size IN ('economy', 'medium')))) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query42.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query42.out index 7d6239b062..fe908b68c8 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query42.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query42.out @@ -2,21 +2,21 @@ -- !ds_shape_42 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((item.i_manager_id = 1)) --------------------------PhysicalOlapScan[item] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((dt.d_moy = 11) and (dt.d_year = 2002)) ------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query43.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query43.out index 445a381983..2de98f4e1f 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query43.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query43.out @@ -2,10 +2,10 @@ -- !ds_shape_43 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] @@ -13,11 +13,11 @@ PhysicalResultSink --------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_year = 2000)) ----------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((store.s_gmt_offset = -5.00)) ------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query44.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query44.out index 35ca3b8e45..cde6a04b5d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query44.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query44.out @@ -2,68 +2,68 @@ -- !ds_shape_44 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() build RFs:RF1 item_sk->[i_item_sk] ------------PhysicalProject --------------PhysicalOlapScan[item] apply RFs: RF1 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((asceding.rnk = descending.rnk)) otherCondition=() ------------------hashJoin[INNER_JOIN] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() build RFs:RF0 item_sk->[i_item_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[item] apply RFs: RF0 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter((rnk < 11)) --------------------------PhysicalWindow ----------------------------PhysicalQuickSort[MERGE_SORT] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------PhysicalQuickSort[LOCAL_SORT] ----------------------------------PhysicalPartitionTopN ------------------------------------PhysicalProject --------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DOUBLE) > cast((0.9 * rank_col) as DOUBLE)) ----------------------------------------PhysicalProject ------------------------------------------hashAgg[GLOBAL] ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------hashAgg[LOCAL] ------------------------------------------------PhysicalProject --------------------------------------------------filter((ss1.ss_store_sk = 146)) ----------------------------------------------------PhysicalOlapScan[store_sales] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalAssertNumRows ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------------PhysicalProject ------------------------------------------------hashAgg[GLOBAL] ---------------------------------------------------PhysicalDistribute +--------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------hashAgg[LOCAL] ------------------------------------------------------PhysicalProject --------------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL) ----------------------------------------------------------PhysicalOlapScan[store_sales] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((rnk < 11)) ------------------------PhysicalWindow --------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------PhysicalQuickSort[LOCAL_SORT] --------------------------------PhysicalPartitionTopN ----------------------------------PhysicalProject ------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DOUBLE) > cast((0.9 * rank_col) as DOUBLE)) --------------------------------------PhysicalProject ----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------hashAgg[LOCAL] ----------------------------------------------PhysicalProject ------------------------------------------------filter((ss1.ss_store_sk = 146)) --------------------------------------------------PhysicalOlapScan[store_sales] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalAssertNumRows -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------------PhysicalProject ----------------------------------------------hashAgg[GLOBAL] -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------------hashAgg[LOCAL] ----------------------------------------------------PhysicalProject ------------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query45.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query45.out index c547ef0f99..e8d2715c4d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query45.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query45.out @@ -2,40 +2,40 @@ -- !ds_shape_45 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------filter((substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274') OR $c$1)) ------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ws_bill_customer_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ws_item_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_qoy = 2) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer_address] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter(i_item_sk IN (11, 13, 17, 19, 2, 23, 29, 3, 5, 7)) --------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query46.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query46.out index 4cdaf1c9cc..968a23d062 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query46.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query46.out @@ -2,16 +2,16 @@ -- !ds_shape_46 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=(( not (ca_city = bought_city))) build RFs:RF5 c_customer_sk->[ss_customer_sk] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[ss_addr_sk] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] @@ -19,27 +19,27 @@ PhysicalResultSink --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 RF5 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter(d_dow IN (0, 6) and d_year IN (1999, 2000, 2001)) ----------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter(((household_demographics.hd_dep_count = 6) OR (household_demographics.hd_vehicle_count = 0))) ------------------------------------PhysicalOlapScan[household_demographics] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter(s_city IN ('Centerville', 'Fairview', 'Five Points', 'Liberty', 'Oak Grove')) ----------------------------------PhysicalOlapScan[store] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer_address] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[customer] apply RFs: RF0 -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query47.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query47.out index 08bd55667d..214cdaaee6 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query47.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query47.out @@ -7,10 +7,10 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------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] @@ -19,32 +19,32 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((((date_dim.d_year = 2001) OR ((date_dim.d_year = 2000) AND (date_dim.d_moy = 12))) OR ((date_dim.d_year = 2002) AND (date_dim.d_moy = 1)))) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store] --PhysicalResultSink ----PhysicalProject ------PhysicalTopN[MERGE_SORT] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((v1.i_brand = v1_lag.i_brand) and (v1.i_category = v1_lag.i_category) and (v1.rn = expr_(rn + 1)) and (v1.s_company_name = v1_lag.s_company_name) and (v1.s_store_name = v1_lag.s_store_name)) otherCondition=() ----------------hashJoin[INNER_JOIN] hashCondition=((v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1)) and (v1.s_company_name = v1_lead.s_company_name) and (v1.s_store_name = v1_lead.s_store_name)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000) and (v2.avg_monthly_sales > 0.0000) and (v2.d_year = 2001)) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query48.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query48.out index c16a92a82a..15f1054ab4 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query48.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query48.out @@ -2,7 +2,7 @@ -- !ds_shape_48 -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] @@ -10,24 +10,24 @@ PhysicalResultSink --------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=((((ca_state IN ('IA', 'MD', 'MN') AND ((store_sales.ss_net_profit >= 0.00) AND (store_sales.ss_net_profit <= 2000.00))) OR (ca_state IN ('IL', 'TX', 'VA') AND ((store_sales.ss_net_profit >= 150.00) AND (store_sales.ss_net_profit <= 3000.00)))) OR (ca_state IN ('IN', 'MI', 'WI') AND ((store_sales.ss_net_profit >= 50.00) AND (store_sales.ss_net_profit <= 25000.00))))) build RFs:RF1 ca_address_sk->[ss_addr_sk] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=((((((customer_demographics.cd_marital_status = 'U') AND (customer_demographics.cd_education_status = 'Primary')) AND ((store_sales.ss_sales_price >= 100.00) AND (store_sales.ss_sales_price <= 150.00))) OR (((customer_demographics.cd_marital_status = 'W') AND (customer_demographics.cd_education_status = 'College')) AND ((store_sales.ss_sales_price >= 50.00) AND (store_sales.ss_sales_price <= 100.00)))) OR (((customer_demographics.cd_marital_status = 'D') AND (customer_demographics.cd_education_status = '2 yr Degree')) AND ((store_sales.ss_sales_price >= 150.00) AND (store_sales.ss_sales_price <= 200.00))))) build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] ------------------------PhysicalProject --------------------------filter((store_sales.ss_net_profit <= 25000.00) and (store_sales.ss_net_profit >= 0.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter(((((customer_demographics.cd_marital_status = 'U') AND (customer_demographics.cd_education_status = 'Primary')) OR ((customer_demographics.cd_marital_status = 'W') AND (customer_demographics.cd_education_status = 'College'))) OR ((customer_demographics.cd_marital_status = 'D') AND (customer_demographics.cd_education_status = '2 yr Degree')))) ------------------------------PhysicalOlapScan[customer_demographics] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter(((ca_state IN ('IA', 'MD', 'MN') OR ca_state IN ('IL', 'TX', 'VA')) OR ca_state IN ('IN', 'MI', 'WI')) and (customer_address.ca_country = 'United States')) --------------------------PhysicalOlapScan[customer_address] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((date_dim.d_year = 1999)) ----------------------PhysicalOlapScan[date_dim] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalProject ----------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query49.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query49.out index b3ae487ebe..7fb023642d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query49.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query49.out @@ -2,24 +2,24 @@ -- !ds_shape_49 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------filter(((return_rank <= 10) OR (currency_rank <= 10))) ----------------------PhysicalWindow ------------------------PhysicalQuickSort[LOCAL_SORT] --------------------------PhysicalWindow ----------------------------PhysicalQuickSort[MERGE_SORT] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------PhysicalQuickSort[LOCAL_SORT] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number];RF2 ws_item_sk->[wr_item_sk] @@ -30,22 +30,22 @@ PhysicalResultSink ------------------------------------------------PhysicalProject --------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) ----------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) ------------------------------------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------filter(((return_rank <= 10) OR (currency_rank <= 10))) ----------------------PhysicalWindow ------------------------PhysicalQuickSort[LOCAL_SORT] --------------------------PhysicalWindow ----------------------------PhysicalQuickSort[MERGE_SORT] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------PhysicalQuickSort[LOCAL_SORT] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF4 cs_order_number->[cr_order_number];RF5 cs_item_sk->[cr_item_sk] @@ -56,22 +56,22 @@ PhysicalResultSink ------------------------------------------------PhysicalProject --------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) ----------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) ------------------------------------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------filter(((return_rank <= 10) OR (currency_rank <= 10))) ----------------------PhysicalWindow ------------------------PhysicalQuickSort[LOCAL_SORT] --------------------------PhysicalWindow ----------------------------PhysicalQuickSort[MERGE_SORT] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------PhysicalQuickSort[LOCAL_SORT] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF7 ss_ticket_number->[sr_ticket_number];RF8 ss_item_sk->[sr_item_sk] @@ -82,7 +82,7 @@ PhysicalResultSink ------------------------------------------------PhysicalProject --------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) ----------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) ------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query5.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query5.out index 9e38aadcf2..8a8f8b1180 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query5.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query5.out @@ -2,82 +2,82 @@ -- !ds_shape_5 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalUnion --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.store_sk = store.s_store_sk)) otherCondition=() --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk,sr_returned_date_sk] ------------------------------------PhysicalUnion ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk,cr_returned_date_sk] ------------------------------------PhysicalUnion ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF1 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[catalog_page] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.wsr_web_site_sk = web_site.web_site_sk)) otherCondition=() --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk,wr_returned_date_sk] ------------------------------------PhysicalUnion ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------PhysicalProject ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF2 wr_item_sk->[ws_item_sk];RF3 wr_order_number->[ws_order_number] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF4 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query50.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query50.out index 43aca8f6d6..40f241ec82 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query50.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query50.out @@ -2,10 +2,10 @@ -- !ds_shape_50 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------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] @@ -18,14 +18,14 @@ PhysicalResultSink --------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((d2.d_moy = 8) and (d2.d_year = 2001)) ----------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query51.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query51.out index 0278c0a003..19f1ce2f7b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query51.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query51.out @@ -3,46 +3,46 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------filter((web_cumulative > store_cumulative)) --------------PhysicalWindow ----------------PhysicalQuickSort[LOCAL_SORT] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[FULL_OUTER_JOIN] hashCondition=((web.d_date = store.d_date) and (web.item_sk = store.item_sk)) otherCondition=() -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalWindow ------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) ----------------------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalWindow ------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) ----------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query52.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query52.out index 5dda178baf..965bdd14e5 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query52.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query52.out @@ -2,22 +2,22 @@ -- !ds_shape_52 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((item.i_manager_id = 1)) ----------------------------PhysicalOlapScan[item] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((dt.d_moy = 12) and (dt.d_year = 2002)) --------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query53.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query53.out index 46542ce959..c2836ccea5 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query53.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query53.out @@ -3,16 +3,16 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------filter((if((avg_quarterly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_quarterly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_quarterly_sales), NULL) > 0.100000)) --------------PhysicalWindow ----------------PhysicalQuickSort[LOCAL_SORT] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------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] @@ -22,15 +22,15 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((((i_category IN ('Books', 'Children', 'Electronics') AND i_class IN ('personal', 'portable', 'reference', 'self-help')) AND i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')) OR ((i_category IN ('Men', 'Music', 'Women') AND i_class IN ('accessories', 'classical', 'fragrances', 'pants')) AND i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')))) ----------------------------------------------PhysicalOlapScan[item] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter(d_month_seq IN (1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query54.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query54.out index 87db40f47c..b4f27acdc1 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query54.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query54.out @@ -3,14 +3,14 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= (d_month_seq + 3)) @@ -18,66 +18,66 @@ PhysicalResultSink ------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= (d_month_seq + 1)) --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((my_customers.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF6 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_county = store.s_county) and (customer_address.ca_state = store.s_state)) otherCondition=() build RFs:RF3 s_county->[ca_county];RF4 s_state->[ca_state] ------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((my_customers.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 c_current_addr_sk->[ca_address_sk] --------------------------------------------------PhysicalProject ----------------------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF2 RF3 RF4 ---------------------------------------------------PhysicalDistribute +--------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------PhysicalProject ------------------------------------------------------hashAgg[GLOBAL] ---------------------------------------------------------PhysicalDistribute +--------------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------------hashAgg[LOCAL] ------------------------------------------------------------PhysicalProject --------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_customer_sk = cs_or_ws_sales.customer_sk)) otherCondition=() build RFs:RF1 customer_sk->[c_customer_sk] ----------------------------------------------------------------PhysicalProject ------------------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 -----------------------------------------------------------------PhysicalDistribute +----------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------------------------PhysicalProject --------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs_or_ws_sales.sold_date_sk = date_dim.d_date_sk)) otherCondition=() ----------------------------------------------------------------------PhysicalProject ------------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs_or_ws_sales.item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk,ws_item_sk] --------------------------------------------------------------------------PhysicalUnion -----------------------------------------------------------------------------PhysicalDistribute +----------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------------------------------------PhysicalProject --------------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 -----------------------------------------------------------------------------PhysicalDistribute +----------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------------------------------------PhysicalProject --------------------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 ---------------------------------------------------------------------------PhysicalDistribute +--------------------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------------------------------------PhysicalProject ------------------------------------------------------------------------------filter((item.i_category = 'Women') and (item.i_class = 'maternity')) --------------------------------------------------------------------------------PhysicalOlapScan[item] -----------------------------------------------------------------------PhysicalDistribute +----------------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------------------------------PhysicalProject --------------------------------------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) ----------------------------------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------PhysicalProject ----------------------------------------------------PhysicalOlapScan[store] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalAssertNumRows -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------hashAgg[GLOBAL] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------hashAgg[LOCAL] --------------------------------------------PhysicalProject ----------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) ------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalAssertNumRows ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------hashAgg[LOCAL] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query55.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query55.out index 315bb92b5a..db39db2da2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query55.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query55.out @@ -2,22 +2,22 @@ -- !ds_shape_55 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((item.i_manager_id = 100)) ----------------------------PhysicalOlapScan[item] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) --------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query56.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query56.out index 9dc5d65a80..dc83888ade 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query56.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query56.out @@ -2,91 +2,91 @@ -- !ds_shape_56 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ss_addr_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[item] apply RFs: RF0 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter(i_color IN ('cyan', 'green', 'powder')) ------------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------filter((customer_address.ca_gmt_offset = -6.00)) ----------------------------------PhysicalOlapScan[customer_address] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF7 cs_bill_addr_sk->[ca_address_sk] ----------------------------PhysicalProject ------------------------------filter((customer_address.ca_gmt_offset = -6.00)) --------------------------------PhysicalOlapScan[customer_address] apply RFs: RF7 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[item] apply RFs: RF4 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter(i_color IN ('cyan', 'green', 'powder')) ------------------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF11 ws_bill_addr_sk->[ca_address_sk] ----------------------------PhysicalProject ------------------------------filter((customer_address.ca_gmt_offset = -6.00)) --------------------------------PhysicalOlapScan[customer_address] apply RFs: RF11 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ws_item_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[item] apply RFs: RF8 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter(i_color IN ('cyan', 'green', 'powder')) ------------------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query57.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query57.out index fc6a269407..ea7531482a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query57.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query57.out @@ -8,44 +8,44 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] --------------PhysicalProject -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((call_center.cc_call_center_sk = catalog_sales.cs_call_center_sk)) otherCondition=() build RFs:RF2 cc_call_center_sk->[cs_call_center_sk] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[cs_item_sk] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((((date_dim.d_year = 1999) OR ((date_dim.d_year = 1998) AND (date_dim.d_moy = 12))) OR ((date_dim.d_year = 2000) AND (date_dim.d_moy = 1)))) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[call_center] --PhysicalResultSink ----PhysicalProject ------PhysicalTopN[MERGE_SORT] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((v1.cc_name = v1_lag.cc_name) and (v1.i_brand = v1_lag.i_brand) and (v1.i_category = v1_lag.i_category) and (v1.rn = expr_(rn + 1))) otherCondition=() ----------------hashJoin[INNER_JOIN] hashCondition=((v1.cc_name = v1_lead.cc_name) and (v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1))) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000) and (v2.avg_monthly_sales > 0.0000) and (v2.d_year = 1999)) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query58.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query58.out index 7e1bfc6edd..6404cfaf9d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query58.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query58.out @@ -3,96 +3,96 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((ss_items.item_id = cs_items.item_id)) otherCondition=((cast(cs_item_rev as DOUBLE) <= cast((1.1 * ss_item_rev) as DOUBLE)) and (cast(cs_item_rev as DOUBLE) <= cast((1.1 * ws_item_rev) as DOUBLE)) and (cast(cs_item_rev as DOUBLE) >= cast((0.9 * ss_item_rev) as DOUBLE)) and (cast(cs_item_rev as DOUBLE) >= cast((0.9 * ws_item_rev) as DOUBLE)) and (cast(ss_item_rev as DOUBLE) <= cast((1.1 * cs_item_rev) as DOUBLE)) and (cast(ss_item_rev as DOUBLE) >= cast((0.9 * cs_item_rev) as DOUBLE)) and (cast(ws_item_rev as DOUBLE) <= cast((1.1 * cs_item_rev) as DOUBLE)) and (cast(ws_item_rev as DOUBLE) >= cast((0.9 * cs_item_rev) as DOUBLE))) build RFs:RF13 item_id->[i_item_id] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF12 i_item_sk->[cs_item_sk] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF11 RF12 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF10 d_date->[d_date] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF10 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF9 d_week_seq->[d_week_seq] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalAssertNumRows -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------------------PhysicalProject --------------------------------------------------filter((date_dim.d_date = '2001-03-24')) ----------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[item] apply RFs: RF13 --------------hashJoin[INNER_JOIN] hashCondition=((ss_items.item_id = ws_items.item_id)) otherCondition=((cast(ss_item_rev as DOUBLE) <= cast((1.1 * ws_item_rev) as DOUBLE)) and (cast(ss_item_rev as DOUBLE) >= cast((0.9 * ws_item_rev) as DOUBLE)) and (cast(ws_item_rev as DOUBLE) <= cast((1.1 * ss_item_rev) as DOUBLE)) and (cast(ws_item_rev as DOUBLE) >= cast((0.9 * ss_item_rev) as DOUBLE))) build RFs:RF8 item_id->[i_item_id] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[ws_item_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ws_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalAssertNumRows -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((date_dim.d_date = '2001-03-24')) ------------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[item] apply RFs: RF8 ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalAssertNumRows -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((date_dim.d_date = '2001-03-24')) ------------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query59.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query59.out index ad908e5b8c..e43fadf4eb 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query59.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query59.out @@ -4,48 +4,48 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------PhysicalProject ------------------PhysicalOlapScan[store_sales] apply RFs: RF0 -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalProject ------PhysicalTopN[MERGE_SORT] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(d_week_seq2 - 52)) and (y.s_store_id1 = x.s_store_id2)) otherCondition=() -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((wss.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF4 s_store_sk->[ss_store_sk] ----------------------hashJoin[INNER_JOIN] hashCondition=((d.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF3 d_week_seq->[d_week_seq] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------------PhysicalProject ----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((d.d_month_seq <= 1207) and (d.d_month_seq >= 1196)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((wss.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] ----------------------hashJoin[INNER_JOIN] hashCondition=((d.d_week_seq = d_week_seq2)) otherCondition=() build RFs:RF1 d_week_seq->[d_week_seq] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------------PhysicalProject ----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((d.d_month_seq <= 1219) and (d.d_month_seq >= 1208)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query6.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query6.out index e889f088ec..000b390d02 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query6.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query6.out @@ -2,53 +2,53 @@ -- !ds_shape_6 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------filter((cnt >= 10)) ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[c_current_addr_sk] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((s.ss_item_sk = i.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((s.ss_sold_date_sk = d.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((d.d_month_seq = date_dim.d_month_seq)) otherCondition=() build RFs:RF1 d_month_seq->[d_month_seq] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalAssertNumRows -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------------------hashAgg[GLOBAL] -----------------------------------------------------PhysicalDistribute +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------------hashAgg[LOCAL] --------------------------------------------------------PhysicalProject ----------------------------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2002)) ------------------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------hashJoin[INNER_JOIN] hashCondition=((j.i_category = i.i_category)) otherCondition=((cast(i_current_price as DECIMALV3(38, 5)) > (1.2 * avg(cast(i_current_price as DECIMALV3(9, 4)))))) build RFs:RF0 i_category->[i_category] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[item] apply RFs: RF0 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------hashAgg[LOCAL] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[item] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query60.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query60.out index 753c5b9826..0f1627194c 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query60.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query60.out @@ -2,96 +2,96 @@ -- !ds_shape_60 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ss_addr_sk] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) --------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------filter((customer_address.ca_gmt_offset = -7.00)) --------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] apply RFs: RF0 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Children')) --------------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[cs_bill_addr_sk] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) --------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------filter((customer_address.ca_gmt_offset = -7.00)) --------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] apply RFs: RF4 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Children')) --------------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_bill_addr_sk] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 RF11 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) --------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------filter((customer_address.ca_gmt_offset = -7.00)) --------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] apply RFs: RF8 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Children')) --------------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query61.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query61.out index f55fd6c365..ee708bee9b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query61.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query61.out @@ -6,73 +6,73 @@ PhysicalResultSink ------PhysicalTopN[LOCAL_SORT] --------NestedLoopJoin[CROSS_JOIN] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF10 c_current_addr_sk->[ca_address_sk] --------------------PhysicalProject ----------------------filter((customer_address.ca_gmt_offset = -7.00)) ------------------------PhysicalOlapScan[customer_address] apply RFs: RF10 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF9 ss_customer_sk->[c_customer_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[customer] apply RFs: RF9 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF8 ss_item_sk->[i_item_sk] ------------------------------PhysicalProject --------------------------------filter((item.i_category = 'Jewelry')) ----------------------------------PhysicalOlapScan[item] apply RFs: RF8 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF7 ss_promo_sk->[p_promo_sk] ------------------------------------PhysicalProject --------------------------------------filter((((promotion.p_channel_dmail = 'Y') OR (promotion.p_channel_email = 'Y')) OR (promotion.p_channel_tv = 'Y'))) ----------------------------------------PhysicalOlapScan[promotion] apply RFs: RF7 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 ss_sold_date_sk->[d_date_sk] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) --------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF6 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------filter((store.s_gmt_offset = -7.00)) ----------------------------------------------------PhysicalOlapScan[store] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecReplicated] ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF4 c_current_addr_sk->[ca_address_sk] ----------------------PhysicalProject ------------------------filter((customer_address.ca_gmt_offset = -7.00)) --------------------------PhysicalOlapScan[customer_address] apply RFs: RF4 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 ss_item_sk->[i_item_sk] --------------------------PhysicalProject ----------------------------filter((item.i_category = 'Jewelry')) ------------------------------PhysicalOlapScan[item] apply RFs: RF3 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 ss_sold_date_sk->[d_date_sk] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) ------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF2 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 ss_customer_sk->[c_customer_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter((store.s_gmt_offset = -7.00)) ------------------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query62.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query62.out index 8569984037..82115bef29 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query62.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query62.out @@ -2,10 +2,10 @@ -- !ds_shape_62 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF3 w_warehouse_sk->[ws_warehouse_sk] @@ -15,17 +15,17 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_ship_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 RF3 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_month_seq <= 1205) and (date_dim.d_month_seq >= 1194)) --------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_site] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[ship_mode] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[warehouse] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query63.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query63.out index c25d311b2b..503b0e381a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query63.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query63.out @@ -2,16 +2,16 @@ -- !ds_shape_63 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000)) ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------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] @@ -21,15 +21,15 @@ PhysicalResultSink ------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((((i_category IN ('Books', 'Children', 'Electronics') AND i_class IN ('personal', 'portable', 'reference', 'self-help')) AND i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')) OR ((i_category IN ('Men', 'Music', 'Women') AND i_class IN ('accessories', 'classical', 'fragrances', 'pants')) AND i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')))) --------------------------------------------PhysicalOlapScan[item] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter(d_month_seq IN (1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192)) ----------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query64.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query64.out index d25cbc798c..e43185203b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query64.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query64.out @@ -4,7 +4,7 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) --PhysicalCteProducer ( cteId=CTEId#1 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((customer.c_first_shipto_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF19 d_date_sk->[c_first_shipto_date_sk] @@ -12,50 +12,50 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) ------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_first_sales_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF18 d_date_sk->[c_first_sales_date_sk] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=(( not (cd_marital_status = cd_marital_status))) build RFs:RF17 ss_customer_sk->[c_customer_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = ad2.ca_address_sk)) otherCondition=() build RFs:RF16 ca_address_sk->[c_current_addr_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() build RFs:RF15 cd_demo_sk->[c_current_cdemo_sk] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_hdemo_sk = hd2.hd_demo_sk)) otherCondition=() build RFs:RF14 hd_demo_sk->[c_current_hdemo_sk] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[customer] apply RFs: RF14 RF15 RF16 RF17 RF18 RF19 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((hd2.hd_income_band_sk = ib2.ib_income_band_sk)) otherCondition=() build RFs:RF13 ib_income_band_sk->[hd_income_band_sk] ------------------------------------------------PhysicalProject --------------------------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF13 -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------PhysicalProject ----------------------------------------------------PhysicalOlapScan[income_band] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[customer_demographics] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer_address] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF11 ss_item_sk->[sr_item_sk];RF12 ss_ticket_number->[sr_ticket_number] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_returns] apply RFs: RF11 RF12 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF10 p_promo_sk->[ss_promo_sk] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF9 ss_cdemo_sk->[cd_demo_sk] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF9 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = ad1.ca_address_sk)) otherCondition=() build RFs:RF8 ss_addr_sk->[ca_address_sk] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF8 -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[ss_item_sk] --------------------------------------------------PhysicalProject ----------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF6 s_store_sk->[ss_store_sk] @@ -69,11 +69,11 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) --------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[ss_item_sk] ----------------------------------------------------------------------PhysicalProject ------------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 RF4 RF6 RF7 RF10 -----------------------------------------------------------------------PhysicalDistribute +----------------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------------------------------PhysicalProject --------------------------------------------------------------------------filter((sale > (2 * refund))) ----------------------------------------------------------------------------hashAgg[GLOBAL] -------------------------------------------------------------------------------PhysicalDistribute +------------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------------------------------------------hashAgg[LOCAL] ----------------------------------------------------------------------------------PhysicalProject ------------------------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF0 cr_order_number->[cs_order_number];RF1 cr_item_sk->[cs_item_sk] @@ -81,43 +81,43 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) ----------------------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 --------------------------------------------------------------------------------------PhysicalProject ----------------------------------------------------------------------------------------PhysicalOlapScan[catalog_returns] -------------------------------------------------------------------PhysicalDistribute +------------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------------------------PhysicalProject ----------------------------------------------------------------------filter(d_year IN (2001, 2002)) ------------------------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------------------------------PhysicalDistribute +--------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------------------------PhysicalProject ------------------------------------------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF5 -----------------------------------------------------------PhysicalDistribute +----------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------------------PhysicalProject --------------------------------------------------------------PhysicalOlapScan[income_band] -------------------------------------------------------PhysicalDistribute +------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------------PhysicalProject ----------------------------------------------------------PhysicalOlapScan[store] ---------------------------------------------------PhysicalDistribute +--------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------------PhysicalProject ------------------------------------------------------filter((item.i_current_price <= 33.00) and (item.i_current_price >= 24.00) and i_color IN ('blanched', 'brown', 'burlywood', 'chocolate', 'drab', 'medium')) --------------------------------------------------------PhysicalOlapScan[item] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[promotion] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((cs1.item_sk = cs2.item_sk) and (cs1.store_name = cs2.store_name) and (cs1.store_zip = cs2.store_zip)) otherCondition=((cs2.cnt <= cs1.cnt)) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((cs1.syear = 2001)) --------------------PhysicalCteConsumer ( cteId=CTEId#1 ) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((cs2.syear = 2002)) --------------------PhysicalCteConsumer ( cteId=CTEId#1 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query65.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query65.out index 066064a71f..224a3efc91 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query65.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query65.out @@ -2,45 +2,45 @@ -- !ds_shape_65 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=() build RFs:RF4 s_store_sk->[ss_store_sk] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashJoin[INNER_JOIN] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DOUBLE) <= cast((0.1 * ave) as DOUBLE))) build RFs:RF2 ss_store_sk->[ss_store_sk] --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) ------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) ----------------------------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[item] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalProject ----------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query66.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query66.out index 1db12b83fa..cb455a6d2d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query66.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query66.out @@ -2,15 +2,15 @@ -- !ds_shape_66 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF3 w_warehouse_sk->[ws_warehouse_sk] @@ -21,24 +21,24 @@ PhysicalResultSink ------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF0 sm_ship_mode_sk->[ws_ship_mode_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 RF3 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter(sm_carrier IN ('GREAT EASTERN', 'LATVIAN')) --------------------------------------------PhysicalOlapScan[ship_mode] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_year = 1998)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((cast(t_time as BIGINT) <= 77621) and (time_dim.t_time >= 48821)) --------------------------------------PhysicalOlapScan[time_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[warehouse] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF7 w_warehouse_sk->[cs_warehouse_sk] @@ -49,19 +49,19 @@ PhysicalResultSink ------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF4 sm_ship_mode_sk->[cs_ship_mode_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 RF6 RF7 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter(sm_carrier IN ('GREAT EASTERN', 'LATVIAN')) --------------------------------------------PhysicalOlapScan[ship_mode] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_year = 1998)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((cast(t_time as BIGINT) <= 77621) and (time_dim.t_time >= 48821)) --------------------------------------PhysicalOlapScan[time_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[warehouse] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query67.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query67.out index bb8c8724c7..d069db662b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query67.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query67.out @@ -2,16 +2,16 @@ -- !ds_shape_67 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------filter((rk <= 100)) ----------PhysicalWindow ------------PhysicalPartitionTopN ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalPartitionTopN ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalRepeat ----------------------------PhysicalProject @@ -21,14 +21,14 @@ PhysicalResultSink ------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_month_seq <= 1217) and (date_dim.d_month_seq >= 1206)) --------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[item] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query68.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query68.out index 129724a5e4..8683dd548f 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query68.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query68.out @@ -2,26 +2,26 @@ -- !ds_shape_68 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) build RFs:RF5 c_current_addr_sk->[ca_address_sk] ------------PhysicalProject --------------PhysicalOlapScan[customer_address] apply RFs: RF5 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[customer] apply RFs: RF4 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ss_addr_sk->[ca_address_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] ----------------------------------PhysicalProject @@ -30,15 +30,15 @@ PhysicalResultSink ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter((date_dim.d_dom <= 2) and (date_dim.d_dom >= 1) and d_year IN (1998, 1999, 2000)) ------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter(s_city IN ('Five Points', 'Pleasant Hill')) --------------------------------------------PhysicalOlapScan[store] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter(((household_demographics.hd_dep_count = 8) OR (household_demographics.hd_vehicle_count = -1))) ----------------------------------------PhysicalOlapScan[household_demographics] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query69.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query69.out index 8d090b2347..a04010cc8f 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query69.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query69.out @@ -3,54 +3,54 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF7 c_customer_sk->[ss_customer_sk] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000)) --------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject ----------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[cs_ship_customer_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000)) ------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF3 c_current_cdemo_sk->[cd_demo_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF3 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ws_bill_customer_sk] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000)) --------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter(ca_state IN ('MI', 'TX', 'VA')) ------------------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query7.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query7.out index 379ab9b02e..11d575eff5 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query7.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query7.out @@ -2,14 +2,14 @@ -- !ds_shape_7 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF2 p_promo_sk->[ss_promo_sk] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] @@ -17,19 +17,19 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((customer_demographics.cd_education_status = 'College') and (customer_demographics.cd_gender = 'F') and (customer_demographics.cd_marital_status = 'W')) ------------------------------------PhysicalOlapScan[customer_demographics] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_year = 2001)) --------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter(((promotion.p_channel_email = 'N') OR (promotion.p_channel_event = 'N'))) ----------------------------PhysicalOlapScan[promotion] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query70.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query70.out index 4ae60b4f66..c571cc81f8 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query70.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query70.out @@ -3,15 +3,15 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalRepeat ----------------------------PhysicalProject @@ -20,35 +20,35 @@ PhysicalResultSink ----------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((d1.d_month_seq <= 1224) and (d1.d_month_seq >= 1213)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((store.s_state = tmp1.s_state)) otherCondition=() build RFs:RF2 s_state->[s_state] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store] apply RFs: RF2 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((ranking <= 5)) ------------------------------------------PhysicalWindow --------------------------------------------PhysicalPartitionTopN -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------PhysicalPartitionTopN --------------------------------------------------PhysicalProject ----------------------------------------------------hashAgg[GLOBAL] -------------------------------------------------------PhysicalDistribute +------------------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------------------hashAgg[LOCAL] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] --------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------------------------------PhysicalProject ------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------------------------------------------------PhysicalDistribute +----------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------------------------PhysicalProject --------------------------------------------------------------------filter((date_dim.d_month_seq <= 1224) and (date_dim.d_month_seq >= 1213)) ----------------------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------------------------------PhysicalDistribute +--------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------------------------PhysicalProject ------------------------------------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query71.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query71.out index 99e1f5621a..536aef9335 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query71.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query71.out @@ -2,50 +2,50 @@ -- !ds_shape_71 -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((tmp.time_sk = time_dim.t_time_sk)) otherCondition=() ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((tmp.sold_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ws_item_sk,cs_item_sk,ss_item_sk] --------------------------PhysicalUnion -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF3 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1998)) ----------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF3 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1998)) ----------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1998)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((item.i_manager_id = 1)) --------------------------------PhysicalOlapScan[item] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------filter(t_meal_time IN ('breakfast', 'dinner')) --------------------------PhysicalOlapScan[time_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query72.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query72.out index a034f3f4fb..3580c55fdf 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query72.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query72.out @@ -2,63 +2,63 @@ -- !ds_shape_72 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((catalog_returns.cr_item_sk = catalog_sales.cs_item_sk) and (catalog_returns.cr_order_number = catalog_sales.cs_order_number)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((warehouse.w_warehouse_sk = inventory.inv_warehouse_sk)) otherCondition=() build RFs:RF8 w_warehouse_sk->[inv_warehouse_sk] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = inventory.inv_item_sk) and (inventory.inv_date_sk = d2.d_date_sk)) otherCondition=((inventory.inv_quantity_on_hand < catalog_sales.cs_quantity)) build RFs:RF6 d_date_sk->[inv_date_sk];RF7 cs_item_sk->[inv_item_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalOlapScan[inventory] apply RFs: RF6 RF7 RF8 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_week_seq = d2.d_week_seq)) otherCondition=() build RFs:RF5 d_week_seq->[d_week_seq] ----------------------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[cs_item_sk] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_ship_date_sk = d3.d_date_sk)) otherCondition=((d3.d_date > days_add(d_date, INTERVAL 5 DAY))) build RFs:RF3 d_date_sk->[cs_ship_date_sk] ----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF2 cd_demo_sk->[cs_bill_cdemo_sk] -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ----------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF0 hd_demo_sk->[cs_bill_hdemo_sk] ------------------------------------------------------PhysicalProject --------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 -------------------------------------------------------PhysicalDistribute +------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------------------PhysicalProject ----------------------------------------------------------filter((household_demographics.hd_buy_potential = '501-1000')) ------------------------------------------------------------PhysicalOlapScan[household_demographics] -----------------------------------------------------PhysicalDistribute +----------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------------PhysicalProject --------------------------------------------------------filter((d1.d_year = 2002)) ----------------------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 -------------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((customer_demographics.cd_marital_status = 'W')) ------------------------------------------------------PhysicalOlapScan[customer_demographics] -----------------------------------------------PhysicalDistribute +----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------------PhysicalProject --------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[item] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[promotion] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[warehouse] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[catalog_returns] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query73.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query73.out index 8ab062bf77..77c0f30866 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query73.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query73.out @@ -2,16 +2,16 @@ -- !ds_shape_73 -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((dj.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk] ------------PhysicalProject --------------PhysicalOlapScan[customer] apply RFs: RF3 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------filter((dj.cnt <= 5) and (dj.cnt >= 1)) ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------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] @@ -20,15 +20,15 @@ PhysicalResultSink ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_dom <= 2) and (date_dim.d_dom >= 1) and d_year IN (2000, 2001, 2002)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1) and hd_buy_potential IN ('501-1000', 'Unknown')) ----------------------------------PhysicalOlapScan[household_demographics] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(s_county IN ('Barrow County', 'Daviess County', 'Fairfield County', 'Walker County')) --------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query74.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query74.out index 6961a52420..4e12ffe982 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query74.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query74.out @@ -4,57 +4,57 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((PULL_UP_UNIFIED_OUTPUT_ALIAS = customer.c_customer_sk)) otherCondition=() ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalUnion --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000)) --------------------------------PhysicalOlapScan[date_dim] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000)) --------------------------------PhysicalOlapScan[date_dim] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[customer] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=((if((year_total > 0), (year_total / year_total), NULL) > if((year_total > 0), (year_total / year_total), NULL))) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year = 1999) and (t_w_firstyear.year_total > 0)) --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=() ----------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((t_s_firstyear.sale_type = 's') and (t_s_firstyear.year = 1999) and (t_s_firstyear.year_total > 0)) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((t_s_secyear.sale_type = 's') and (t_s_secyear.year = 2000)) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000)) ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query75.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query75.out index 6bf1c9b168..154e525aa5 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query75.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query75.out @@ -3,13 +3,13 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalUnion -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------PhysicalProject ----------------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF2 cs_order_number->[cr_order_number];RF3 cs_item_sk->[cr_item_sk] ------------------------PhysicalProject @@ -20,15 +20,15 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Home')) --------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter(d_year IN (1998, 1999)) ----------------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------PhysicalProject ----------------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF6 ss_ticket_number->[sr_ticket_number];RF7 ss_item_sk->[sr_item_sk] ------------------------PhysicalProject @@ -39,15 +39,15 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Home')) --------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter(d_year IN (1998, 1999)) ----------------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------PhysicalProject ----------------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF10 ws_order_number->[wr_order_number];RF11 ws_item_sk->[wr_item_sk] ------------------------PhysicalProject @@ -58,24 +58,24 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF8 i_item_sk->[ws_item_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((item.i_category = 'Home')) --------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter(d_year IN (1998, 1999)) ----------------------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((curr_yr.i_brand_id = prev_yr.i_brand_id) and (curr_yr.i_category_id = prev_yr.i_category_id) and (curr_yr.i_class_id = prev_yr.i_class_id) and (curr_yr.i_manufact_id = prev_yr.i_manufact_id)) otherCondition=(((cast(cast(sales_cnt as DECIMALV3(17, 2)) as DECIMALV3(23, 8)) / cast(sales_cnt as DECIMALV3(17, 2))) < 0.900000)) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------filter((curr_yr.d_year = 1999)) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------filter((prev_yr.d_year = 1998)) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query76.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query76.out index 00c4bba1df..bbb934bf88 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query76.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query76.out @@ -2,48 +2,48 @@ -- !ds_shape_76 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalUnion -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 ss_item_sk->[i_item_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] apply RFs: RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 ss_sold_date_sk->[d_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(ss_hdemo_sk IS NULL) --------------------------------PhysicalOlapScan[store_sales] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 ws_item_sk->[i_item_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] apply RFs: RF3 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 ws_sold_date_sk->[d_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[date_dim] apply RFs: RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(ws_bill_addr_sk IS NULL) --------------------------------PhysicalOlapScan[web_sales] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF5 cs_item_sk->[i_item_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] apply RFs: RF5 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 cs_sold_date_sk->[d_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(cs_warehouse_sk IS NULL) --------------------------------PhysicalOlapScan[catalog_sales] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query77.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query77.out index 5a5a9c657a..921d3360fd 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query77.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query77.out @@ -2,11 +2,11 @@ -- !ds_shape_77 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalUnion @@ -14,7 +14,7 @@ PhysicalResultSink ----------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((ss.s_store_sk = sr.s_store_sk)) otherCondition=() ------------------------PhysicalProject --------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] @@ -22,16 +22,16 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ----------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store] ------------------------PhysicalProject --------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[sr_store_sk] @@ -39,37 +39,37 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF1 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ----------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store] --------------------PhysicalProject ----------------------NestedLoopJoin[CROSS_JOIN] ------------------------PhysicalProject --------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ------------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------hashAgg[GLOBAL] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashAgg[LOCAL] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cr_returned_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) --------------------------------------------PhysicalOlapScan[date_dim] @@ -77,7 +77,7 @@ PhysicalResultSink ----------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((ws.wp_web_page_sk = wr.wp_web_page_sk)) otherCondition=() ------------------------PhysicalProject --------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF9 wp_web_page_sk->[ws_web_page_sk] @@ -85,27 +85,27 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ----------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_page] ------------------------PhysicalProject --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF7 wp_web_page_sk->[wr_web_page_sk] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[wr_returned_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 RF7 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) --------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_page] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query78.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query78.out index 730493d316..a12f6215a0 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query78.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query78.out @@ -2,7 +2,7 @@ -- !ds_shape_78 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------filter(((coalesce(ws_qty, 0) > 0) OR (coalesce(cs_qty, 0) > 0))) @@ -11,14 +11,14 @@ PhysicalResultSink ----------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((ws.ws_customer_sk = ss.ss_customer_sk) and (ws.ws_item_sk = ss.ss_item_sk) and (ws.ws_sold_year = ss.ss_sold_year)) otherCondition=() ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((store_returns.sr_ticket_number = store_sales.ss_ticket_number) and (store_sales.ss_item_sk = store_returns.sr_item_sk)) otherCondition=() ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] @@ -26,14 +26,14 @@ PhysicalResultSink --------------------------------PhysicalOlapScan[store_returns] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((web_returns.wr_order_number = web_sales.ws_order_number) and (web_sales.ws_item_sk = web_returns.wr_item_sk)) otherCondition=() ------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] @@ -41,14 +41,14 @@ PhysicalResultSink --------------------------------PhysicalOlapScan[web_returns] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((catalog_returns.cr_order_number = catalog_sales.cs_order_number) and (catalog_sales.cs_item_sk = catalog_returns.cr_item_sk)) otherCondition=() --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_year = 2000)) ----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query79.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query79.out index c03fe95df9..8bed80b1f9 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query79.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query79.out @@ -2,14 +2,14 @@ -- !ds_shape_79 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((ms.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------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] @@ -18,19 +18,19 @@ PhysicalResultSink ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_dow = 1) and d_year IN (1998, 1999, 2000)) --------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter(((household_demographics.hd_dep_count = 5) OR (household_demographics.hd_vehicle_count > 4))) ----------------------------------PhysicalOlapScan[household_demographics] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((store.s_number_employees <= 295) and (store.s_number_employees >= 200)) --------------------------------PhysicalOlapScan[store] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query8.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query8.out index d3da9091cd..28aa0fc244 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query8.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query8.out @@ -2,10 +2,10 @@ -- !ds_shape_8 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((expr_substring(s_zip, 1, 2) = expr_substring(ca_zip, 1, 2))) otherCondition=() @@ -15,31 +15,31 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_qoy = 2) and (date_dim.d_year = 1998)) --------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalIntersect -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) ------------------------------PhysicalOlapScan[customer_address] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------filter((cnt > 10)) ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 c_current_addr_sk->[ca_address_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF0 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------filter((customer.c_preferred_cust_flag = 'Y')) ----------------------------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query80.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query80.out index c66f7e3679..be7df9a22b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query80.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query80.out @@ -2,17 +2,17 @@ -- !ds_shape_80 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalUnion --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF4 ss_item_sk->[sr_item_sk];RF5 ss_ticket_number->[sr_ticket_number] @@ -26,24 +26,24 @@ PhysicalResultSink ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalProject ------------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) --------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter((item.i_current_price > 50.00)) ------------------------------------------------PhysicalOlapScan[item] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((promotion.p_channel_tv = 'N')) --------------------------------------------PhysicalOlapScan[promotion] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_catalog_page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() build RFs:RF11 cp_catalog_page_sk->[cs_catalog_page_sk] @@ -57,24 +57,24 @@ PhysicalResultSink ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[cs_sold_date_sk] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF6 RF7 RF8 RF11 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalProject ------------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) --------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter((item.i_current_price > 50.00)) ------------------------------------------------PhysicalOlapScan[item] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((promotion.p_channel_tv = 'N')) --------------------------------------------PhysicalOlapScan[promotion] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[catalog_page] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF16 ws_item_sk->[wr_item_sk];RF17 ws_order_number->[wr_order_number] @@ -88,19 +88,19 @@ PhysicalResultSink ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF12 d_date_sk->[ws_sold_date_sk] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF12 RF13 RF14 RF15 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalProject ------------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) --------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter((item.i_current_price > 50.00)) ------------------------------------------------PhysicalOlapScan[item] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((promotion.p_channel_tv = 'N')) --------------------------------------------PhysicalOlapScan[promotion] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query81.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query81.out index 0506f62a76..7fcc5b06b2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query81.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query81.out @@ -4,46 +4,46 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[cr_returning_addr_sk] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cr_returned_date_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF0 RF1 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((date_dim.d_year = 2002)) ----------------------------PhysicalOlapScan[date_dim] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[customer_address] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE))) --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ctr_customer_sk] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[c_current_addr_sk] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer] apply RFs: RF2 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((customer_address.ca_state = 'CA')) ----------------------------PhysicalOlapScan[customer_address] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------------PhysicalProject --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query82.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query82.out index 1e05dc2e4c..83dc77f244 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query82.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query82.out @@ -2,16 +2,16 @@ -- !ds_shape_82 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] ------------------PhysicalProject --------------------PhysicalOlapScan[store_sales] apply RFs: RF2 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] ------------------------PhysicalProject @@ -19,11 +19,11 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------filter((inventory.inv_quantity_on_hand <= 500) and (inventory.inv_quantity_on_hand >= 100)) --------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((item.i_current_price <= 47.00) and (item.i_current_price >= 17.00) and i_manufact_id IN (138, 169, 339, 639)) ----------------------------------PhysicalOlapScan[item] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((date_dim.d_date <= '1999-09-07') and (date_dim.d_date >= '1999-07-09')) ------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query83.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query83.out index 0ab5a380ee..a9962b09d3 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query83.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query83.out @@ -3,87 +3,87 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((sr_items.item_id = cr_items.item_id)) otherCondition=() build RFs:RF13 item_id->[i_item_id] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF12 cr_item_sk->[i_item_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[item] apply RFs: RF12 RF13 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[cr_returned_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF11 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF10 d_date->[d_date] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF10 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF9 d_week_seq->[d_week_seq] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 -------------------------------------------PhysicalDistribute +------------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------------PhysicalProject ----------------------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) ------------------------------------------------PhysicalOlapScan[date_dim] --------------hashJoin[INNER_JOIN] hashCondition=((sr_items.item_id = wr_items.item_id)) otherCondition=() build RFs:RF8 item_id->[i_item_id] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[sr_item_sk] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[sr_returned_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 RF7 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalProject ------------------------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) --------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[item] apply RFs: RF8 ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 wr_item_sk->[i_item_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[item] apply RFs: RF3 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[wr_returned_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[web_returns] apply RFs: RF2 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalProject ------------------------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) --------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query84.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query84.out index 113c710131..5bb63bd26a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query84.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query84.out @@ -2,33 +2,33 @@ -- !ds_shape_84 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF4 cd_demo_sk->[sr_cdemo_sk] ------------PhysicalProject --------------PhysicalOlapScan[store_returns] apply RFs: RF4 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF3 c_current_cdemo_sk->[cd_demo_sk] ------------------PhysicalProject --------------------PhysicalOlapScan[customer_demographics] apply RFs: RF3 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[c_current_hdemo_sk] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer] apply RFs: RF1 RF2 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((customer_address.ca_city = 'Oakwood')) ----------------------------------PhysicalOlapScan[customer_address] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------hashJoin[INNER_JOIN] hashCondition=((income_band.ib_income_band_sk = household_demographics.hd_income_band_sk)) otherCondition=() build RFs:RF0 ib_income_band_sk->[hd_income_band_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((cast(ib_upper_bound as BIGINT) <= 55806) and (income_band.ib_lower_bound >= 5806)) ----------------------------------PhysicalOlapScan[income_band] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query85.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query85.out index 0918c3a587..dc257985c6 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query85.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query85.out @@ -2,11 +2,11 @@ -- !ds_shape_85 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((reason.r_reason_sk = web_returns.wr_reason_sk)) otherCondition=() build RFs:RF9 r_reason_sk->[wr_reason_sk] @@ -16,13 +16,13 @@ PhysicalResultSink --------------------------hashJoin[INNER_JOIN] hashCondition=((cd1.cd_education_status = cd2.cd_education_status) and (cd1.cd_marital_status = cd2.cd_marital_status) and (cd2.cd_demo_sk = web_returns.wr_returning_cdemo_sk)) otherCondition=() build RFs:RF5 cd_marital_status->[cd_marital_status];RF6 cd_education_status->[cd_education_status];RF7 wr_returning_cdemo_sk->[cd_demo_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF5 RF6 RF7 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk)) otherCondition=((((((cd1.cd_marital_status = 'M') AND (cd1.cd_education_status = '4 yr Degree')) AND ((web_sales.ws_sales_price >= 100.00) AND (web_sales.ws_sales_price <= 150.00))) OR (((cd1.cd_marital_status = 'S') AND (cd1.cd_education_status = 'Secondary')) AND ((web_sales.ws_sales_price >= 50.00) AND (web_sales.ws_sales_price <= 100.00)))) OR (((cd1.cd_marital_status = 'W') AND (cd1.cd_education_status = 'Advanced Degree')) AND ((web_sales.ws_sales_price >= 150.00) AND (web_sales.ws_sales_price <= 200.00))))) build RFs:RF4 wr_refunded_cdemo_sk->[cd_demo_sk] ----------------------------------PhysicalProject ------------------------------------filter(((((cd1.cd_marital_status = 'M') AND (cd1.cd_education_status = '4 yr Degree')) OR ((cd1.cd_marital_status = 'S') AND (cd1.cd_education_status = 'Secondary'))) OR ((cd1.cd_marital_status = 'W') AND (cd1.cd_education_status = 'Advanced Degree')))) --------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF4 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = web_returns.wr_refunded_addr_sk)) otherCondition=((((ca_state IN ('DE', 'FL', 'TX') AND ((web_sales.ws_net_profit >= 100.00) AND (web_sales.ws_net_profit <= 200.00))) OR (ca_state IN ('ID', 'IN', 'ND') AND ((web_sales.ws_net_profit >= 150.00) AND (web_sales.ws_net_profit <= 300.00)))) OR (ca_state IN ('IL', 'MT', 'OH') AND ((web_sales.ws_net_profit >= 50.00) AND (web_sales.ws_net_profit <= 250.00))))) build RFs:RF3 ca_address_sk->[wr_refunded_addr_sk] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF1 ws_item_sk->[wr_item_sk];RF2 ws_order_number->[wr_order_number] @@ -32,18 +32,18 @@ PhysicalResultSink --------------------------------------------PhysicalProject ----------------------------------------------filter((web_sales.ws_net_profit <= 300.00) and (web_sales.ws_net_profit >= 50.00) and (web_sales.ws_sales_price <= 200.00) and (web_sales.ws_sales_price >= 50.00)) ------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF8 ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------------PhysicalProject ------------------------------------------------filter((date_dim.d_year = 2000)) --------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter(((ca_state IN ('DE', 'FL', 'TX') OR ca_state IN ('ID', 'IN', 'ND')) OR ca_state IN ('IL', 'MT', 'OH')) and (customer_address.ca_country = 'United States')) --------------------------------------------PhysicalOlapScan[customer_address] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_page] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[reason] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query86.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query86.out index 66864e9bb0..26d3bf33cb 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query86.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query86.out @@ -3,29 +3,29 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalRepeat ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ws_item_sk] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalProject ------------------------------------------filter((d1.d_month_seq <= 1235) and (d1.d_month_seq >= 1224)) --------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query87.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query87.out index d2b4fed520..c0210a316c 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query87.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query87.out @@ -2,62 +2,62 @@ -- !ds_shape_87 -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------PhysicalExcept ------------PhysicalProject --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) ------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[customer] ------------PhysicalProject --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) ------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[customer] ------------PhysicalProject --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) ------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[customer] 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 71b7c40ab2..9225360005 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 @@ -10,7 +10,7 @@ PhysicalResultSink --------------NestedLoopJoin[CROSS_JOIN] ----------------NestedLoopJoin[CROSS_JOIN] ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------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] @@ -19,21 +19,21 @@ PhysicalResultSink --------------------------------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 +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) ----------------------------------------PhysicalOlapScan[time_dim] ---------------------------------PhysicalDistribute +--------------------------------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 +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((store.s_store_name = 'ese')) ----------------------------------PhysicalOlapScan[store] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------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] @@ -42,21 +42,21 @@ PhysicalResultSink ----------------------------------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 +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute < 30)) ------------------------------------------PhysicalOlapScan[time_dim] -----------------------------------PhysicalDistribute +----------------------------------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 +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((store.s_store_name = 'ese')) ------------------------------------PhysicalOlapScan[store] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------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] @@ -65,21 +65,21 @@ PhysicalResultSink --------------------------------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: RF15 RF16 RF17 -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute >= 30)) ----------------------------------------PhysicalOlapScan[time_dim] ---------------------------------PhysicalDistribute +--------------------------------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 +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((store.s_store_name = 'ese')) ----------------------------------PhysicalOlapScan[store] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------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] @@ -88,21 +88,21 @@ PhysicalResultSink ------------------------------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: RF12 RF13 RF14 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute < 30)) --------------------------------------PhysicalOlapScan[time_dim] -------------------------------PhysicalDistribute +------------------------------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 +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((store.s_store_name = 'ese')) --------------------------------PhysicalOlapScan[store] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------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] @@ -111,21 +111,21 @@ PhysicalResultSink ----------------------------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: RF9 RF10 RF11 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute >= 30)) ------------------------------------PhysicalOlapScan[time_dim] -----------------------------PhysicalDistribute +----------------------------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 +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((store.s_store_name = 'ese')) ------------------------------PhysicalOlapScan[store] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecReplicated] ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------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] @@ -134,21 +134,21 @@ PhysicalResultSink --------------------------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: RF6 RF7 RF8 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute < 30)) ----------------------------------PhysicalOlapScan[time_dim] ---------------------------PhysicalDistribute +--------------------------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 +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((store.s_store_name = 'ese')) ----------------------------PhysicalOlapScan[store] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------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] @@ -157,21 +157,21 @@ PhysicalResultSink ------------------------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: RF3 RF4 RF5 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute >= 30)) --------------------------------PhysicalOlapScan[time_dim] -------------------------PhysicalDistribute +------------------------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 +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((store.s_store_name = 'ese')) --------------------------PhysicalOlapScan[store] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecReplicated] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------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] @@ -180,15 +180,15 @@ PhysicalResultSink ----------------------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 +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((time_dim.t_hour = 12) and (time_dim.t_minute < 30)) ------------------------------PhysicalOlapScan[time_dim] -----------------------PhysicalDistribute +----------------------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 +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((store.s_store_name = 'ese')) ------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query89.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query89.out index f31cf2f6db..032da35b51 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query89.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query89.out @@ -3,16 +3,16 @@ PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject ------------filter((if(( not (avg_monthly_sales = 0.0000)), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000)) --------------PhysicalWindow ----------------PhysicalQuickSort[LOCAL_SORT] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------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] @@ -22,15 +22,15 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter(((i_category IN ('Electronics', 'Jewelry', 'Shoes') AND i_class IN ('athletic', 'portable', 'semi-precious')) OR (i_category IN ('Men', 'Music', 'Women') AND i_class IN ('accessories', 'maternity', 'rock')))) ----------------------------------------------PhysicalOlapScan[item] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_year = 1999)) ------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query9.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query9.out index 5b3610bc2e..6f64f57ee2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query9.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query9.out @@ -1,7 +1,7 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_9 -- PhysicalResultSink ---PhysicalDistribute +--PhysicalDistribute[DistributionSpecGather] ----PhysicalProject ------NestedLoopJoin[CROSS_JOIN] --------NestedLoopJoin[CROSS_JOIN] @@ -22,122 +22,122 @@ PhysicalResultSink --------------------------------------PhysicalProject ----------------------------------------filter((reason.r_reason_sk = 1)) ------------------------------------------PhysicalOlapScan[reason] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------------PhysicalAssertNumRows ------------------------------------------hashAgg[GLOBAL] ---------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------------hashAgg[LOCAL] ------------------------------------------------PhysicalProject --------------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ----------------------------------------------------PhysicalOlapScan[store_sales] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalAssertNumRows --------------------------------------hashAgg[GLOBAL] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------------hashAgg[LOCAL] --------------------------------------------PhysicalProject ----------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ------------------------------------------------PhysicalOlapScan[store_sales] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalAssertNumRows ------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute +--------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ----------------------------------------------PhysicalOlapScan[store_sales] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalAssertNumRows ----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------hashAgg[LOCAL] ----------------------------------------PhysicalProject ------------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21)) --------------------------------------------PhysicalOlapScan[store_sales] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalAssertNumRows --------------------------------hashAgg[GLOBAL] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------hashAgg[LOCAL] --------------------------------------PhysicalProject ----------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21)) ------------------------------------------PhysicalOlapScan[store_sales] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalAssertNumRows ------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject --------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21)) ----------------------------------------PhysicalOlapScan[store_sales] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalAssertNumRows ----------------------------hashAgg[GLOBAL] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------hashAgg[LOCAL] ----------------------------------PhysicalProject ------------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41)) --------------------------------------PhysicalOlapScan[store_sales] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalAssertNumRows --------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject ----------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41)) ------------------------------------PhysicalOlapScan[store_sales] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalAssertNumRows ------------------------hashAgg[GLOBAL] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject --------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41)) ----------------------------------PhysicalOlapScan[store_sales] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalAssertNumRows ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecGather] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61)) --------------------------------PhysicalOlapScan[store_sales] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalAssertNumRows --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecGather] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61)) ------------------------------PhysicalOlapScan[store_sales] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------PhysicalAssertNumRows ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecGather] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61)) ----------------------------PhysicalOlapScan[store_sales] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalAssertNumRows ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecGather] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) --------------------------PhysicalOlapScan[store_sales] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecReplicated] ------------PhysicalAssertNumRows --------------hashAgg[GLOBAL] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecGather] ------------------hashAgg[LOCAL] --------------------PhysicalProject ----------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) ------------------------PhysicalOlapScan[store_sales] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecReplicated] ----------PhysicalAssertNumRows ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) 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 7f18c83f83..b74a499038 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 @@ -6,7 +6,7 @@ PhysicalResultSink ------PhysicalProject --------NestedLoopJoin[CROSS_JOIN] ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF5 hd_demo_sk->[ws_ship_hdemo_sk] @@ -15,21 +15,21 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] 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] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) --------------------------------PhysicalOlapScan[web_page] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((time_dim.t_hour <= 11) and (time_dim.t_hour >= 10)) ------------------------------PhysicalOlapScan[time_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((household_demographics.hd_dep_count = 2)) --------------------------PhysicalOlapScan[household_demographics] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecReplicated] ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ws_ship_hdemo_sk] @@ -38,15 +38,15 @@ PhysicalResultSink --------------------------hashJoin[INNER_JOIN] 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] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) ----------------------------------PhysicalOlapScan[web_page] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((time_dim.t_hour <= 17) and (time_dim.t_hour >= 16)) --------------------------------PhysicalOlapScan[time_dim] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((household_demographics.hd_dep_count = 2)) ----------------------------PhysicalOlapScan[household_demographics] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query91.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query91.out index 1ea9610471..ea1ed7efbd 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query91.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query91.out @@ -2,46 +2,46 @@ -- !ds_shape_91 -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF5 c_current_addr_sk->[ca_address_sk] --------------------PhysicalProject ----------------------filter((customer_address.ca_gmt_offset = -6.00)) ------------------------PhysicalOlapScan[customer_address] apply RFs: RF5 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF4 cc_call_center_sk->[cr_call_center_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returning_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cr_returning_customer_sk] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cr_returned_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 RF3 RF4 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001)) ------------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashJoin[INNER_JOIN] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[c_current_hdemo_sk] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[c_current_cdemo_sk] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF1 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------filter((((customer_demographics.cd_marital_status = 'M') AND (customer_demographics.cd_education_status = 'Unknown')) OR ((customer_demographics.cd_marital_status = 'W') AND (customer_demographics.cd_education_status = 'Advanced Degree')))) ------------------------------------------PhysicalOlapScan[customer_demographics] -----------------------------------PhysicalDistribute +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject --------------------------------------filter((hd_buy_potential like '1001-5000%')) ----------------------------------------PhysicalOlapScan[household_demographics] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[call_center] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query92.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query92.out index cb095c4426..03fe8c943d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query92.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query92.out @@ -4,24 +4,24 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalProject --------------filter((cast(ws_ext_discount_amt as DECIMALV3(38, 5)) > (1.3 * avg(cast(ws_ext_discount_amt as DECIMALV3(9, 4))) OVER(PARTITION BY i_item_sk)))) ----------------PhysicalWindow ------------------PhysicalQuickSort[LOCAL_SORT] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((item.i_manufact_id = 320)) ------------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '2002-05-27') and (date_dim.d_date >= '2002-02-26')) --------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query93.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query93.out index a94e70c914..e3e4a1f5b8 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query93.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query93.out @@ -2,10 +2,10 @@ -- !ds_shape_93 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_item_sk = store_sales.ss_item_sk) and (store_returns.sr_ticket_number = store_sales.ss_ticket_number)) otherCondition=() build RFs:RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] @@ -14,7 +14,7 @@ PhysicalResultSink ------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_reason_sk = reason.r_reason_sk)) otherCondition=() build RFs:RF0 r_reason_sk->[sr_reason_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[store_returns] apply RFs: RF0 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((reason.r_reason_desc = 'duplicate purchase')) --------------------------PhysicalOlapScan[reason] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query94.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query94.out index 4c4f311c28..05fda5a654 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query94.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query94.out @@ -4,34 +4,34 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] ------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[DISTINCT_LOCAL] ------------hashAgg[GLOBAL] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF4 ws_order_number->[ws_order_number] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 --------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() build RFs:RF3 ws_order_number->[wr_order_number] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[web_returns] apply RFs: RF3 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_sk] --------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_ship_date_sk] ----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((customer_address.ca_state = 'OK')) ------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) ----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((web_site.web_company_name = 'pri')) --------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query95.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query95.out index acee79a67e..4973a40f07 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query95.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query95.out @@ -4,17 +4,17 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF6 RF7 ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecHash] ----------PhysicalProject ------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[DISTINCT_GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecGather] ------------hashAgg[DISTINCT_LOCAL] --------------hashAgg[GLOBAL] ----------------hashAgg[LOCAL] @@ -22,31 +22,31 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF5 wr_order_number->[ws_order_number];RF7 wr_order_number->[ws_order_number,ws_order_number] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[web_returns] ----------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF4 ws_order_number->[ws_order_number];RF6 ws_order_number->[ws_order_number,ws_order_number] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] ----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_ship_date_sk] ------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((customer_address.ca_state = 'NC')) --------------------------------------PhysicalOlapScan[customer_address] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) ------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((web_site.web_company_name = 'pri')) ----------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query96.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query96.out index daf0b67a0e..4f48a46df2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query96.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query96.out @@ -4,7 +4,7 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------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] @@ -13,15 +13,15 @@ PhysicalResultSink --------------------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 +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) ----------------------------PhysicalOlapScan[time_dim] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((household_demographics.hd_dep_count = 3)) --------------------------PhysicalOlapScan[household_demographics] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((store.s_store_name = 'ese')) ----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query97.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query97.out index 7b8832c172..c8dd9bf8bd 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query97.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query97.out @@ -4,31 +4,31 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] ------hashAgg[GLOBAL] ---------PhysicalDistribute +--------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[FULL_OUTER_JOIN] hashCondition=((ssci.customer_sk = csci.customer_sk) and (ssci.item_sk = csci.item_sk)) otherCondition=() ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_month_seq <= 1225) and (date_dim.d_month_seq >= 1214)) ----------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_month_seq <= 1225) and (date_dim.d_month_seq >= 1214)) ----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query98.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query98.out index d75c1d9409..1d4c4a216c 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query98.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query98.out @@ -2,26 +2,26 @@ -- !ds_shape_98 -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_date <= '2002-06-19') and (date_dim.d_date >= '2002-05-20')) ------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------filter(i_category IN ('Music', 'Shoes', 'Sports')) --------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query99.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query99.out index 114e460066..46f26c2f1f 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query99.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query99.out @@ -2,10 +2,10 @@ -- !ds_shape_99 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF3 w_warehouse_sk->[cs_warehouse_sk] @@ -15,17 +15,17 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_ship_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 RF3 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_month_seq <= 1235) and (date_dim.d_month_seq >= 1224)) --------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[call_center] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[ship_mode] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[warehouse] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q1.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q1.out index 3eb68a3c45..22f0777694 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q1.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q1.out @@ -2,10 +2,10 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------filter((lineitem.l_shipdate <= '1998-09-02')) diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q10.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q10.out index d050117d9d..dbdd14a807 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q10.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q10.out @@ -2,11 +2,11 @@ -- !select -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_nationkey = nation.n_nationkey)) otherCondition=() @@ -15,17 +15,17 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------filter((lineitem.l_returnflag = 'R')) ----------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------filter((orders.o_orderdate < '1994-01-01') and (orders.o_orderdate >= '1993-10-01')) ------------------------------------PhysicalOlapScan[orders] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q11.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q11.out index b596d6c5d7..dbdfa6be6e 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q11.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q11.out @@ -2,43 +2,43 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------NestedLoopJoin[INNER_JOIN](cast(value as DOUBLE) > cast((sum((ps_supplycost * cast(ps_availqty as DECIMALV3(10, 0)))) * 0.000002) as DOUBLE)) ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF3 n_nationkey->[s_nationkey] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF2 s_suppkey->[ps_suppkey] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[partsupp] apply RFs: RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[supplier] apply RFs: RF3 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((nation.n_name = 'GERMANY')) ----------------------------PhysicalOlapScan[nation] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecGather] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF1 n_nationkey->[s_nationkey] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF0 s_suppkey->[ps_suppkey] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[supplier] apply RFs: RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((nation.n_name = 'GERMANY')) --------------------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q12.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q12.out index c5e8f9cd43..64aa1f7676 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q12.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q12.out @@ -2,10 +2,10 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF0 l_orderkey->[o_orderkey] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q13.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q13.out index dc58893d9c..61c8585eff 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q13.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q13.out @@ -2,20 +2,20 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter(( not (o_comment like '%special%requests%'))) ----------------------------PhysicalOlapScan[orders] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q14.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q14.out index b7891c0fb3..e2b29f0f61 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q14.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q14.out @@ -3,15 +3,15 @@ PhysicalResultSink --PhysicalProject ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------hashAgg[LOCAL] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_partkey = part.p_partkey)) otherCondition=() ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((lineitem.l_shipdate < '1995-10-01') and (lineitem.l_shipdate >= '1995-09-01')) --------------------PhysicalOlapScan[lineitem] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------PhysicalOlapScan[part] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q15.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q15.out index 041b0cf86f..66fefac519 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q15.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q15.out @@ -2,30 +2,30 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((supplier.s_suppkey = revenue0.supplier_no)) otherCondition=() ------------hashJoin[INNER_JOIN] hashCondition=((revenue0.total_revenue = max(total_revenue))) otherCondition=() --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------filter((lineitem.l_shipdate < '1996-04-01') and (lineitem.l_shipdate >= '1996-01-01')) --------------------------PhysicalOlapScan[lineitem] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecGather] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashAgg[GLOBAL] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject --------------------------------filter((lineitem.l_shipdate < '1996-04-01') and (lineitem.l_shipdate >= '1996-01-01')) ----------------------------------PhysicalOlapScan[lineitem] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------PhysicalOlapScan[supplier] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q16.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q16.out index 01c093244e..bbc51abcfe 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q16.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q16.out @@ -2,17 +2,17 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = partsupp.ps_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] ------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() --------------------PhysicalProject ----------------------PhysicalOlapScan[partsupp] apply RFs: RF0 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((s_comment like '%Customer%Complaints%')) --------------------------PhysicalOlapScan[supplier] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q17.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q17.out index 7ea128caa6..4cbe93fe47 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q17.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q17.out @@ -3,7 +3,7 @@ PhysicalResultSink --PhysicalProject ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------hashAgg[LOCAL] ----------PhysicalProject ------------filter((cast(l_quantity as DECIMALV3(38, 5)) < (0.2 * avg(cast(l_quantity as DECIMALV3(17, 4))) OVER(PARTITION BY p_partkey)))) @@ -11,10 +11,10 @@ PhysicalResultSink ----------------PhysicalQuickSort[LOCAL_SORT] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF0 p_partkey->[l_partkey] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((part.p_brand = 'Brand#23') and (part.p_container = 'MED BOX')) ----------------------------PhysicalOlapScan[part] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q18.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q18.out index eaee8a42ed..6fd7367ff3 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q18.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q18.out @@ -2,17 +2,17 @@ -- !select -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[LOCAL] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF2 o_orderkey->[l_orderkey] --------------PhysicalProject ----------------PhysicalOlapScan[lineitem] apply RFs: RF2 ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF0 l_orderkey->[o_orderkey] ------------------------PhysicalProject --------------------------PhysicalOlapScan[orders] apply RFs: RF0 @@ -21,7 +21,7 @@ PhysicalResultSink ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[lineitem] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q19.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q19.out index 05b2551171..46cb3528ca 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q19.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q19.out @@ -2,15 +2,15 @@ -- !select -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=(((((((part.p_brand = 'Brand#12') AND p_container IN ('SM BOX', 'SM CASE', 'SM PACK', 'SM PKG')) AND ((lineitem.l_quantity >= 1.00) AND (lineitem.l_quantity <= 11.00))) AND (part.p_size <= 5)) OR ((((part.p_brand = 'Brand#23') AND p_container IN ('MED BAG', 'MED BOX', 'MED PACK', 'MED PKG')) AND ((lineitem.l_quantity >= 10.00) AND (lineitem.l_quantity <= 20.00))) AND (part.p_size <= 10))) OR ((((part.p_brand = 'Brand#34') AND p_container IN ('LG BOX', 'LG CASE', 'LG PACK', 'LG PKG')) AND ((lineitem.l_quantity >= 20.00) AND (lineitem.l_quantity <= 30.00))) AND (part.p_size <= 15)))) build RFs:RF0 p_partkey->[l_partkey] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------filter((lineitem.l_quantity <= 30.00) and (lineitem.l_quantity >= 1.00) and (lineitem.l_shipinstruct = 'DELIVER IN PERSON') and l_shipmode IN ('AIR REG', 'AIR')) ------------------PhysicalOlapScan[lineitem] apply RFs: RF0 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------filter((((((part.p_brand = 'Brand#12') AND p_container IN ('SM BOX', 'SM CASE', 'SM PACK', 'SM PKG')) AND (part.p_size <= 5)) OR (((part.p_brand = 'Brand#23') AND p_container IN ('MED BAG', 'MED BOX', 'MED PACK', 'MED PKG')) AND (part.p_size <= 10))) OR (((part.p_brand = 'Brand#34') AND p_container IN ('LG BOX', 'LG CASE', 'LG PACK', 'LG PKG')) AND (part.p_size <= 15))) and (part.p_size >= 1)) ------------------PhysicalOlapScan[part] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q2.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q2.out index e6b4da4096..b0d9d0c5a0 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q2.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q2.out @@ -2,20 +2,20 @@ -- !select -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------filter((partsupp.ps_supplycost = min(ps_supplycost) OVER(PARTITION BY p_partkey))) ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((nation.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF3 r_regionkey->[n_regionkey] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF2 n_nationkey->[s_nationkey] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_suppkey = partsupp.ps_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[ps_suppkey] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = partsupp.ps_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] ------------------------------------PhysicalProject @@ -23,12 +23,12 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((p_type like '%BRASS') and (part.p_size = 15)) ----------------------------------------PhysicalOlapScan[part] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalOlapScan[supplier] apply RFs: RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[nation] apply RFs: RF3 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((region.r_name = 'EUROPE')) ----------------------------PhysicalOlapScan[region] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q20-rewrite.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q20-rewrite.out index 525bc7be55..12ae602cc2 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q20-rewrite.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q20-rewrite.out @@ -2,33 +2,33 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF4 n_nationkey->[s_nationkey] ------------PhysicalProject --------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((supplier.s_suppkey = t3.ps_suppkey)) otherCondition=() build RFs:RF3 s_suppkey->[ps_suppkey] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((t2.l_partkey = t1.ps_partkey) and (t2.l_suppkey = t1.ps_suppkey)) otherCondition=((cast(ps_availqty as DECIMALV3(38, 3)) > t2.l_q)) build RFs:RF1 ps_partkey->[l_partkey];RF2 ps_suppkey->[l_suppkey] ----------------------PhysicalProject ------------------------hashAgg[GLOBAL] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject --------------------------------filter((lineitem.l_shipdate < '1995-01-01') and (lineitem.l_shipdate >= '1994-01-01')) ----------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 RF2 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((partsupp.ps_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 RF3 --------------------------PhysicalProject ----------------------------filter((p_name like 'forest%')) ------------------------------PhysicalOlapScan[part] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[supplier] apply RFs: RF4 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalProject ----------------filter((nation.n_name = 'CANADA')) ------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q20.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q20.out index 1292e0468f..0be3690736 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q20.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q20.out @@ -2,32 +2,32 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF4 n_nationkey->[s_nationkey] ------------PhysicalProject --------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((supplier.s_suppkey = partsupp.ps_suppkey)) otherCondition=() build RFs:RF3 s_suppkey->[ps_suppkey] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_partkey = partsupp.ps_partkey) and (lineitem.l_suppkey = partsupp.ps_suppkey)) otherCondition=((cast(ps_availqty as DECIMALV3(38, 3)) > (0.5 * sum(l_quantity)))) build RFs:RF1 ps_partkey->[l_partkey];RF2 ps_suppkey->[l_suppkey] ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------filter((lineitem.l_shipdate < '1995-01-01') and (lineitem.l_shipdate >= '1994-01-01')) --------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 RF2 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((partsupp.ps_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 RF3 --------------------------PhysicalProject ----------------------------filter((p_name like 'forest%')) ------------------------------PhysicalOlapScan[part] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[supplier] apply RFs: RF4 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalProject ----------------filter((nation.n_name = 'CANADA')) ------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q21.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q21.out index d744f43188..44dc87ff59 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q21.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q21.out @@ -2,16 +2,16 @@ -- !select -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF4 n_nationkey->[s_nationkey] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_suppkey = l1.l_suppkey)) otherCondition=() build RFs:RF3 s_suppkey->[l_suppkey] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((orders.o_orderkey = l1.l_orderkey)) otherCondition=() build RFs:RF2 o_orderkey->[l_orderkey] --------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((l2.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF1 l_orderkey->[l_orderkey] ----------------------------PhysicalProject @@ -26,10 +26,10 @@ PhysicalResultSink --------------------------PhysicalProject ----------------------------filter((orders.o_orderstatus = 'F')) ------------------------------PhysicalOlapScan[orders] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[supplier] apply RFs: RF4 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((nation.n_name = 'SAUDI ARABIA')) ------------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q22.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q22.out index 22caa65035..69c64e0e5b 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q22.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q22.out @@ -2,24 +2,24 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((orders.o_custkey = customer.c_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[orders] apply RFs: RF0 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------NestedLoopJoin[INNER_JOIN](cast(c_acctbal as DECIMALV3(38, 4)) > avg(cast(c_acctbal as DECIMALV3(17, 4)))) ----------------------PhysicalProject ------------------------filter(substring(c_phone, 1, 2) IN ('13', '17', '18', '23', '29', '30', '31')) --------------------------PhysicalOlapScan[customer] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------hashAgg[GLOBAL] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject --------------------------------filter((customer.c_acctbal > 0.00) and substring(c_phone, 1, 2) IN ('13', '17', '18', '23', '29', '30', '31')) diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q3.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q3.out index c9e0acbfeb..829d5394c8 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q3.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q3.out @@ -2,7 +2,7 @@ -- !select -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[LOCAL] @@ -11,14 +11,14 @@ PhysicalResultSink ----------------PhysicalProject ------------------filter((lineitem.l_shipdate > '1995-03-15')) --------------------PhysicalOlapScan[lineitem] apply RFs: RF1 -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((orders.o_orderdate < '1995-03-15')) ----------------------------PhysicalOlapScan[orders] apply RFs: RF0 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((customer.c_mktsegment = 'BUILDING')) ----------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q4.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q4.out index 551ae531e9..6142816a8a 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q4.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q4.out @@ -2,10 +2,10 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF0 o_orderkey->[l_orderkey] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q5.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q5.out index 50e1f5b76e..7a89beaeb2 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q5.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q5.out @@ -2,10 +2,10 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((nation.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF5 r_regionkey->[n_regionkey] @@ -17,23 +17,23 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 RF2 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------filter((orders.o_orderdate < '1995-01-01') and (orders.o_orderdate >= '1994-01-01')) ------------------------------------------PhysicalOlapScan[orders] apply RFs: RF0 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[supplier] apply RFs: RF4 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[nation] apply RFs: RF5 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((region.r_name = 'ASIA')) ------------------------PhysicalOlapScan[region] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q6.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q6.out index 7976f47c6b..f1f764bec0 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q6.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q6.out @@ -2,7 +2,7 @@ -- !select -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------filter((lineitem.l_discount <= 0.07) and (lineitem.l_discount >= 0.05) and (lineitem.l_quantity < 24.00) and (lineitem.l_shipdate < '1995-01-01') and (lineitem.l_shipdate >= '1994-01-01')) diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q7.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q7.out index e4183539e3..d397b08a6a 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q7.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q7.out @@ -2,10 +2,10 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((customer.c_nationkey = n2.n_nationkey)) otherCondition=((((n1.n_name = 'FRANCE') AND (n2.n_name = 'GERMANY')) OR ((n1.n_name = 'GERMANY') AND (n2.n_name = 'FRANCE')))) build RFs:RF4 n_nationkey->[c_nationkey] @@ -13,27 +13,27 @@ PhysicalResultSink --------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = n1.n_nationkey)) otherCondition=() build RFs:RF3 n_nationkey->[s_nationkey] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF2 c_custkey->[o_custkey] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[l_suppkey] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF0 l_orderkey->[o_orderkey] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[orders] apply RFs: RF0 RF2 ------------------------------------PhysicalProject --------------------------------------filter((lineitem.l_shipdate <= '1996-12-31') and (lineitem.l_shipdate >= '1995-01-01')) ----------------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[supplier] apply RFs: RF3 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer] apply RFs: RF4 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter(n_name IN ('FRANCE', 'GERMANY')) ----------------------------PhysicalOlapScan[nation] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter(n_name IN ('FRANCE', 'GERMANY')) ------------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q8.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q8.out index e473085d13..b27dff70e1 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q8.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q8.out @@ -2,11 +2,11 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((n1.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF6 r_regionkey->[n_regionkey] @@ -18,32 +18,32 @@ PhysicalResultSink ------------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF2 p_partkey->[l_partkey] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------hashJoin[INNER_JOIN] hashCondition=((orders.o_custkey = customer.c_custkey)) otherCondition=() build RFs:RF1 c_custkey->[o_custkey] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF0 o_orderkey->[l_orderkey] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 RF2 --------------------------------------------PhysicalProject ----------------------------------------------filter((orders.o_orderdate <= '1996-12-31') and (orders.o_orderdate >= '1995-01-01')) ------------------------------------------------PhysicalOlapScan[orders] apply RFs: RF1 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------filter((part.p_type = 'ECONOMY ANODIZED STEEL')) ------------------------------------------PhysicalOlapScan[part] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[supplier] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[nation] apply RFs: RF6 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[nation] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((region.r_name = 'AMERICA')) --------------------------PhysicalOlapScan[region] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q9.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q9.out index b546f00de7..15e8529a2f 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q9.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/nostats_rf_prune/q9.out @@ -2,10 +2,10 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() @@ -15,23 +15,23 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((partsupp.ps_partkey = lineitem.l_partkey) and (partsupp.ps_suppkey = lineitem.l_suppkey)) otherCondition=() --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF1 p_partkey->[l_partkey] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashJoin[INNER_JOIN] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[orders] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------filter((p_name like '%green%')) ------------------------------------PhysicalOlapScan[part] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[partsupp] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[supplier] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q1.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q1.out index 3eb68a3c45..22f0777694 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q1.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q1.out @@ -2,10 +2,10 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------filter((lineitem.l_shipdate <= '1998-09-02')) diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q10.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q10.out index d36a117655..29aa25e1bf 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q10.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q10.out @@ -2,28 +2,28 @@ -- !select -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF2 o_orderkey->[l_orderkey] --------------------PhysicalProject ----------------------filter((lineitem.l_returnflag = 'R')) ------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_nationkey = nation.n_nationkey)) otherCondition=() ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 o_custkey->[c_custkey] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------filter((orders.o_orderdate < '1994-01-01') and (orders.o_orderdate >= '1993-10-01')) ----------------------------------PhysicalOlapScan[orders] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q11.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q11.out index 405d1c1661..8b25757d32 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q11.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q11.out @@ -2,7 +2,7 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------NestedLoopJoin[INNER_JOIN](cast(value as DOUBLE) > cast((sum((ps_supplycost * cast(ps_availqty as DECIMALV3(10, 0)))) * 0.000002) as DOUBLE)) @@ -11,28 +11,28 @@ PhysicalResultSink ----------------hashJoin[INNER_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF3 s_suppkey->[ps_suppkey] ------------------PhysicalProject --------------------PhysicalOlapScan[partsupp] apply RFs: RF3 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF2 n_nationkey->[s_nationkey] ----------------------PhysicalProject ------------------------PhysicalOlapScan[supplier] apply RFs: RF2 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((nation.n_name = 'GERMANY')) ----------------------------PhysicalOlapScan[nation] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecGather] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[ps_suppkey] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[partsupp] apply RFs: RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[s_nationkey] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[supplier] apply RFs: RF0 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((nation.n_name = 'GERMANY')) ------------------------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q12.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q12.out index c5e8f9cd43..64aa1f7676 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q12.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q12.out @@ -2,10 +2,10 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF0 l_orderkey->[o_orderkey] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q13.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q13.out index dc58893d9c..61c8585eff 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q13.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q13.out @@ -2,20 +2,20 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter(( not (o_comment like '%special%requests%'))) ----------------------------PhysicalOlapScan[orders] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q14.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q14.out index 0d44b05831..f15ef460df 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q14.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q14.out @@ -3,13 +3,13 @@ PhysicalResultSink --PhysicalProject ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------hashAgg[LOCAL] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 l_partkey->[p_partkey] --------------PhysicalProject ----------------PhysicalOlapScan[part] apply RFs: RF0 ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((lineitem.l_shipdate < '1995-10-01') and (lineitem.l_shipdate >= '1995-09-01')) --------------------PhysicalOlapScan[lineitem] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q15.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q15.out index f83be70876..02dd9a5d7b 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q15.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q15.out @@ -2,28 +2,28 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((supplier.s_suppkey = revenue0.supplier_no)) otherCondition=() build RFs:RF0 supplier_no->[s_suppkey] ------------PhysicalProject --------------PhysicalOlapScan[supplier] apply RFs: RF0 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashJoin[INNER_JOIN] hashCondition=((revenue0.total_revenue = max(total_revenue))) otherCondition=() ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------filter((lineitem.l_shipdate < '1996-04-01') and (lineitem.l_shipdate >= '1996-01-01')) ----------------------------PhysicalOlapScan[lineitem] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecGather] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject ----------------------------------filter((lineitem.l_shipdate < '1996-04-01') and (lineitem.l_shipdate >= '1996-01-01')) diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q16.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q16.out index 3a186ed911..719e9b99f8 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q16.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q16.out @@ -2,21 +2,21 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = partsupp.ps_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] ----------------------PhysicalProject ------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 ----------------------PhysicalProject ------------------------filter(( not (p_brand = 'Brand#45')) and ( not (p_type like 'MEDIUM POLISHED%')) and p_size IN (14, 19, 23, 3, 36, 45, 49, 9)) --------------------------PhysicalOlapScan[part] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((s_comment like '%Customer%Complaints%')) ------------------------PhysicalOlapScan[supplier] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q17.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q17.out index 02b486eee9..2b08773838 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q17.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q17.out @@ -3,18 +3,18 @@ PhysicalResultSink --PhysicalProject ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------hashAgg[LOCAL] ----------PhysicalProject ------------filter((cast(l_quantity as DECIMALV3(38, 5)) < (0.2 * avg(cast(l_quantity as DECIMALV3(17, 4))) OVER(PARTITION BY p_partkey)))) --------------PhysicalWindow ----------------PhysicalQuickSort[LOCAL_SORT] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF0 p_partkey->[l_partkey] ------------------------PhysicalProject --------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((part.p_brand = 'Brand#23') and (part.p_container = 'MED BOX')) ------------------------------PhysicalOlapScan[part] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q18.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q18.out index 5e3963df20..85de9cb32f 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q18.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q18.out @@ -2,19 +2,19 @@ -- !select -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[LOCAL] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF2 o_orderkey->[l_orderkey] --------------PhysicalProject ----------------PhysicalOlapScan[lineitem] apply RFs: RF2 ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF1 o_custkey->[c_custkey] --------------------PhysicalProject ----------------------PhysicalOlapScan[customer] apply RFs: RF1 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF0 l_orderkey->[o_orderkey] ------------------------PhysicalProject --------------------------PhysicalOlapScan[orders] apply RFs: RF0 diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q19.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q19.out index bfb550af23..639c36ccc6 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q19.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q19.out @@ -2,14 +2,14 @@ -- !select -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=(((((((part.p_brand = 'Brand#12') AND p_container IN ('SM BOX', 'SM CASE', 'SM PACK', 'SM PKG')) AND ((lineitem.l_quantity >= 1.00) AND (lineitem.l_quantity <= 11.00))) AND (part.p_size <= 5)) OR ((((part.p_brand = 'Brand#23') AND p_container IN ('MED BAG', 'MED BOX', 'MED PACK', 'MED PKG')) AND ((lineitem.l_quantity >= 10.00) AND (lineitem.l_quantity <= 20.00))) AND (part.p_size <= 10))) OR ((((part.p_brand = 'Brand#34') AND p_container IN ('LG BOX', 'LG CASE', 'LG PACK', 'LG PKG')) AND ((lineitem.l_quantity >= 20.00) AND (lineitem.l_quantity <= 30.00))) AND (part.p_size <= 15)))) build RFs:RF0 p_partkey->[l_partkey] ------------PhysicalProject --------------filter((lineitem.l_quantity <= 30.00) and (lineitem.l_quantity >= 1.00) and (lineitem.l_shipinstruct = 'DELIVER IN PERSON') and l_shipmode IN ('AIR REG', 'AIR')) ----------------PhysicalOlapScan[lineitem] apply RFs: RF0 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalProject ----------------filter((((((part.p_brand = 'Brand#12') AND p_container IN ('SM BOX', 'SM CASE', 'SM PACK', 'SM PKG')) AND (part.p_size <= 5)) OR (((part.p_brand = 'Brand#23') AND p_container IN ('MED BAG', 'MED BOX', 'MED PACK', 'MED PKG')) AND (part.p_size <= 10))) OR (((part.p_brand = 'Brand#34') AND p_container IN ('LG BOX', 'LG CASE', 'LG PACK', 'LG PKG')) AND (part.p_size <= 15))) and (part.p_size >= 1)) ------------------PhysicalOlapScan[part] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q2.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q2.out index 5e67e4361e..e198cf7077 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q2.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q2.out @@ -2,16 +2,16 @@ -- !select -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------filter((partsupp.ps_supplycost = min(ps_supplycost) OVER(PARTITION BY p_partkey))) ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_suppkey = partsupp.ps_suppkey)) otherCondition=() build RFs:RF3 s_suppkey->[ps_suppkey] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = partsupp.ps_partkey)) otherCondition=() build RFs:RF2 p_partkey->[ps_partkey] ----------------------------PhysicalProject @@ -19,15 +19,15 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------filter((p_type like '%BRASS') and (part.p_size = 15)) --------------------------------PhysicalOlapScan[part] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF1 n_nationkey->[s_nationkey] ----------------------------PhysicalOlapScan[supplier] apply RFs: RF1 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[INNER_JOIN] hashCondition=((nation.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF0 r_regionkey->[n_regionkey] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[nation] apply RFs: RF0 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((region.r_name = 'EUROPE')) --------------------------------------PhysicalOlapScan[region] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q20-rewrite.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q20-rewrite.out index 99204372ce..9f5eda0201 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q20-rewrite.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q20-rewrite.out @@ -2,32 +2,32 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((supplier.s_suppkey = t3.ps_suppkey)) otherCondition=() build RFs:RF4 s_suppkey->[ps_suppkey] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((t2.l_partkey = t1.ps_partkey) and (t2.l_suppkey = t1.ps_suppkey)) otherCondition=((cast(ps_availqty as DECIMALV3(38, 3)) > t2.l_q)) build RFs:RF2 ps_partkey->[l_partkey];RF3 ps_suppkey->[l_suppkey] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------filter((lineitem.l_shipdate < '1995-01-01') and (lineitem.l_shipdate >= '1994-01-01')) ------------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 RF3 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((partsupp.ps_partkey = part.p_partkey)) otherCondition=() build RFs:RF1 p_partkey->[ps_partkey] ----------------------PhysicalProject ------------------------PhysicalOlapScan[partsupp] apply RFs: RF1 RF4 ----------------------PhysicalProject ------------------------filter((p_name like 'forest%')) --------------------------PhysicalOlapScan[part] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[s_nationkey] ----------------PhysicalProject ------------------PhysicalOlapScan[supplier] apply RFs: RF0 -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((nation.n_name = 'CANADA')) ----------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q20.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q20.out index 5a79903bb8..9069a99c3a 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q20.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q20.out @@ -2,31 +2,31 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((supplier.s_suppkey = partsupp.ps_suppkey)) otherCondition=() build RFs:RF4 s_suppkey->[ps_suppkey] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_partkey = partsupp.ps_partkey) and (lineitem.l_suppkey = partsupp.ps_suppkey)) otherCondition=((cast(ps_availqty as DECIMALV3(38, 3)) > (0.5 * sum(l_quantity)))) build RFs:RF2 ps_partkey->[l_partkey];RF3 ps_suppkey->[l_suppkey] ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------filter((lineitem.l_shipdate < '1995-01-01') and (lineitem.l_shipdate >= '1994-01-01')) ----------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 RF3 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((partsupp.ps_partkey = part.p_partkey)) otherCondition=() build RFs:RF1 p_partkey->[ps_partkey] ----------------------PhysicalProject ------------------------PhysicalOlapScan[partsupp] apply RFs: RF1 RF4 ----------------------PhysicalProject ------------------------filter((p_name like 'forest%')) --------------------------PhysicalOlapScan[part] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[s_nationkey] ----------------PhysicalProject ------------------PhysicalOlapScan[supplier] apply RFs: RF0 -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((nation.n_name = 'CANADA')) ----------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q21.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q21.out index 3fecd7bad5..815ebd60e9 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q21.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q21.out @@ -2,10 +2,10 @@ -- !select -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((l2.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF4 l_orderkey->[l_orderkey] @@ -23,11 +23,11 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------filter((l1.l_receiptdate > l1.l_commitdate)) ----------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[s_nationkey] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[supplier] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((nation.n_name = 'SAUDI ARABIA')) ----------------------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q22.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q22.out index 22caa65035..69c64e0e5b 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q22.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q22.out @@ -2,24 +2,24 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((orders.o_custkey = customer.c_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[orders] apply RFs: RF0 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------NestedLoopJoin[INNER_JOIN](cast(c_acctbal as DECIMALV3(38, 4)) > avg(cast(c_acctbal as DECIMALV3(17, 4)))) ----------------------PhysicalProject ------------------------filter(substring(c_phone, 1, 2) IN ('13', '17', '18', '23', '29', '30', '31')) --------------------------PhysicalOlapScan[customer] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------hashAgg[GLOBAL] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject --------------------------------filter((customer.c_acctbal > 0.00) and substring(c_phone, 1, 2) IN ('13', '17', '18', '23', '29', '30', '31')) diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q3.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q3.out index c9e0acbfeb..829d5394c8 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q3.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q3.out @@ -2,7 +2,7 @@ -- !select -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[LOCAL] @@ -11,14 +11,14 @@ PhysicalResultSink ----------------PhysicalProject ------------------filter((lineitem.l_shipdate > '1995-03-15')) --------------------PhysicalOlapScan[lineitem] apply RFs: RF1 -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((orders.o_orderdate < '1995-03-15')) ----------------------------PhysicalOlapScan[orders] apply RFs: RF0 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((customer.c_mktsegment = 'BUILDING')) ----------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q4.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q4.out index 551ae531e9..6142816a8a 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q4.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q4.out @@ -2,10 +2,10 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF0 o_orderkey->[l_orderkey] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q5.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q5.out index 355296e895..0c5e71bdc2 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q5.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q5.out @@ -2,14 +2,14 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey) and (customer.c_nationkey = supplier.s_nationkey)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF3 s_suppkey->[l_suppkey] ------------------------PhysicalProject @@ -19,19 +19,19 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------filter((orders.o_orderdate < '1995-01-01') and (orders.o_orderdate >= '1994-01-01')) --------------------------------PhysicalOlapScan[orders] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF1 n_nationkey->[s_nationkey] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[supplier] apply RFs: RF1 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[INNER_JOIN] hashCondition=((nation.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF0 r_regionkey->[n_regionkey] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[nation] apply RFs: RF0 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((region.r_name = 'ASIA')) --------------------------------------PhysicalOlapScan[region] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q6.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q6.out index 7976f47c6b..f1f764bec0 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q6.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q6.out @@ -2,7 +2,7 @@ -- !select -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------filter((lineitem.l_discount <= 0.07) and (lineitem.l_discount >= 0.05) and (lineitem.l_quantity < 24.00) and (lineitem.l_shipdate < '1995-01-01') and (lineitem.l_shipdate >= '1994-01-01')) diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q7.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q7.out index bacb57df2d..0f11a38dde 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q7.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q7.out @@ -2,10 +2,10 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=((((n1.n_name = 'FRANCE') AND (n2.n_name = 'GERMANY')) OR ((n1.n_name = 'GERMANY') AND (n2.n_name = 'FRANCE')))) build RFs:RF4 o_orderkey->[l_orderkey] @@ -14,25 +14,25 @@ PhysicalResultSink ----------------------PhysicalProject ------------------------filter((lineitem.l_shipdate <= '1996-12-31') and (lineitem.l_shipdate >= '1995-01-01')) --------------------------PhysicalOlapScan[lineitem] apply RFs: RF3 RF4 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = n1.n_nationkey)) otherCondition=() build RFs:RF2 n_nationkey->[s_nationkey] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[supplier] apply RFs: RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(n_name IN ('FRANCE', 'GERMANY')) --------------------------------PhysicalOlapScan[nation] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF1 c_custkey->[o_custkey] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[orders] apply RFs: RF1 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_nationkey = n2.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[c_nationkey] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter(n_name IN ('FRANCE', 'GERMANY')) ----------------------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q8.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q8.out index 408d450486..e88663bfed 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q8.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q8.out @@ -2,11 +2,11 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = n2.n_nationkey)) otherCondition=() @@ -14,10 +14,10 @@ PhysicalResultSink ----------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF5 l_suppkey->[s_suppkey] ------------------------PhysicalProject --------------------------PhysicalOlapScan[supplier] apply RFs: RF5 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((orders.o_custkey = customer.c_custkey)) otherCondition=() build RFs:RF4 c_custkey->[o_custkey] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF3 l_orderkey->[o_orderkey] ------------------------------------PhysicalProject @@ -27,24 +27,24 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF2 p_partkey->[l_partkey] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((part.p_type = 'ECONOMY ANODIZED STEEL')) ----------------------------------------------PhysicalOlapScan[part] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_nationkey = n1.n_nationkey)) otherCondition=() build RFs:RF1 n_nationkey->[c_nationkey] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------hashJoin[INNER_JOIN] hashCondition=((n1.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF0 r_regionkey->[n_regionkey] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[nation] apply RFs: RF0 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((region.r_name = 'AMERICA')) ----------------------------------------------PhysicalOlapScan[region] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q9.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q9.out index 9934b094f9..63d585c9c7 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q9.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/rf_prune/q9.out @@ -2,37 +2,37 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((partsupp.ps_partkey = lineitem.l_partkey) and (partsupp.ps_suppkey = lineitem.l_suppkey)) otherCondition=() ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF2 l_orderkey->[o_orderkey] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[orders] apply RFs: RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF1 p_partkey->[l_partkey] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------filter((p_name like '%green%')) --------------------------------------PhysicalOlapScan[part] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() --------------------------PhysicalProject ----------------------------PhysicalOlapScan[supplier] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[nation] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[partsupp] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q1.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q1.out index 3eb68a3c45..22f0777694 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q1.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q1.out @@ -2,10 +2,10 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------filter((lineitem.l_shipdate <= '1998-09-02')) diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q10.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q10.out index a9c20f5294..95c3719f46 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q10.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q10.out @@ -2,28 +2,28 @@ -- !select -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF2 o_orderkey->[l_orderkey] --------------------PhysicalProject ----------------------filter((lineitem.l_returnflag = 'R')) ------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF1 n_nationkey->[c_nationkey] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 o_custkey->[c_custkey] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF1 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject --------------------------------filter((orders.o_orderdate < '1994-01-01') and (orders.o_orderdate >= '1993-10-01')) ----------------------------------PhysicalOlapScan[orders] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q11.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q11.out index 405d1c1661..8b25757d32 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q11.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q11.out @@ -2,7 +2,7 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------NestedLoopJoin[INNER_JOIN](cast(value as DOUBLE) > cast((sum((ps_supplycost * cast(ps_availqty as DECIMALV3(10, 0)))) * 0.000002) as DOUBLE)) @@ -11,28 +11,28 @@ PhysicalResultSink ----------------hashJoin[INNER_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF3 s_suppkey->[ps_suppkey] ------------------PhysicalProject --------------------PhysicalOlapScan[partsupp] apply RFs: RF3 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF2 n_nationkey->[s_nationkey] ----------------------PhysicalProject ------------------------PhysicalOlapScan[supplier] apply RFs: RF2 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((nation.n_name = 'GERMANY')) ----------------------------PhysicalOlapScan[nation] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecGather] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[ps_suppkey] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[partsupp] apply RFs: RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[s_nationkey] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[supplier] apply RFs: RF0 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject ----------------------------------filter((nation.n_name = 'GERMANY')) ------------------------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q12.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q12.out index c5e8f9cd43..64aa1f7676 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q12.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q12.out @@ -2,10 +2,10 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF0 l_orderkey->[o_orderkey] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q13.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q13.out index 68920e2318..4b1d9316e4 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q13.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q13.out @@ -2,20 +2,20 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter(( not (o_comment like '%special%requests%'))) ----------------------------PhysicalOlapScan[orders] apply RFs: RF0 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q14.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q14.out index 0d44b05831..f15ef460df 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q14.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q14.out @@ -3,13 +3,13 @@ PhysicalResultSink --PhysicalProject ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------hashAgg[LOCAL] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 l_partkey->[p_partkey] --------------PhysicalProject ----------------PhysicalOlapScan[part] apply RFs: RF0 ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((lineitem.l_shipdate < '1995-10-01') and (lineitem.l_shipdate >= '1995-09-01')) --------------------PhysicalOlapScan[lineitem] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q15.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q15.out index f83be70876..02dd9a5d7b 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q15.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q15.out @@ -2,28 +2,28 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((supplier.s_suppkey = revenue0.supplier_no)) otherCondition=() build RFs:RF0 supplier_no->[s_suppkey] ------------PhysicalProject --------------PhysicalOlapScan[supplier] apply RFs: RF0 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashJoin[INNER_JOIN] hashCondition=((revenue0.total_revenue = max(total_revenue))) otherCondition=() ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------filter((lineitem.l_shipdate < '1996-04-01') and (lineitem.l_shipdate >= '1996-01-01')) ----------------------------PhysicalOlapScan[lineitem] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecGather] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject ----------------------------------filter((lineitem.l_shipdate < '1996-04-01') and (lineitem.l_shipdate >= '1996-01-01')) diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q16.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q16.out index 3a186ed911..719e9b99f8 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q16.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q16.out @@ -2,21 +2,21 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = partsupp.ps_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] ----------------------PhysicalProject ------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 ----------------------PhysicalProject ------------------------filter(( not (p_brand = 'Brand#45')) and ( not (p_type like 'MEDIUM POLISHED%')) and p_size IN (14, 19, 23, 3, 36, 45, 49, 9)) --------------------------PhysicalOlapScan[part] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------filter((s_comment like '%Customer%Complaints%')) ------------------------PhysicalOlapScan[supplier] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q17.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q17.out index 02b486eee9..2b08773838 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q17.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q17.out @@ -3,18 +3,18 @@ PhysicalResultSink --PhysicalProject ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------hashAgg[LOCAL] ----------PhysicalProject ------------filter((cast(l_quantity as DECIMALV3(38, 5)) < (0.2 * avg(cast(l_quantity as DECIMALV3(17, 4))) OVER(PARTITION BY p_partkey)))) --------------PhysicalWindow ----------------PhysicalQuickSort[LOCAL_SORT] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF0 p_partkey->[l_partkey] ------------------------PhysicalProject --------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------filter((part.p_brand = 'Brand#23') and (part.p_container = 'MED BOX')) ------------------------------PhysicalOlapScan[part] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q18.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q18.out index 5e3963df20..85de9cb32f 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q18.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q18.out @@ -2,19 +2,19 @@ -- !select -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[LOCAL] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF2 o_orderkey->[l_orderkey] --------------PhysicalProject ----------------PhysicalOlapScan[lineitem] apply RFs: RF2 ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF1 o_custkey->[c_custkey] --------------------PhysicalProject ----------------------PhysicalOlapScan[customer] apply RFs: RF1 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF0 l_orderkey->[o_orderkey] ------------------------PhysicalProject --------------------------PhysicalOlapScan[orders] apply RFs: RF0 diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q19.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q19.out index bfb550af23..639c36ccc6 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q19.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q19.out @@ -2,14 +2,14 @@ -- !select -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=(((((((part.p_brand = 'Brand#12') AND p_container IN ('SM BOX', 'SM CASE', 'SM PACK', 'SM PKG')) AND ((lineitem.l_quantity >= 1.00) AND (lineitem.l_quantity <= 11.00))) AND (part.p_size <= 5)) OR ((((part.p_brand = 'Brand#23') AND p_container IN ('MED BAG', 'MED BOX', 'MED PACK', 'MED PKG')) AND ((lineitem.l_quantity >= 10.00) AND (lineitem.l_quantity <= 20.00))) AND (part.p_size <= 10))) OR ((((part.p_brand = 'Brand#34') AND p_container IN ('LG BOX', 'LG CASE', 'LG PACK', 'LG PKG')) AND ((lineitem.l_quantity >= 20.00) AND (lineitem.l_quantity <= 30.00))) AND (part.p_size <= 15)))) build RFs:RF0 p_partkey->[l_partkey] ------------PhysicalProject --------------filter((lineitem.l_quantity <= 30.00) and (lineitem.l_quantity >= 1.00) and (lineitem.l_shipinstruct = 'DELIVER IN PERSON') and l_shipmode IN ('AIR REG', 'AIR')) ----------------PhysicalOlapScan[lineitem] apply RFs: RF0 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalProject ----------------filter((((((part.p_brand = 'Brand#12') AND p_container IN ('SM BOX', 'SM CASE', 'SM PACK', 'SM PKG')) AND (part.p_size <= 5)) OR (((part.p_brand = 'Brand#23') AND p_container IN ('MED BAG', 'MED BOX', 'MED PACK', 'MED PKG')) AND (part.p_size <= 10))) OR (((part.p_brand = 'Brand#34') AND p_container IN ('LG BOX', 'LG CASE', 'LG PACK', 'LG PKG')) AND (part.p_size <= 15))) and (part.p_size >= 1)) ------------------PhysicalOlapScan[part] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q2.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q2.out index 5e67e4361e..e198cf7077 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q2.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q2.out @@ -2,16 +2,16 @@ -- !select -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------filter((partsupp.ps_supplycost = min(ps_supplycost) OVER(PARTITION BY p_partkey))) ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_suppkey = partsupp.ps_suppkey)) otherCondition=() build RFs:RF3 s_suppkey->[ps_suppkey] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = partsupp.ps_partkey)) otherCondition=() build RFs:RF2 p_partkey->[ps_partkey] ----------------------------PhysicalProject @@ -19,15 +19,15 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------filter((p_type like '%BRASS') and (part.p_size = 15)) --------------------------------PhysicalOlapScan[part] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF1 n_nationkey->[s_nationkey] ----------------------------PhysicalOlapScan[supplier] apply RFs: RF1 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[INNER_JOIN] hashCondition=((nation.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF0 r_regionkey->[n_regionkey] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[nation] apply RFs: RF0 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((region.r_name = 'EUROPE')) --------------------------------------PhysicalOlapScan[region] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q20-rewrite.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q20-rewrite.out index 99204372ce..9f5eda0201 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q20-rewrite.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q20-rewrite.out @@ -2,32 +2,32 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((supplier.s_suppkey = t3.ps_suppkey)) otherCondition=() build RFs:RF4 s_suppkey->[ps_suppkey] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((t2.l_partkey = t1.ps_partkey) and (t2.l_suppkey = t1.ps_suppkey)) otherCondition=((cast(ps_availqty as DECIMALV3(38, 3)) > t2.l_q)) build RFs:RF2 ps_partkey->[l_partkey];RF3 ps_suppkey->[l_suppkey] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------filter((lineitem.l_shipdate < '1995-01-01') and (lineitem.l_shipdate >= '1994-01-01')) ------------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 RF3 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((partsupp.ps_partkey = part.p_partkey)) otherCondition=() build RFs:RF1 p_partkey->[ps_partkey] ----------------------PhysicalProject ------------------------PhysicalOlapScan[partsupp] apply RFs: RF1 RF4 ----------------------PhysicalProject ------------------------filter((p_name like 'forest%')) --------------------------PhysicalOlapScan[part] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[s_nationkey] ----------------PhysicalProject ------------------PhysicalOlapScan[supplier] apply RFs: RF0 -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((nation.n_name = 'CANADA')) ----------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q20.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q20.out index 5a79903bb8..9069a99c3a 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q20.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q20.out @@ -2,31 +2,31 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((supplier.s_suppkey = partsupp.ps_suppkey)) otherCondition=() build RFs:RF4 s_suppkey->[ps_suppkey] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_partkey = partsupp.ps_partkey) and (lineitem.l_suppkey = partsupp.ps_suppkey)) otherCondition=((cast(ps_availqty as DECIMALV3(38, 3)) > (0.5 * sum(l_quantity)))) build RFs:RF2 ps_partkey->[l_partkey];RF3 ps_suppkey->[l_suppkey] ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------filter((lineitem.l_shipdate < '1995-01-01') and (lineitem.l_shipdate >= '1994-01-01')) ----------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 RF3 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((partsupp.ps_partkey = part.p_partkey)) otherCondition=() build RFs:RF1 p_partkey->[ps_partkey] ----------------------PhysicalProject ------------------------PhysicalOlapScan[partsupp] apply RFs: RF1 RF4 ----------------------PhysicalProject ------------------------filter((p_name like 'forest%')) --------------------------PhysicalOlapScan[part] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[s_nationkey] ----------------PhysicalProject ------------------PhysicalOlapScan[supplier] apply RFs: RF0 -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject --------------------filter((nation.n_name = 'CANADA')) ----------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q21.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q21.out index 3fecd7bad5..815ebd60e9 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q21.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q21.out @@ -2,10 +2,10 @@ -- !select -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((l2.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF4 l_orderkey->[l_orderkey] @@ -23,11 +23,11 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------filter((l1.l_receiptdate > l1.l_commitdate)) ----------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[s_nationkey] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[supplier] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((nation.n_name = 'SAUDI ARABIA')) ----------------------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q22.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q22.out index 22caa65035..69c64e0e5b 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q22.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q22.out @@ -2,24 +2,24 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((orders.o_custkey = customer.c_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[orders] apply RFs: RF0 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------NestedLoopJoin[INNER_JOIN](cast(c_acctbal as DECIMALV3(38, 4)) > avg(cast(c_acctbal as DECIMALV3(17, 4)))) ----------------------PhysicalProject ------------------------filter(substring(c_phone, 1, 2) IN ('13', '17', '18', '23', '29', '30', '31')) --------------------------PhysicalOlapScan[customer] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------hashAgg[GLOBAL] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject --------------------------------filter((customer.c_acctbal > 0.00) and substring(c_phone, 1, 2) IN ('13', '17', '18', '23', '29', '30', '31')) diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q3.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q3.out index c9e0acbfeb..829d5394c8 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q3.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q3.out @@ -2,7 +2,7 @@ -- !select -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[LOCAL] @@ -11,14 +11,14 @@ PhysicalResultSink ----------------PhysicalProject ------------------filter((lineitem.l_shipdate > '1995-03-15')) --------------------PhysicalOlapScan[lineitem] apply RFs: RF1 -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((orders.o_orderdate < '1995-03-15')) ----------------------------PhysicalOlapScan[orders] apply RFs: RF0 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((customer.c_mktsegment = 'BUILDING')) ----------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q4.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q4.out index 551ae531e9..6142816a8a 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q4.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q4.out @@ -2,10 +2,10 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF0 o_orderkey->[l_orderkey] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q5.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q5.out index 7009061bfa..7145ebda40 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q5.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q5.out @@ -2,14 +2,14 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey) and (customer.c_nationkey = supplier.s_nationkey)) otherCondition=() build RFs:RF4 c_nationkey->[s_nationkey];RF5 c_custkey->[o_custkey] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF3 s_suppkey->[l_suppkey] ------------------------PhysicalProject @@ -19,19 +19,19 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------filter((orders.o_orderdate < '1995-01-01') and (orders.o_orderdate >= '1994-01-01')) --------------------------------PhysicalOlapScan[orders] apply RFs: RF5 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF1 n_nationkey->[s_nationkey] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[supplier] apply RFs: RF1 RF4 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------hashJoin[INNER_JOIN] hashCondition=((nation.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF0 r_regionkey->[n_regionkey] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[nation] apply RFs: RF0 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------filter((region.r_name = 'ASIA')) --------------------------------------PhysicalOlapScan[region] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q6.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q6.out index 7976f47c6b..f1f764bec0 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q6.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q6.out @@ -2,7 +2,7 @@ -- !select -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------filter((lineitem.l_discount <= 0.07) and (lineitem.l_discount >= 0.05) and (lineitem.l_quantity < 24.00) and (lineitem.l_shipdate < '1995-01-01') and (lineitem.l_shipdate >= '1994-01-01')) diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q7.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q7.out index bacb57df2d..0f11a38dde 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q7.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q7.out @@ -2,10 +2,10 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=((((n1.n_name = 'FRANCE') AND (n2.n_name = 'GERMANY')) OR ((n1.n_name = 'GERMANY') AND (n2.n_name = 'FRANCE')))) build RFs:RF4 o_orderkey->[l_orderkey] @@ -14,25 +14,25 @@ PhysicalResultSink ----------------------PhysicalProject ------------------------filter((lineitem.l_shipdate <= '1996-12-31') and (lineitem.l_shipdate >= '1995-01-01')) --------------------------PhysicalOlapScan[lineitem] apply RFs: RF3 RF4 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = n1.n_nationkey)) otherCondition=() build RFs:RF2 n_nationkey->[s_nationkey] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[supplier] apply RFs: RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter(n_name IN ('FRANCE', 'GERMANY')) --------------------------------PhysicalOlapScan[nation] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF1 c_custkey->[o_custkey] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[orders] apply RFs: RF1 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_nationkey = n2.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[c_nationkey] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter(n_name IN ('FRANCE', 'GERMANY')) ----------------------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q8.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q8.out index 348f279c13..0926739f79 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q8.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q8.out @@ -2,11 +2,11 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = n2.n_nationkey)) otherCondition=() build RFs:RF6 n_nationkey->[s_nationkey] @@ -14,10 +14,10 @@ PhysicalResultSink ----------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF5 l_suppkey->[s_suppkey] ------------------------PhysicalProject --------------------------PhysicalOlapScan[supplier] apply RFs: RF5 RF6 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((orders.o_custkey = customer.c_custkey)) otherCondition=() build RFs:RF4 c_custkey->[o_custkey] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF3 l_orderkey->[o_orderkey] ------------------------------------PhysicalProject @@ -27,24 +27,24 @@ PhysicalResultSink --------------------------------------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF2 p_partkey->[l_partkey] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((part.p_type = 'ECONOMY ANODIZED STEEL')) ----------------------------------------------PhysicalOlapScan[part] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_nationkey = n1.n_nationkey)) otherCondition=() build RFs:RF1 n_nationkey->[c_nationkey] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------------hashJoin[INNER_JOIN] hashCondition=((n1.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF0 r_regionkey->[n_regionkey] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[nation] apply RFs: RF0 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((region.r_name = 'AMERICA')) ----------------------------------------------PhysicalOlapScan[region] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q9.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q9.out index 9c72427869..3ff1375bf2 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q9.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q9.out @@ -2,37 +2,37 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((partsupp.ps_partkey = lineitem.l_partkey) and (partsupp.ps_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF4 ps_suppkey->[l_suppkey];RF5 ps_partkey->[l_partkey] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF3 s_suppkey->[l_suppkey] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF2 l_orderkey->[o_orderkey] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[orders] apply RFs: RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF1 p_partkey->[l_partkey] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 RF3 RF4 RF5 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------filter((p_name like '%green%')) --------------------------------------PhysicalOlapScan[part] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[s_nationkey] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[supplier] apply RFs: RF0 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[nation] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[partsupp] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q1.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q1.out index 3eb68a3c45..22f0777694 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q1.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q1.out @@ -2,10 +2,10 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------filter((lineitem.l_shipdate <= '1998-09-02')) diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q10.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q10.out index c62aa046d7..4bdbde8a4c 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q10.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q10.out @@ -2,11 +2,11 @@ -- !select -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF2 n_nationkey->[c_nationkey] @@ -15,17 +15,17 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------filter((lineitem.l_returnflag = 'R')) ----------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------filter((orders.o_orderdate < '1994-01-01') and (orders.o_orderdate >= '1993-10-01')) ------------------------------------PhysicalOlapScan[orders] apply RFs: RF0 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer] apply RFs: RF2 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q11.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q11.out index b596d6c5d7..dbdfa6be6e 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q11.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q11.out @@ -2,43 +2,43 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------NestedLoopJoin[INNER_JOIN](cast(value as DOUBLE) > cast((sum((ps_supplycost * cast(ps_availqty as DECIMALV3(10, 0)))) * 0.000002) as DOUBLE)) ------------hashAgg[GLOBAL] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF3 n_nationkey->[s_nationkey] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF2 s_suppkey->[ps_suppkey] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[partsupp] apply RFs: RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[supplier] apply RFs: RF3 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((nation.n_name = 'GERMANY')) ----------------------------PhysicalOlapScan[nation] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecGather] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF1 n_nationkey->[s_nationkey] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF0 s_suppkey->[ps_suppkey] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[supplier] apply RFs: RF1 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((nation.n_name = 'GERMANY')) --------------------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q12.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q12.out index c5e8f9cd43..64aa1f7676 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q12.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q12.out @@ -2,10 +2,10 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF0 l_orderkey->[o_orderkey] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q13.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q13.out index 68920e2318..4b1d9316e4 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q13.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q13.out @@ -2,20 +2,20 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter(( not (o_comment like '%special%requests%'))) ----------------------------PhysicalOlapScan[orders] apply RFs: RF0 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q14.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q14.out index d0f7b533ef..0d2ad2fc7b 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q14.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q14.out @@ -3,15 +3,15 @@ PhysicalResultSink --PhysicalProject ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------hashAgg[LOCAL] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[l_partkey] ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------filter((lineitem.l_shipdate < '1995-10-01') and (lineitem.l_shipdate >= '1995-09-01')) --------------------PhysicalOlapScan[lineitem] apply RFs: RF0 ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------PhysicalOlapScan[part] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q15.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q15.out index 6e7748fa40..c24e199e98 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q15.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q15.out @@ -2,30 +2,30 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((supplier.s_suppkey = revenue0.supplier_no)) otherCondition=() build RFs:RF0 s_suppkey->[l_suppkey] ------------hashJoin[INNER_JOIN] hashCondition=((revenue0.total_revenue = max(total_revenue))) otherCondition=() --------------PhysicalProject ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------filter((lineitem.l_shipdate < '1996-04-01') and (lineitem.l_shipdate >= '1996-01-01')) --------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecReplicated] ----------------hashAgg[GLOBAL] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecGather] --------------------hashAgg[LOCAL] ----------------------PhysicalProject ------------------------hashAgg[GLOBAL] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject --------------------------------filter((lineitem.l_shipdate < '1996-04-01') and (lineitem.l_shipdate >= '1996-01-01')) ----------------------------------PhysicalOlapScan[lineitem] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------PhysicalOlapScan[supplier] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q16.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q16.out index 01c093244e..bbc51abcfe 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q16.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q16.out @@ -2,17 +2,17 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = partsupp.ps_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] ------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() --------------------PhysicalProject ----------------------PhysicalOlapScan[partsupp] apply RFs: RF0 ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((s_comment like '%Customer%Complaints%')) --------------------------PhysicalOlapScan[supplier] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q17.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q17.out index 7ea128caa6..4cbe93fe47 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q17.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q17.out @@ -3,7 +3,7 @@ PhysicalResultSink --PhysicalProject ----hashAgg[GLOBAL] -------PhysicalDistribute +------PhysicalDistribute[DistributionSpecGather] --------hashAgg[LOCAL] ----------PhysicalProject ------------filter((cast(l_quantity as DECIMALV3(38, 5)) < (0.2 * avg(cast(l_quantity as DECIMALV3(17, 4))) OVER(PARTITION BY p_partkey)))) @@ -11,10 +11,10 @@ PhysicalResultSink ----------------PhysicalQuickSort[LOCAL_SORT] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF0 p_partkey->[l_partkey] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((part.p_brand = 'Brand#23') and (part.p_container = 'MED BOX')) ----------------------------PhysicalOlapScan[part] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q18.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q18.out index 09edc70a22..13afb682a9 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q18.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q18.out @@ -2,17 +2,17 @@ -- !select -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[LOCAL] ----------PhysicalProject ------------hashJoin[INNER_JOIN] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF2 o_orderkey->[l_orderkey] --------------PhysicalProject ----------------PhysicalOlapScan[lineitem] apply RFs: RF2 ---------------PhysicalDistribute +--------------PhysicalDistribute[DistributionSpecHash] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF1 c_custkey->[o_custkey] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF0 l_orderkey->[o_orderkey] ------------------------PhysicalProject --------------------------PhysicalOlapScan[orders] apply RFs: RF0 RF1 @@ -21,7 +21,7 @@ PhysicalResultSink ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[lineitem] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject ------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q19.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q19.out index 05b2551171..46cb3528ca 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q19.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q19.out @@ -2,15 +2,15 @@ -- !select -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=(((((((part.p_brand = 'Brand#12') AND p_container IN ('SM BOX', 'SM CASE', 'SM PACK', 'SM PKG')) AND ((lineitem.l_quantity >= 1.00) AND (lineitem.l_quantity <= 11.00))) AND (part.p_size <= 5)) OR ((((part.p_brand = 'Brand#23') AND p_container IN ('MED BAG', 'MED BOX', 'MED PACK', 'MED PKG')) AND ((lineitem.l_quantity >= 10.00) AND (lineitem.l_quantity <= 20.00))) AND (part.p_size <= 10))) OR ((((part.p_brand = 'Brand#34') AND p_container IN ('LG BOX', 'LG CASE', 'LG PACK', 'LG PKG')) AND ((lineitem.l_quantity >= 20.00) AND (lineitem.l_quantity <= 30.00))) AND (part.p_size <= 15)))) build RFs:RF0 p_partkey->[l_partkey] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------filter((lineitem.l_quantity <= 30.00) and (lineitem.l_quantity >= 1.00) and (lineitem.l_shipinstruct = 'DELIVER IN PERSON') and l_shipmode IN ('AIR REG', 'AIR')) ------------------PhysicalOlapScan[lineitem] apply RFs: RF0 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------PhysicalProject ----------------filter((((((part.p_brand = 'Brand#12') AND p_container IN ('SM BOX', 'SM CASE', 'SM PACK', 'SM PKG')) AND (part.p_size <= 5)) OR (((part.p_brand = 'Brand#23') AND p_container IN ('MED BAG', 'MED BOX', 'MED PACK', 'MED PKG')) AND (part.p_size <= 10))) OR (((part.p_brand = 'Brand#34') AND p_container IN ('LG BOX', 'LG CASE', 'LG PACK', 'LG PKG')) AND (part.p_size <= 15))) and (part.p_size >= 1)) ------------------PhysicalOlapScan[part] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q2.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q2.out index e6b4da4096..b0d9d0c5a0 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q2.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q2.out @@ -2,20 +2,20 @@ -- !select -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------filter((partsupp.ps_supplycost = min(ps_supplycost) OVER(PARTITION BY p_partkey))) ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((nation.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF3 r_regionkey->[n_regionkey] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF2 n_nationkey->[s_nationkey] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_suppkey = partsupp.ps_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[ps_suppkey] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = partsupp.ps_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] ------------------------------------PhysicalProject @@ -23,12 +23,12 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((p_type like '%BRASS') and (part.p_size = 15)) ----------------------------------------PhysicalOlapScan[part] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalOlapScan[supplier] apply RFs: RF2 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[nation] apply RFs: RF3 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter((region.r_name = 'EUROPE')) ----------------------------PhysicalOlapScan[region] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q20-rewrite.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q20-rewrite.out index 525bc7be55..12ae602cc2 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q20-rewrite.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q20-rewrite.out @@ -2,33 +2,33 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF4 n_nationkey->[s_nationkey] ------------PhysicalProject --------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((supplier.s_suppkey = t3.ps_suppkey)) otherCondition=() build RFs:RF3 s_suppkey->[ps_suppkey] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((t2.l_partkey = t1.ps_partkey) and (t2.l_suppkey = t1.ps_suppkey)) otherCondition=((cast(ps_availqty as DECIMALV3(38, 3)) > t2.l_q)) build RFs:RF1 ps_partkey->[l_partkey];RF2 ps_suppkey->[l_suppkey] ----------------------PhysicalProject ------------------------hashAgg[GLOBAL] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject --------------------------------filter((lineitem.l_shipdate < '1995-01-01') and (lineitem.l_shipdate >= '1994-01-01')) ----------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 RF2 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((partsupp.ps_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 RF3 --------------------------PhysicalProject ----------------------------filter((p_name like 'forest%')) ------------------------------PhysicalOlapScan[part] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[supplier] apply RFs: RF4 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalProject ----------------filter((nation.n_name = 'CANADA')) ------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q20.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q20.out index 1292e0468f..0be3690736 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q20.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q20.out @@ -2,32 +2,32 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF4 n_nationkey->[s_nationkey] ------------PhysicalProject --------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((supplier.s_suppkey = partsupp.ps_suppkey)) otherCondition=() build RFs:RF3 s_suppkey->[ps_suppkey] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_partkey = partsupp.ps_partkey) and (lineitem.l_suppkey = partsupp.ps_suppkey)) otherCondition=((cast(ps_availqty as DECIMALV3(38, 3)) > (0.5 * sum(l_quantity)))) build RFs:RF1 ps_partkey->[l_partkey];RF2 ps_suppkey->[l_suppkey] ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------filter((lineitem.l_shipdate < '1995-01-01') and (lineitem.l_shipdate >= '1994-01-01')) --------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 RF2 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((partsupp.ps_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 RF3 --------------------------PhysicalProject ----------------------------filter((p_name like 'forest%')) ------------------------------PhysicalOlapScan[part] -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------PhysicalOlapScan[supplier] apply RFs: RF4 -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecReplicated] --------------PhysicalProject ----------------filter((nation.n_name = 'CANADA')) ------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q21.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q21.out index d744f43188..44dc87ff59 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q21.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q21.out @@ -2,16 +2,16 @@ -- !select -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF4 n_nationkey->[s_nationkey] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_suppkey = l1.l_suppkey)) otherCondition=() build RFs:RF3 s_suppkey->[l_suppkey] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashJoin[INNER_JOIN] hashCondition=((orders.o_orderkey = l1.l_orderkey)) otherCondition=() build RFs:RF2 o_orderkey->[l_orderkey] --------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((l2.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF1 l_orderkey->[l_orderkey] ----------------------------PhysicalProject @@ -26,10 +26,10 @@ PhysicalResultSink --------------------------PhysicalProject ----------------------------filter((orders.o_orderstatus = 'F')) ------------------------------PhysicalOlapScan[orders] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------PhysicalOlapScan[supplier] apply RFs: RF4 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((nation.n_name = 'SAUDI ARABIA')) ------------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q22.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q22.out index 22caa65035..69c64e0e5b 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q22.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q22.out @@ -2,24 +2,24 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((orders.o_custkey = customer.c_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject ----------------------PhysicalOlapScan[orders] apply RFs: RF0 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecHash] --------------------NestedLoopJoin[INNER_JOIN](cast(c_acctbal as DECIMALV3(38, 4)) > avg(cast(c_acctbal as DECIMALV3(17, 4)))) ----------------------PhysicalProject ------------------------filter(substring(c_phone, 1, 2) IN ('13', '17', '18', '23', '29', '30', '31')) --------------------------PhysicalOlapScan[customer] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------hashAgg[GLOBAL] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject --------------------------------filter((customer.c_acctbal > 0.00) and substring(c_phone, 1, 2) IN ('13', '17', '18', '23', '29', '30', '31')) diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q3.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q3.out index c9e0acbfeb..829d5394c8 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q3.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q3.out @@ -2,7 +2,7 @@ -- !select -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[LOCAL] @@ -11,14 +11,14 @@ PhysicalResultSink ----------------PhysicalProject ------------------filter((lineitem.l_shipdate > '1995-03-15')) --------------------PhysicalOlapScan[lineitem] apply RFs: RF1 -----------------PhysicalDistribute +----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((orders.o_orderdate < '1995-03-15')) ----------------------------PhysicalOlapScan[orders] apply RFs: RF0 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecHash] ------------------------PhysicalProject --------------------------filter((customer.c_mktsegment = 'BUILDING')) ----------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q4.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q4.out index 551ae531e9..6142816a8a 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q4.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q4.out @@ -2,10 +2,10 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF0 o_orderkey->[l_orderkey] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q5.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q5.out index 50e1f5b76e..7a89beaeb2 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q5.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q5.out @@ -2,10 +2,10 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((nation.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF5 r_regionkey->[n_regionkey] @@ -17,23 +17,23 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 RF2 -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------filter((orders.o_orderdate < '1995-01-01') and (orders.o_orderdate >= '1994-01-01')) ------------------------------------------PhysicalOlapScan[orders] apply RFs: RF0 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[supplier] apply RFs: RF4 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[nation] apply RFs: RF5 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter((region.r_name = 'ASIA')) ------------------------PhysicalOlapScan[region] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q6.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q6.out index 7976f47c6b..f1f764bec0 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q6.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q6.out @@ -2,7 +2,7 @@ -- !select -- PhysicalResultSink --hashAgg[GLOBAL] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject ----------filter((lineitem.l_discount <= 0.07) and (lineitem.l_discount >= 0.05) and (lineitem.l_quantity < 24.00) and (lineitem.l_shipdate < '1995-01-01') and (lineitem.l_shipdate >= '1994-01-01')) diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q7.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q7.out index e4183539e3..d397b08a6a 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q7.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q7.out @@ -2,10 +2,10 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((customer.c_nationkey = n2.n_nationkey)) otherCondition=((((n1.n_name = 'FRANCE') AND (n2.n_name = 'GERMANY')) OR ((n1.n_name = 'GERMANY') AND (n2.n_name = 'FRANCE')))) build RFs:RF4 n_nationkey->[c_nationkey] @@ -13,27 +13,27 @@ PhysicalResultSink --------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = n1.n_nationkey)) otherCondition=() build RFs:RF3 n_nationkey->[s_nationkey] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF2 c_custkey->[o_custkey] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[l_suppkey] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashJoin[INNER_JOIN] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF0 l_orderkey->[o_orderkey] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[orders] apply RFs: RF0 RF2 ------------------------------------PhysicalProject --------------------------------------filter((lineitem.l_shipdate <= '1996-12-31') and (lineitem.l_shipdate >= '1995-01-01')) ----------------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[supplier] apply RFs: RF3 ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer] apply RFs: RF4 -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------filter(n_name IN ('FRANCE', 'GERMANY')) ----------------------------PhysicalOlapScan[nation] -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------filter(n_name IN ('FRANCE', 'GERMANY')) ------------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q8.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q8.out index 4875b65c17..59065025e9 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q8.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q8.out @@ -2,11 +2,11 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute +------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN] hashCondition=((n1.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF6 r_regionkey->[n_regionkey] @@ -18,32 +18,32 @@ PhysicalResultSink ------------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF3 s_suppkey->[l_suppkey] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF2 p_partkey->[l_partkey] -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------hashJoin[INNER_JOIN] hashCondition=((orders.o_custkey = customer.c_custkey)) otherCondition=() build RFs:RF1 c_custkey->[o_custkey] -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF0 o_orderkey->[l_orderkey] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 RF2 RF3 --------------------------------------------PhysicalProject ----------------------------------------------filter((orders.o_orderdate <= '1996-12-31') and (orders.o_orderdate >= '1995-01-01')) ------------------------------------------------PhysicalOlapScan[orders] apply RFs: RF1 -----------------------------------------PhysicalDistribute +----------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 -------------------------------------PhysicalDistribute +------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------PhysicalProject ----------------------------------------filter((part.p_type = 'ECONOMY ANODIZED STEEL')) ------------------------------------------PhysicalOlapScan[part] ---------------------------------PhysicalDistribute +--------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[supplier] apply RFs: RF5 -----------------------------PhysicalDistribute +----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[nation] apply RFs: RF6 -------------------------PhysicalDistribute +------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[nation] ---------------------PhysicalDistribute +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((region.r_name = 'AMERICA')) --------------------------PhysicalOlapScan[region] diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q9.out b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q9.out index 8dc3f30cee..a8dab44bff 100644 --- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q9.out +++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape_no_stats/q9.out @@ -2,10 +2,10 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute +----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalDistribute +----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject ----------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF5 n_nationkey->[s_nationkey] @@ -15,23 +15,23 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN] hashCondition=((partsupp.ps_partkey = lineitem.l_partkey) and (partsupp.ps_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF2 ps_suppkey->[l_suppkey];RF3 ps_partkey->[l_partkey] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF1 p_partkey->[l_partkey] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashJoin[INNER_JOIN] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF0 o_orderkey->[l_orderkey] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 RF1 RF2 RF3 RF4 ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[orders] -------------------------------PhysicalDistribute +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject ----------------------------------filter((p_name like '%green%')) ------------------------------------PhysicalOlapScan[part] ---------------------------PhysicalDistribute +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[partsupp] -----------------------PhysicalDistribute +----------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------PhysicalProject --------------------------PhysicalOlapScan[supplier] apply RFs: RF5 -------------------PhysicalDistribute +------------------PhysicalDistribute[DistributionSpecReplicated] --------------------PhysicalProject ----------------------PhysicalOlapScan[nation] diff --git a/regression-test/suites/nereids_p0/hint/test_leading.groovy b/regression-test/suites/nereids_p0/hint/test_leading.groovy index 7c24b4bec2..e983c7130a 100644 --- a/regression-test/suites/nereids_p0/hint/test_leading.groovy +++ b/regression-test/suites/nereids_p0/hint/test_leading.groovy @@ -928,6 +928,159 @@ suite("test_leading") { qt_select88_12 """select /*+ leading(t3 alias2 t1) */ count(*) from t1 left semi join (select c2 from t2) as alias2 on c1 = c2 left anti join t3 on c1 = c3 where exists (select 1 from t3 join t4 on c3 = c4);""" qt_select88_13 """select /*+ leading(t3 {alias2 t1}) */ count(*) from t1 left semi join (select c2 from t2) as alias2 on c1 = c2 left anti join t3 on c1 = c3 where exists (select 1 from t3 join t4 on c3 = c4);""" + // distribute hint + leading hint +// only distribute hint + single hint + // used + qt_select90_1 """explain shape plan select count(*) from t1 join [broadcast] t2 on c1 = c2;""" + // unused + qt_select90_2 """explain shape plan select count(*) from t1 right outer join [broadcast] t2 on c1 = c2;""" + +// only distribute hint + multi hints + qt_select90_3 """explain shape plan select count(*) from t1 join [broadcast] t2 on c1 = c2 join[shuffle] t3 on c2 = c3;""" + qt_select90_4 """explain shape plan select count(*) from t1 right outer join [broadcast] t2 on c1 = c2 join[shuffle] t3 on c2 = c3;""" + qt_select90_5 """explain shape plan select count(*) from t1 join [broadcast] t2 on c1 = c2 right outer join[shuffle] t3 on c2 = c3;""" + qt_select90_6 """explain shape plan select count(*) from t1 join [shuffle] t2 on c1 = c2 right outer join[broadcast] t3 on c2 = c3;""" + +// leading + distribute hint outside leading + single hint + qt_select91_1 """explain shape plan select /*+ leading(t1 t2 t3) */ count(*) from t1 join [broadcast] t2 on c1 = c2 join[shuffle] t3 on c2 = c3;""" + qt_select91_2 """explain shape plan select /*+ leading(t1 t2 t3) */ count(*) from t1 right outer join [broadcast] t2 on c1 = c2 join[shuffle] t3 on c2 = c3;""" + qt_select91_3 """explain shape plan select /*+ leading(t1 t2 t3) */ count(*) from t1 join [broadcast] t2 on c1 = c2 right outer join[shuffle] t3 on c2 = c3;""" + qt_select91_4 """explain shape plan select /*+ leading(t1 t2 t3) */ count(*) from t1 join [shuffle] t2 on c1 = c2 right outer join[broadcast] t3 on c2 = c3;""" + +// leading + distribute hint inside leading + single hint + // inner join + qt_select92_1 """explain shape plan select /*+ leading(t1 shuffle t2 broadcast t3) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select92_2 """explain shape plan select /*+ leading(t1 shuffle {t2 broadcast t3}) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select92_3 """explain shape plan select /*+ leading(t1 shuffle {t3 broadcast t2}) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select92_4 """explain shape plan select /*+ leading(t2 shuffle t1 broadcast t3) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select92_5 """explain shape plan select /*+ leading(t2 shuffle {t1 broadcast t3}) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select92_6 """explain shape plan select /*+ leading(t2 shuffle {t3 broadcast t1}) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + + qt_select93_1 """explain shape plan select /*+ leading(t1 t2 broadcast t3) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select93_2 """explain shape plan select /*+ leading(t1 {t2 broadcast t3}) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select93_3 """explain shape plan select /*+ leading(t1 {t3 broadcast t2}) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select93_4 """explain shape plan select /*+ leading(t2 t1 broadcast t3) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select93_5 """explain shape plan select /*+ leading(t2 {t1 broadcast t3}) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select93_6 """explain shape plan select /*+ leading(t2 {t3 broadcast t1}) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + + qt_select94_2 """explain shape plan select /*+ leading(t1 shuffle t2 t3) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select94_2 """explain shape plan select /*+ leading(t1 shuffle {t2 t3}) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select94_2 """explain shape plan select /*+ leading(t1 shuffle {t3 t2}) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select94_2 """explain shape plan select /*+ leading(t2 shuffle t1 t3) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select94_2 """explain shape plan select /*+ leading(t2 shuffle {t1 t3}) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select94_2 """explain shape plan select /*+ leading(t2 shuffle {t3 t1}) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + + // outer join + qt_select95_1 """explain shape plan select /*+ leading(t1 broadcast t2 t3) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select95_2 """explain shape plan select /*+ leading(t1 broadcast {t2 t3}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select95_3 """explain shape plan select /*+ leading(t1 broadcast {t3 t2}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select95_4 """explain shape plan select /*+ leading(t2 broadcast t1 t3) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select95_5 """explain shape plan select /*+ leading(t2 broadcast {t1 t3}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select95_6 """explain shape plan select /*+ leading(t2 broadcast {t3 t1}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select95_7 """explain shape plan select /*+ leading(t3 broadcast t1 t2) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select95_8 """explain shape plan select /*+ leading(t3 broadcast {t1 t2}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select95_9 """explain shape plan select /*+ leading(t3 broadcast {t2 t1}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + + qt_select96_1 """explain shape plan select /*+ leading(t1 shuffle t2 broadcast t3) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select96_2 """explain shape plan select /*+ leading(t1 shuffle {t2 broadcast t3}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select96_3 """explain shape plan select /*+ leading(t1 shuffle {t3 broadcast t2}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select96_4 """explain shape plan select /*+ leading(t2 shuffle t1 broadcast t3) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select96_5 """explain shape plan select /*+ leading(t2 shuffle {t1 broadcast t3}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select96_6 """explain shape plan select /*+ leading(t2 shuffle {t3 broadcast t1}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select96_7 """explain shape plan select /*+ leading(t3 shuffle t1 broadcast t2) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select96_8 """explain shape plan select /*+ leading(t3 shuffle {t1 broadcast t2}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select96_9 """explain shape plan select /*+ leading(t3 shuffle {t2 broadcast t1}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + + qt_select97_1 """explain shape plan select /*+ leading(t1 broadcast t2 shuffle t3) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select97_2 """explain shape plan select /*+ leading(t1 broadcast {t2 shuffle t3}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select97_3 """explain shape plan select /*+ leading(t1 broadcast {t3 shuffle t2}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select97_4 """explain shape plan select /*+ leading(t2 broadcast t1 shuffle t3) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select97_5 """explain shape plan select /*+ leading(t2 broadcast {t1 shuffle t3}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select97_6 """explain shape plan select /*+ leading(t2 broadcast {t3 shuffle t1}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select97_7 """explain shape plan select /*+ leading(t3 broadcast t1 shuffle t2) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select97_8 """explain shape plan select /*+ leading(t3 broadcast {t1 shuffle t2}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select97_9 """explain shape plan select /*+ leading(t3 broadcast {t2 shuffle t1}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + + // distribute hint + leading hint +// only distribute hint + single hint + // used + qt_select100_0 """select count(*) from t1 join t2 on c1 = c2;""" + qt_select100_1 """select count(*) from t1 join [broadcast] t2 on c1 = c2;""" + // unused + qt_select100_2 """select count(*) from t1 right outer join [broadcast] t2 on c1 = c2;""" + +// only distribute hint + multi hints + qt_select100_3 """select count(*) from t1 join [broadcast] t2 on c1 = c2 join[shuffle] t3 on c2 = c3;""" + qt_select100_4 """select count(*) from t1 right outer join [broadcast] t2 on c1 = c2 join[shuffle] t3 on c2 = c3;""" + qt_select100_5 """select count(*) from t1 join [broadcast] t2 on c1 = c2 right outer join[shuffle] t3 on c2 = c3;""" + qt_select100_6 """select count(*) from t1 join [shuffle] t2 on c1 = c2 right outer join[broadcast] t3 on c2 = c3;""" + +// leading + distribute hint outside leading + single hint + qt_select101_0 """select count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select101_1 """select /*+ leading(t1 t2 t3) */ count(*) from t1 join [broadcast] t2 on c1 = c2 join[shuffle] t3 on c2 = c3;""" + qt_select101_2 """select /*+ leading(t1 t2 t3) */ count(*) from t1 right outer join [broadcast] t2 on c1 = c2 join[shuffle] t3 on c2 = c3;""" + qt_select101_3 """select /*+ leading(t1 t2 t3) */ count(*) from t1 join [broadcast] t2 on c1 = c2 right outer join[shuffle] t3 on c2 = c3;""" + qt_select101_4 """select /*+ leading(t1 t2 t3) */ count(*) from t1 join [shuffle] t2 on c1 = c2 right outer join[broadcast] t3 on c2 = c3;""" + +// leading + distribute hint inside leading + single hint + // inner join + qt_select102_0 """select count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select102_1 """select /*+ leading(t1 shuffle t2 broadcast t3) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select102_2 """select /*+ leading(t1 shuffle {t2 broadcast t3}) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select102_3 """select /*+ leading(t1 shuffle {t3 broadcast t2}) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select102_4 """select /*+ leading(t2 shuffle t1 broadcast t3) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select102_5 """select /*+ leading(t2 shuffle {t1 broadcast t3}) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select102_6 """select /*+ leading(t2 shuffle {t3 broadcast t1}) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + + qt_select103_0 """select count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select103_1 """select /*+ leading(t1 t2 broadcast t3) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select103_2 """select /*+ leading(t1 {t2 broadcast t3}) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select103_3 """select /*+ leading(t1 {t3 broadcast t2}) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select103_4 """select /*+ leading(t2 t1 broadcast t3) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select103_5 """select /*+ leading(t2 {t1 broadcast t3}) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select103_6 """select /*+ leading(t2 {t3 broadcast t1}) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + + qt_select104_0 """select count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select104_1 """select /*+ leading(t1 shuffle t2 t3) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select104_2 """select /*+ leading(t1 shuffle {t2 t3}) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select104_3 """select /*+ leading(t1 shuffle {t3 t2}) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select104_4 """select /*+ leading(t2 shuffle t1 t3) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select104_5 """select /*+ leading(t2 shuffle {t1 t3}) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select104_6 """select /*+ leading(t2 shuffle {t3 t1}) */ count(*) from t1 join t2 on c1 = c2 join t3 on c2 = c3;""" + + // outer join + qt_select105_0 """select count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select105_1 """select /*+ leading(t1 broadcast t2 t3) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select105_2 """select /*+ leading(t1 broadcast {t2 t3}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select105_3 """select /*+ leading(t1 broadcast {t3 t2}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select105_4 """select /*+ leading(t2 broadcast t1 t3) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select105_5 """select /*+ leading(t2 broadcast {t1 t3}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select105_6 """select /*+ leading(t2 broadcast {t3 t1}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select105_7 """select /*+ leading(t3 broadcast t1 t2) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select105_8 """select /*+ leading(t3 broadcast {t1 t2}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select105_9 """select /*+ leading(t3 broadcast {t2 t1}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + + qt_select106_0 """select count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select106_1 """select /*+ leading(t1 shuffle t2 broadcast t3) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select106_2 """select /*+ leading(t1 shuffle {t2 broadcast t3}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select106_3 """select /*+ leading(t1 shuffle {t3 broadcast t2}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select106_4 """select /*+ leading(t2 shuffle t1 broadcast t3) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select106_5 """select /*+ leading(t2 shuffle {t1 broadcast t3}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select106_6 """select /*+ leading(t2 shuffle {t3 broadcast t1}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select106_7 """select /*+ leading(t3 shuffle t1 broadcast t2) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select106_8 """select /*+ leading(t3 shuffle {t1 broadcast t2}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select106_9 """select /*+ leading(t3 shuffle {t2 broadcast t1}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + + qt_select107_0 """select count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select107_1 """select /*+ leading(t1 broadcast t2 shuffle t3) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select107_2 """select /*+ leading(t1 broadcast {t2 shuffle t3}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select107_3 """select /*+ leading(t1 broadcast {t3 shuffle t2}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select107_4 """select /*+ leading(t2 broadcast t1 shuffle t3) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select107_5 """select /*+ leading(t2 broadcast {t1 shuffle t3}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select107_6 """select /*+ leading(t2 broadcast {t3 shuffle t1}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select107_7 """select /*+ leading(t3 broadcast t1 shuffle t2) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select107_8 """select /*+ leading(t3 broadcast {t1 shuffle t2}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" + qt_select107_9 """select /*+ leading(t3 broadcast {t2 shuffle t1}) */ count(*) from t1 left outer join t2 on c1 = c2 join t3 on c2 = c3;""" sql """drop table if exists t1;""" sql """drop table if exists t2;""" sql """drop table if exists t3;"""