From da9c740cc29b52adcc85d7c4cf40f81c71cb299c Mon Sep 17 00:00:00 2001 From: minghong Date: Tue, 14 Oct 2025 15:16:46 +0800 Subject: [PATCH 1/2] branch-4.2 [feat](nereids) add table alias for catalog relation (#56802) ### What problem does this PR solve? This change extends the `tableAlias` feature from the logical plan layer to the physical plan layer, enabling table aliases to be preserved throughout the entire query execution pipeline from SQL parsing to physical execution. When analyzing query execution plans, especially for complex queries where the same table appears multiple times with different aliases, it has been challenging to match scan nodes in the plan back to their corresponding table references in the original SQL. --- .../LogicalSubQueryAliasToLogicalProject.java | 20 ++- .../LogicalEsScanToPhysicalEsScan.java | 9 +- .../LogicalJdbcScanToPhysicalJdbcScan.java | 10 +- .../LogicalOdbcScanToPhysicalOdbcScan.java | 10 +- .../LogicalOlapScanToPhysicalOlapScan.java | 5 +- .../plans/logical/LogicalCatalogRelation.java | 49 +++++-- .../LogicalDeferMaterializeOlapScan.java | 14 +- .../trees/plans/logical/LogicalEsScan.java | 39 ++++-- .../trees/plans/logical/LogicalFileScan.java | 57 ++++++-- .../trees/plans/logical/LogicalJdbcScan.java | 29 ++-- .../trees/plans/logical/LogicalOdbcScan.java | 25 +++- .../trees/plans/logical/LogicalOlapScan.java | 62 ++++++--- .../plans/logical/LogicalSchemaScan.java | 53 ++++--- .../trees/plans/logical/LogicalTestScan.java | 25 +++- .../physical/PhysicalCatalogRelation.java | 33 ++++- .../trees/plans/physical/PhysicalEsScan.java | 29 ++-- .../plans/physical/PhysicalJdbcScan.java | 33 +++-- .../plans/physical/PhysicalOdbcScan.java | 31 +++-- .../plans/physical/PhysicalOlapScan.java | 21 +-- .../org/apache/doris/nereids/util/Utils.java | 5 +- .../nereids/jobs/RewriteTopDownJobTest.java | 5 + .../agg_skew_rewrite/agg_skew_rewrite.out | 10 +- .../eliminate_gby_key/eliminate_group_by.out | 84 +++++------ .../eliminate_group_by_key_by_uniform.out | 2 +- .../eliminate_join_condition.out | 24 ++-- .../eliminate_outer_join.out | 130 +++++++++--------- ...ify_comparison_predicate_int_vs_double.out | 4 +- .../infer_intersect_except.out | 8 +- .../pull_up_predicate_set_op.out | 84 +++++------ .../nereids_rules_p0/pkfk/eliminate_inner.out | 24 ++-- .../pull_up_join_from_union.out | 82 +++++------ .../extract_from_disjunction_in_join.out | 32 ++--- .../push_down_limit_distinct_through_join.out | 4 +- .../push_down_top_n_distinct_through_join.out | 6 +- ...push_down_top_n_distinct_through_union.out | 44 +++--- .../push_down_top_n_through_union.out | 44 +++--- .../nereids_rules_p0/salt_join/salt_join.out | 72 +++++----- .../join/eliminate_const_join_condition.out | 24 ++-- .../data/shape_check/ssb_sf100/shape/flat.out | 6 +- .../tpcds_sf100/noStatsRfPrune/query10.out | 4 +- .../tpcds_sf100/noStatsRfPrune/query16.out | 6 +- .../tpcds_sf100/noStatsRfPrune/query17.out | 6 +- .../tpcds_sf100/noStatsRfPrune/query18.out | 4 +- .../tpcds_sf100/noStatsRfPrune/query25.out | 6 +- .../tpcds_sf100/noStatsRfPrune/query29.out | 6 +- .../tpcds_sf100/noStatsRfPrune/query3.out | 2 +- .../tpcds_sf100/noStatsRfPrune/query35.out | 4 +- .../tpcds_sf100/noStatsRfPrune/query36.out | 2 +- .../tpcds_sf100/noStatsRfPrune/query41.out | 2 +- .../tpcds_sf100/noStatsRfPrune/query42.out | 2 +- .../tpcds_sf100/noStatsRfPrune/query44.out | 4 +- .../tpcds_sf100/noStatsRfPrune/query46.out | 2 +- .../tpcds_sf100/noStatsRfPrune/query49.out | 12 +- .../tpcds_sf100/noStatsRfPrune/query50.out | 4 +- .../tpcds_sf100/noStatsRfPrune/query52.out | 2 +- .../tpcds_sf100/noStatsRfPrune/query59.out | 4 +- .../tpcds_sf100/noStatsRfPrune/query6.out | 12 +- .../tpcds_sf100/noStatsRfPrune/query64.out | 22 +-- .../tpcds_sf100/noStatsRfPrune/query68.out | 2 +- .../tpcds_sf100/noStatsRfPrune/query69.out | 4 +- .../tpcds_sf100/noStatsRfPrune/query70.out | 2 +- .../tpcds_sf100/noStatsRfPrune/query72.out | 6 +- .../tpcds_sf100/noStatsRfPrune/query85.out | 4 +- .../tpcds_sf100/noStatsRfPrune/query86.out | 2 +- .../tpcds_sf100/noStatsRfPrune/query94.out | 6 +- .../tpcds_sf100/noStatsRfPrune/query95.out | 6 +- .../tpcds_sf100/no_stats_shape/query10.out | 4 +- .../tpcds_sf100/no_stats_shape/query16.out | 6 +- .../tpcds_sf100/no_stats_shape/query17.out | 6 +- .../tpcds_sf100/no_stats_shape/query18.out | 4 +- .../tpcds_sf100/no_stats_shape/query25.out | 6 +- .../tpcds_sf100/no_stats_shape/query29.out | 6 +- .../tpcds_sf100/no_stats_shape/query3.out | 2 +- .../tpcds_sf100/no_stats_shape/query35.out | 4 +- .../tpcds_sf100/no_stats_shape/query36.out | 2 +- .../tpcds_sf100/no_stats_shape/query41.out | 2 +- .../tpcds_sf100/no_stats_shape/query42.out | 2 +- .../tpcds_sf100/no_stats_shape/query44.out | 4 +- .../tpcds_sf100/no_stats_shape/query46.out | 2 +- .../tpcds_sf100/no_stats_shape/query49.out | 12 +- .../tpcds_sf100/no_stats_shape/query50.out | 4 +- .../tpcds_sf100/no_stats_shape/query52.out | 2 +- .../tpcds_sf100/no_stats_shape/query59.out | 4 +- .../tpcds_sf100/no_stats_shape/query6.out | 12 +- .../tpcds_sf100/no_stats_shape/query64.out | 22 +-- .../tpcds_sf100/no_stats_shape/query68.out | 2 +- .../tpcds_sf100/no_stats_shape/query69.out | 4 +- .../tpcds_sf100/no_stats_shape/query70.out | 2 +- .../tpcds_sf100/no_stats_shape/query72.out | 6 +- .../tpcds_sf100/no_stats_shape/query85.out | 4 +- .../tpcds_sf100/no_stats_shape/query86.out | 2 +- .../tpcds_sf100/no_stats_shape/query94.out | 6 +- .../tpcds_sf100/no_stats_shape/query95.out | 6 +- .../tpcds_sf100/rf_prune/query10.out | 4 +- .../tpcds_sf100/rf_prune/query14.out | 12 +- .../tpcds_sf100/rf_prune/query16.out | 6 +- .../tpcds_sf100/rf_prune/query17.out | 6 +- .../tpcds_sf100/rf_prune/query18.out | 4 +- .../tpcds_sf100/rf_prune/query25.out | 6 +- .../tpcds_sf100/rf_prune/query29.out | 6 +- .../tpcds_sf100/rf_prune/query36.out | 2 +- .../tpcds_sf100/rf_prune/query41.out | 2 +- .../tpcds_sf100/rf_prune/query44.out | 4 +- .../tpcds_sf100/rf_prune/query46.out | 2 +- .../tpcds_sf100/rf_prune/query49.out | 12 +- .../tpcds_sf100/rf_prune/query50.out | 4 +- .../tpcds_sf100/rf_prune/query59.out | 4 +- .../tpcds_sf100/rf_prune/query6.out | 12 +- .../tpcds_sf100/rf_prune/query64.out | 22 +-- .../tpcds_sf100/rf_prune/query68.out | 2 +- .../tpcds_sf100/rf_prune/query69.out | 4 +- .../tpcds_sf100/rf_prune/query70.out | 2 +- .../tpcds_sf100/rf_prune/query72.out | 6 +- .../tpcds_sf100/rf_prune/query85.out | 4 +- .../tpcds_sf100/rf_prune/query86.out | 2 +- .../tpcds_sf100/rf_prune/query94.out | 6 +- .../tpcds_sf100/rf_prune/query95.out | 6 +- .../shape_check/tpcds_sf100/shape/query10.out | 4 +- .../shape_check/tpcds_sf100/shape/query14.out | 12 +- .../shape_check/tpcds_sf100/shape/query16.out | 6 +- .../shape_check/tpcds_sf100/shape/query17.out | 6 +- .../shape_check/tpcds_sf100/shape/query18.out | 4 +- .../shape_check/tpcds_sf100/shape/query25.out | 6 +- .../shape_check/tpcds_sf100/shape/query29.out | 6 +- .../shape_check/tpcds_sf100/shape/query36.out | 2 +- .../shape_check/tpcds_sf100/shape/query41.out | 2 +- .../shape_check/tpcds_sf100/shape/query44.out | 4 +- .../shape_check/tpcds_sf100/shape/query46.out | 2 +- .../shape_check/tpcds_sf100/shape/query49.out | 12 +- .../shape_check/tpcds_sf100/shape/query50.out | 4 +- .../shape_check/tpcds_sf100/shape/query59.out | 4 +- .../shape_check/tpcds_sf100/shape/query6.out | 12 +- .../shape_check/tpcds_sf100/shape/query64.out | 22 +-- .../shape_check/tpcds_sf100/shape/query68.out | 2 +- .../shape_check/tpcds_sf100/shape/query69.out | 4 +- .../shape_check/tpcds_sf100/shape/query70.out | 2 +- .../shape_check/tpcds_sf100/shape/query72.out | 6 +- .../shape_check/tpcds_sf100/shape/query85.out | 4 +- .../shape_check/tpcds_sf100/shape/query86.out | 2 +- .../shape_check/tpcds_sf100/shape/query94.out | 6 +- .../shape_check/tpcds_sf100/shape/query95.out | 6 +- .../bs_downgrade_shape/query44.out | 4 +- .../bs_downgrade_shape/query6.out | 12 +- .../bs_downgrade_shape/query68.out | 2 +- .../bs_downgrade_shape/query95.out | 6 +- .../eliminate_empty/query10_empty.out | 4 +- .../shape_check/tpcds_sf1000/hint/query10.out | 4 +- .../shape_check/tpcds_sf1000/hint/query14.out | 12 +- .../shape_check/tpcds_sf1000/hint/query16.out | 6 +- .../shape_check/tpcds_sf1000/hint/query17.out | 6 +- .../shape_check/tpcds_sf1000/hint/query18.out | 4 +- .../shape_check/tpcds_sf1000/hint/query25.out | 6 +- .../shape_check/tpcds_sf1000/hint/query29.out | 6 +- .../shape_check/tpcds_sf1000/hint/query3.out | 2 +- .../shape_check/tpcds_sf1000/hint/query36.out | 2 +- .../shape_check/tpcds_sf1000/hint/query41.out | 2 +- .../shape_check/tpcds_sf1000/hint/query44.out | 4 +- .../shape_check/tpcds_sf1000/hint/query46.out | 2 +- .../shape_check/tpcds_sf1000/hint/query49.out | 12 +- .../shape_check/tpcds_sf1000/hint/query50.out | 4 +- .../shape_check/tpcds_sf1000/hint/query59.out | 4 +- .../shape_check/tpcds_sf1000/hint/query6.out | 12 +- .../shape_check/tpcds_sf1000/hint/query64.out | 22 +-- .../shape_check/tpcds_sf1000/hint/query68.out | 2 +- .../shape_check/tpcds_sf1000/hint/query70.out | 2 +- .../shape_check/tpcds_sf1000/hint/query72.out | 6 +- .../shape_check/tpcds_sf1000/hint/query85.out | 4 +- .../shape_check/tpcds_sf1000/hint/query86.out | 2 +- .../shape_check/tpcds_sf1000/hint/query94.out | 6 +- .../shape_check/tpcds_sf1000/hint/query95.out | 6 +- .../tpcds_sf1000/shape/query10.out | 4 +- .../tpcds_sf1000/shape/query14.out | 12 +- .../tpcds_sf1000/shape/query16.out | 6 +- .../tpcds_sf1000/shape/query17.out | 6 +- .../tpcds_sf1000/shape/query18.out | 4 +- .../tpcds_sf1000/shape/query25.out | 6 +- .../tpcds_sf1000/shape/query29.out | 6 +- .../tpcds_sf1000/shape/query36.out | 2 +- .../tpcds_sf1000/shape/query41.out | 2 +- .../tpcds_sf1000/shape/query44.out | 4 +- .../tpcds_sf1000/shape/query46.out | 2 +- .../tpcds_sf1000/shape/query49.out | 12 +- .../tpcds_sf1000/shape/query50.out | 4 +- .../tpcds_sf1000/shape/query59.out | 4 +- .../shape_check/tpcds_sf1000/shape/query6.out | 12 +- .../tpcds_sf1000/shape/query64.out | 22 +-- .../tpcds_sf1000/shape/query68.out | 2 +- .../tpcds_sf1000/shape/query70.out | 2 +- .../tpcds_sf1000/shape/query85.out | 4 +- .../tpcds_sf1000/shape/query86.out | 2 +- .../tpcds_sf1000/shape/query94.out | 6 +- .../tpcds_sf1000/shape/query95.out | 6 +- .../tpcds_sf10t_orc/shape/query10.out | 4 +- .../tpcds_sf10t_orc/shape/query16.out | 6 +- .../tpcds_sf10t_orc/shape/query17.out | 6 +- .../tpcds_sf10t_orc/shape/query18.out | 4 +- .../tpcds_sf10t_orc/shape/query25.out | 6 +- .../tpcds_sf10t_orc/shape/query29.out | 6 +- .../tpcds_sf10t_orc/shape/query3.out | 2 +- .../tpcds_sf10t_orc/shape/query35.out | 4 +- .../tpcds_sf10t_orc/shape/query36.out | 2 +- .../tpcds_sf10t_orc/shape/query41.out | 2 +- .../tpcds_sf10t_orc/shape/query42.out | 2 +- .../tpcds_sf10t_orc/shape/query44.out | 4 +- .../tpcds_sf10t_orc/shape/query46.out | 2 +- .../tpcds_sf10t_orc/shape/query49.out | 12 +- .../tpcds_sf10t_orc/shape/query50.out | 4 +- .../tpcds_sf10t_orc/shape/query52.out | 2 +- .../tpcds_sf10t_orc/shape/query59.out | 4 +- .../tpcds_sf10t_orc/shape/query6.out | 12 +- .../tpcds_sf10t_orc/shape/query64.out | 22 +-- .../tpcds_sf10t_orc/shape/query68.out | 2 +- .../tpcds_sf10t_orc/shape/query69.out | 4 +- .../tpcds_sf10t_orc/shape/query70.out | 2 +- .../tpcds_sf10t_orc/shape/query85.out | 4 +- .../tpcds_sf10t_orc/shape/query86.out | 2 +- .../tpcds_sf10t_orc/shape/query94.out | 6 +- .../tpcds_sf10t_orc/shape/query95.out | 6 +- .../data/shape_check/tpch_sf1000/hint/q7.out | 4 +- .../data/shape_check/tpch_sf1000/hint/q8.out | 4 +- .../tpch_sf1000/nostats_rf_prune/q21.out | 6 +- .../tpch_sf1000/nostats_rf_prune/q7.out | 4 +- .../tpch_sf1000/nostats_rf_prune/q8.out | 4 +- .../shape_check/tpch_sf1000/rf_prune/q21.out | 6 +- .../shape_check/tpch_sf1000/rf_prune/q7.out | 4 +- .../shape_check/tpch_sf1000/rf_prune/q8.out | 4 +- .../shape_check/tpch_sf1000/shape/q21.out | 6 +- .../data/shape_check/tpch_sf1000/shape/q7.out | 4 +- .../data/shape_check/tpch_sf1000/shape/q8.out | 4 +- .../tpch_sf1000/shape_no_stats/q21.out | 6 +- .../tpch_sf1000/shape_no_stats/q7.out | 4 +- .../tpch_sf1000/shape_no_stats/q8.out | 4 +- 232 files changed, 1272 insertions(+), 1024 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/LogicalSubQueryAliasToLogicalProject.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/LogicalSubQueryAliasToLogicalProject.java index 990d6aee87e93d..235d2d64d98df1 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/LogicalSubQueryAliasToLogicalProject.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/LogicalSubQueryAliasToLogicalProject.java @@ -20,6 +20,8 @@ import org.apache.doris.nereids.rules.Rule; import org.apache.doris.nereids.rules.RuleType; import org.apache.doris.nereids.rules.rewrite.OneRewriteRuleFactory; +import org.apache.doris.nereids.trees.plans.Plan; +import org.apache.doris.nereids.trees.plans.logical.LogicalCatalogRelation; import org.apache.doris.nereids.trees.plans.logical.LogicalProject; import org.apache.doris.nereids.util.Utils; @@ -33,11 +35,17 @@ public class LogicalSubQueryAliasToLogicalProject extends OneRewriteRuleFactory @Override public Rule build() { return RuleType.LOGICAL_SUB_QUERY_ALIAS_TO_LOGICAL_PROJECT.build( - logicalSubQueryAlias().then(subQueryAlias -> - new LogicalProject<>( - Utils.fastToImmutableList(subQueryAlias.getOutput()), subQueryAlias.child() - ) - ) - ); + logicalSubQueryAlias().then(subQueryAlias -> { + Plan child = subQueryAlias.child(); + String alias = subQueryAlias.getAlias(); + + // If child is a LogicalCatalogRelation, set the tableAlias + if (child instanceof LogicalCatalogRelation) { + child = ((LogicalCatalogRelation) child).withTableAlias(alias); + } + + return new LogicalProject<>( + Utils.fastToImmutableList(subQueryAlias.getOutput()), child); + })); } } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/implementation/LogicalEsScanToPhysicalEsScan.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/implementation/LogicalEsScanToPhysicalEsScan.java index 1e4db2eba11810..d1dbe3f4984cce 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/implementation/LogicalEsScanToPhysicalEsScan.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/implementation/LogicalEsScanToPhysicalEsScan.java @@ -30,14 +30,15 @@ public class LogicalEsScanToPhysicalEsScan extends OneImplementationRuleFactory { @Override public Rule build() { - return logicalEsScan().then(esScan -> - new PhysicalEsScan( + return logicalEsScan().then(esScan -> new PhysicalEsScan( esScan.getRelationId(), esScan.getTable(), esScan.getQualifier(), DistributionSpecAny.INSTANCE, Optional.empty(), - esScan.getLogicalProperties()) - ).toRule(RuleType.LOGICAL_ES_SCAN_TO_PHYSICAL_ES_SCAN_RULE); + esScan.getLogicalProperties(), + null, + null, + esScan.getTableAlias())).toRule(RuleType.LOGICAL_ES_SCAN_TO_PHYSICAL_ES_SCAN_RULE); } } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/implementation/LogicalJdbcScanToPhysicalJdbcScan.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/implementation/LogicalJdbcScanToPhysicalJdbcScan.java index 99120c2b2eeb1e..f9085896dccaa4 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/implementation/LogicalJdbcScanToPhysicalJdbcScan.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/implementation/LogicalJdbcScanToPhysicalJdbcScan.java @@ -29,13 +29,15 @@ public class LogicalJdbcScanToPhysicalJdbcScan extends OneImplementationRuleFactory { @Override public Rule build() { - return logicalJdbcScan().then(jdbcScan -> - new PhysicalJdbcScan( + return logicalJdbcScan().then(jdbcScan -> new PhysicalJdbcScan( jdbcScan.getRelationId(), jdbcScan.getTable(), jdbcScan.getQualifier(), Optional.empty(), - jdbcScan.getLogicalProperties()) - ).toRule(RuleType.LOGICAL_JDBC_SCAN_TO_PHYSICAL_JDBC_SCAN_RULE); + jdbcScan.getLogicalProperties(), + null, + null, + jdbcScan.getOperativeSlots(), + jdbcScan.getTableAlias())).toRule(RuleType.LOGICAL_JDBC_SCAN_TO_PHYSICAL_JDBC_SCAN_RULE); } } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/implementation/LogicalOdbcScanToPhysicalOdbcScan.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/implementation/LogicalOdbcScanToPhysicalOdbcScan.java index 441219d7a0d075..ba26496017d5cc 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/implementation/LogicalOdbcScanToPhysicalOdbcScan.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/implementation/LogicalOdbcScanToPhysicalOdbcScan.java @@ -29,13 +29,15 @@ public class LogicalOdbcScanToPhysicalOdbcScan extends OneImplementationRuleFactory { @Override public Rule build() { - return logicalOdbcScan().then(odbcScan -> - new PhysicalOdbcScan( + return logicalOdbcScan().then(odbcScan -> new PhysicalOdbcScan( odbcScan.getRelationId(), odbcScan.getTable(), odbcScan.getQualifier(), Optional.empty(), - odbcScan.getLogicalProperties()) - ).toRule(RuleType.LOGICAL_ODBC_SCAN_TO_PHYSICAL_ODBC_SCAN_RULE); + odbcScan.getLogicalProperties(), + null, + null, + odbcScan.getOperativeSlots(), + odbcScan.getTableAlias())).toRule(RuleType.LOGICAL_ODBC_SCAN_TO_PHYSICAL_ODBC_SCAN_RULE); } } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/implementation/LogicalOlapScanToPhysicalOlapScan.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/implementation/LogicalOlapScanToPhysicalOlapScan.java index 59a8f41bb64409..ee8de201cff17c 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/implementation/LogicalOlapScanToPhysicalOlapScan.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/implementation/LogicalOlapScanToPhysicalOlapScan.java @@ -60,6 +60,8 @@ public Rule build() { olapScan.getOutputByIndex(olapScan.getTable().getBaseIndexId()), Optional.empty(), olapScan.getLogicalProperties(), + null, + null, olapScan.getTableSample(), olapScan.getOperativeSlots(), olapScan.getVirtualColumns(), @@ -68,7 +70,8 @@ public Rule build() { olapScan.getScoreRangeInfo(), olapScan.getAnnOrderKeys(), olapScan.getAnnLimit(), - olapScan.getPartitionPrunablePredicates()) + olapScan.getPartitionPrunablePredicates(), + olapScan.getTableAlias()) ).toRule(RuleType.LOGICAL_OLAP_SCAN_TO_PHYSICAL_OLAP_SCAN_RULE); } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalCatalogRelation.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalCatalogRelation.java index 96f76726ffa0f3..5fefceb625ac20 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalCatalogRelation.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalCatalogRelation.java @@ -70,37 +70,54 @@ public abstract class LogicalCatalogRelation extends LogicalRelation implements // use for virtual slot protected final List virtualColumns; + /** + * Table alias for this relation, empty string if no alias. + */ + protected final String tableAlias; + public LogicalCatalogRelation(RelationId relationId, PlanType type, TableIf table, List qualifier) { - this(relationId, type, table, qualifier, Optional.empty(), Optional.empty()); + this(relationId, type, table, qualifier, Optional.empty(), Optional.empty(), ""); } public LogicalCatalogRelation(RelationId relationId, PlanType type, TableIf table, List qualifier, Optional groupExpression, Optional logicalProperties) { this(relationId, type, table, qualifier, ImmutableList.of(), ImmutableList.of(), - groupExpression, logicalProperties); + groupExpression, logicalProperties, ""); + } + + public LogicalCatalogRelation(RelationId relationId, PlanType type, TableIf table, List qualifier, + Optional groupExpression, Optional logicalProperties, + String tableAlias) { + this(relationId, type, table, qualifier, ImmutableList.of(), ImmutableList.of(), + groupExpression, logicalProperties, tableAlias); } /** * Constructs a LogicalCatalogRelation with specified parameters. * - * @param relationId Unique identifier for this relation - * @param type Plan type - * @param table Table object associated with this relation - * @param qualifier List of qualifiers, typically [catalogName, databaseName] - * @param operativeSlots Collection of operative slots - * @param virtualColumns List of virtual columns - * @param groupExpression Optional group expression + * @param relationId Unique identifier for this relation + * @param type Plan type + * @param table Table object associated with this relation + * @param qualifier List of qualifiers, typically [catalogName, + * databaseName] + * @param operativeSlots Collection of operative slots + * @param virtualColumns List of virtual columns + * @param groupExpression Optional group expression * @param logicalProperties Optional logical properties + * @param tableAlias Table alias for this relation, empty string if no + * alias */ public LogicalCatalogRelation(RelationId relationId, PlanType type, TableIf table, List qualifier, Collection operativeSlots, List virtualColumns, - Optional groupExpression, Optional logicalProperties) { + Optional groupExpression, Optional logicalProperties, + String tableAlias) { super(relationId, type, groupExpression, logicalProperties); this.table = Objects.requireNonNull(table, "table can not be null"); this.qualifier = Utils.fastToImmutableList(Objects.requireNonNull(qualifier, "qualifier can not be null")); this.operativeSlots = Utils.fastToImmutableList(operativeSlots); this.virtualColumns = Utils.fastToImmutableList(Objects.requireNonNull(virtualColumns, "virtualColumns can not be null")); + this.tableAlias = Objects.requireNonNull(tableAlias, "tableAlias can not be null"); } @Override @@ -174,6 +191,10 @@ public List getVirtualColumns() { return virtualColumns; } + public String getTableAlias() { + return tableAlias; + } + @Override public void computeUnique(DataTrait.Builder builder) { Set outputSet = Utils.fastToImmutableSet(getOutputSet()); @@ -299,6 +320,14 @@ private boolean hasSameOutputSlotSemantics(Slot left, Slot right) { public abstract LogicalCatalogRelation withRelationId(RelationId relationId); + /** + * Return a new LogicalCatalogRelation with the specified table alias. + * + * @param tableAlias the table alias to set + * @return a new LogicalCatalogRelation with the specified table alias + */ + public abstract LogicalCatalogRelation withTableAlias(String tableAlias); + @Override public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalDeferMaterializeOlapScan.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalDeferMaterializeOlapScan.java index 33741e7fdb2bd3..8017e6795c8e26 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalDeferMaterializeOlapScan.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalDeferMaterializeOlapScan.java @@ -64,7 +64,7 @@ public LogicalDeferMaterializeOlapScan(LogicalOlapScan logicalOlapScan, Set deferMaterializeSlotIds, SlotReference columnIdSlot, Optional groupExpression, Optional logicalProperties) { super(logicalOlapScan.getRelationId(), logicalOlapScan.getType(), logicalOlapScan.getTable(), - logicalOlapScan.getQualifier(), groupExpression, logicalProperties); + logicalOlapScan.getQualifier(), groupExpression, logicalProperties, logicalOlapScan.getTableAlias()); this.logicalOlapScan = Objects.requireNonNull(logicalOlapScan, "logicalOlapScan can not be null"); this.deferMaterializeSlotIds = ImmutableSet.copyOf(Objects.requireNonNull(deferMaterializeSlotIds, "deferMaterializeSlotIds can not be null")); @@ -136,6 +136,14 @@ public LogicalDeferMaterializeOlapScan withRelationId(RelationId relationId) { throw new RuntimeException("should not call LogicalDeferMaterializeOlapScan's withRelationId method"); } + @Override + public LogicalDeferMaterializeOlapScan withTableAlias(String tableAlias) { + // Update the wrapped LogicalOlapScan with the new alias + LogicalOlapScan newOlapScan = logicalOlapScan.withTableAlias(tableAlias); + return new LogicalDeferMaterializeOlapScan(newOlapScan, deferMaterializeSlotIds, columnIdSlot, + Optional.empty(), Optional.of(getLogicalProperties())); + } + @Override public R accept(PlanVisitor visitor, C context) { return visitor.visitLogicalDeferMaterializeOlapScan(this, context); @@ -167,9 +175,9 @@ public int hashCode() { public String toString() { return Utils.toSqlStringSkipNull("LogicalDeferMaterializeOlapScan[" + id.asInt() + "]", "olapScan", logicalOlapScan, + "alias", tableAlias, "deferMaterializeSlotIds", deferMaterializeSlotIds, "columnIdSlot", columnIdSlot, - "stats", statistics - ); + "stats", statistics); } } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalEsScan.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalEsScan.java index bcc42ea5557baf..f3a38212faa5b4 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalEsScan.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalEsScan.java @@ -41,45 +41,60 @@ public class LogicalEsScan extends LogicalCatalogRelation { * Constructor for LogicalEsScan. */ public LogicalEsScan(RelationId id, TableIf table, List qualifier, - List virtualColumns, - Optional groupExpression, - Optional logicalProperties) { + List virtualColumns, + Optional groupExpression, + Optional logicalProperties, String tableAlias) { super(id, PlanType.LOGICAL_ES_SCAN, table, qualifier, - ImmutableList.of(), virtualColumns, groupExpression, logicalProperties); + ImmutableList.of(), virtualColumns, groupExpression, logicalProperties, tableAlias); + } + + public LogicalEsScan(RelationId id, TableIf table, List qualifier, + List virtualColumns, + Optional groupExpression, + Optional logicalProperties) { + this(id, table, qualifier, virtualColumns, groupExpression, logicalProperties, ""); } public LogicalEsScan(RelationId id, TableIf table, List qualifier) { - this(id, table, qualifier, ImmutableList.of(), Optional.empty(), Optional.empty()); + this(id, table, qualifier, ImmutableList.of(), Optional.empty(), Optional.empty(), ""); } @Override public String toString() { return Utils.toSqlStringSkipNull("LogicalEsScan", - "qualified", qualifiedName(), - "output", getOutput(), "stats", statistics - ); + "qualified", qualifiedName(), + "alias", tableAlias, + "output", getOutput(), "stats", statistics); } @Override public LogicalEsScan withGroupExpression(Optional groupExpression) { return new LogicalEsScan(relationId, table, qualifier, virtualColumns, - groupExpression, Optional.of(getLogicalProperties())); + groupExpression, Optional.of(getLogicalProperties()), tableAlias); } @Override public Plan withGroupExprLogicalPropChildren(Optional groupExpression, Optional logicalProperties, List children) { - return new LogicalEsScan(relationId, table, qualifier, virtualColumns, groupExpression, logicalProperties); + return new LogicalEsScan(relationId, table, qualifier, virtualColumns, groupExpression, logicalProperties, + tableAlias); } @Override public LogicalEsScan withRelationId(RelationId relationId) { - return new LogicalEsScan(relationId, table, qualifier, virtualColumns, Optional.empty(), Optional.empty()); + return new LogicalEsScan(relationId, table, qualifier, virtualColumns, Optional.empty(), Optional.empty(), + tableAlias); } @Override public LogicalEsScan withVirtualColumns(List virtualColumns) { - return new LogicalEsScan(relationId, table, qualifier, virtualColumns, Optional.empty(), Optional.empty()); + return new LogicalEsScan(relationId, table, qualifier, virtualColumns, Optional.empty(), Optional.empty(), + tableAlias); + } + + public LogicalEsScan withTableAlias(String tableAlias) { + return new LogicalEsScan(relationId, table, qualifier, virtualColumns, Optional.empty(), + Optional.of(getLogicalProperties()), tableAlias); } @Override diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalFileScan.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalFileScan.java index 12dfffea883152..d19be98b97e8e1 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalFileScan.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalFileScan.java @@ -95,7 +95,7 @@ public LogicalFileScan(RelationId id, ExternalTable table, List qualifie operativeSlots, ImmutableList.of(), tableSample, tableSnapshot, scanParams, Optional.empty(), Optional.empty(), - cachedOutputs, captureRelationSchema(table, scanParams, relationSnapshot), relationSnapshot); + cachedOutputs, captureRelationSchema(table, scanParams, relationSnapshot), relationSnapshot, ""); } /** @@ -122,7 +122,7 @@ protected LogicalFileScan(RelationId id, ExternalTable table, List quali Optional> cachedSlots, Optional> relationSchema) { this(id, table, qualifier, selectedPartitions, operativeSlots, virtualColumns, tableSample, tableSnapshot, scanParams, groupExpression, logicalProperties, cachedSlots, relationSchema, - MvccUtil.getSnapshotFromContext(table)); + MvccUtil.getSnapshotFromContext(table), ""); } protected LogicalFileScan(RelationId id, ExternalTable table, List qualifier, @@ -131,9 +131,9 @@ protected LogicalFileScan(RelationId id, ExternalTable table, List quali Optional tableSnapshot, Optional scanParams, Optional groupExpression, Optional logicalProperties, Optional> cachedSlots, Optional> relationSchema, - Optional relationSnapshot) { + Optional relationSnapshot, String tableAlias) { super(id, PlanType.LOGICAL_FILE_SCAN, table, qualifier, operativeSlots, virtualColumns, - groupExpression, logicalProperties); + groupExpression, logicalProperties, tableAlias); this.selectedPartitions = selectedPartitions; this.tableSample = tableSample; this.tableSnapshot = tableSnapshot; @@ -143,6 +143,31 @@ protected LogicalFileScan(RelationId id, ExternalTable table, List quali this.relationSnapshot = relationSnapshot; } + /** + * Constructor for LogicalFileScan, kept for subclasses that were not updated with a table alias. + */ + protected LogicalFileScan(RelationId id, ExternalTable table, List qualifier, + SelectedPartitions selectedPartitions, Collection operativeSlots, + List virtualColumns, Optional tableSample, + Optional tableSnapshot, Optional scanParams, + Optional groupExpression, Optional logicalProperties, + Optional> cachedSlots, Optional> relationSchema, + Optional relationSnapshot) { + this(id, table, qualifier, selectedPartitions, operativeSlots, virtualColumns, tableSample, tableSnapshot, + scanParams, groupExpression, logicalProperties, cachedSlots, relationSchema, + relationSnapshot, ""); + } + + protected LogicalFileScan(RelationId id, ExternalTable table, List qualifier, + SelectedPartitions selectedPartitions, Collection operativeSlots, + List virtualColumns, Optional tableSample, + Optional tableSnapshot, Optional scanParams, + Optional groupExpression, Optional logicalProperties) { + this(id, table, qualifier, selectedPartitions, operativeSlots, virtualColumns, tableSample, tableSnapshot, + scanParams, groupExpression, logicalProperties, Optional.empty(), Optional.empty(), + MvccUtil.getSnapshotFromContext(table), ""); + } + private static SelectedPartitions initialSelectedPartitions( ExternalTable table, Optional scanParams, Optional relationSnapshot) { @@ -217,10 +242,10 @@ public ExternalTable getTable() { public String toString() { return Utils.toSqlStringSkipNull("LogicalFileScan", "qualified", qualifiedName(), + "alias", tableAlias, "output", getOutput(), "operativeCols", operativeSlots, - "stats", statistics - ); + "stats", statistics); } @Override @@ -228,7 +253,7 @@ public LogicalFileScan withGroupExpression(Optional groupExpres return new LogicalFileScan(relationId, (ExternalTable) table, qualifier, selectedPartitions, operativeSlots, virtualColumns, tableSample, tableSnapshot, scanParams, groupExpression, Optional.of(getLogicalProperties()), - cachedOutputs, relationSchema, relationSnapshot); + cachedOutputs, relationSchema, relationSnapshot, tableAlias); } @Override @@ -237,14 +262,14 @@ public Plan withGroupExprLogicalPropChildren(Optional groupExpr return new LogicalFileScan(relationId, (ExternalTable) table, qualifier, selectedPartitions, operativeSlots, virtualColumns, tableSample, tableSnapshot, scanParams, groupExpression, logicalProperties, cachedOutputs, - relationSchema, relationSnapshot); + relationSchema, relationSnapshot, tableAlias); } public LogicalFileScan withSelectedPartitions(SelectedPartitions selectedPartitions) { return new LogicalFileScan(relationId, (ExternalTable) table, qualifier, selectedPartitions, operativeSlots, virtualColumns, tableSample, tableSnapshot, scanParams, Optional.empty(), Optional.of(getLogicalProperties()), - cachedOutputs, relationSchema, relationSnapshot); + cachedOutputs, relationSchema, relationSnapshot, tableAlias); } @Override @@ -252,7 +277,15 @@ public LogicalFileScan withRelationId(RelationId relationId) { return new LogicalFileScan(relationId, (ExternalTable) table, qualifier, selectedPartitions, operativeSlots, virtualColumns, tableSample, tableSnapshot, scanParams, Optional.empty(), Optional.empty(), cachedOutputs, - relationSchema, relationSnapshot); + relationSchema, relationSnapshot, tableAlias); + } + + @Override + public LogicalFileScan withTableAlias(String tableAlias) { + return new LogicalFileScan(relationId, (ExternalTable) table, qualifier, + selectedPartitions, operativeSlots, virtualColumns, tableSample, tableSnapshot, + scanParams, Optional.empty(), Optional.of(getLogicalProperties()), cachedOutputs, + relationSchema, relationSnapshot, tableAlias); } @Override @@ -452,14 +485,14 @@ public LogicalFileScan withOperativeSlots(Collection operativeSlots) { return new LogicalFileScan(relationId, (ExternalTable) table, qualifier, selectedPartitions, operativeSlots, virtualColumns, tableSample, tableSnapshot, scanParams, groupExpression, Optional.of(getLogicalProperties()), - cachedOutputs, relationSchema, relationSnapshot); + cachedOutputs, relationSchema, relationSnapshot, tableAlias); } public LogicalFileScan withCachedOutput(List cachedOutputs) { return new LogicalFileScan(relationId, (ExternalTable) table, qualifier, selectedPartitions, operativeSlots, virtualColumns, tableSample, tableSnapshot, scanParams, groupExpression, Optional.empty(), Optional.of(cachedOutputs), - relationSchema, relationSnapshot); + relationSchema, relationSnapshot, tableAlias); } @Override diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalJdbcScan.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalJdbcScan.java index 13491ea76f9d98..ef55849ca6375f 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalJdbcScan.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalJdbcScan.java @@ -44,13 +44,19 @@ public class LogicalJdbcScan extends LogicalCatalogRelation { * Constructor for LogicalJdbcScan. */ public LogicalJdbcScan(RelationId id, TableIf table, List qualifier, List virtualColumns, - Optional groupExpression, Optional logicalProperties) { + Optional groupExpression, Optional logicalProperties, + String tableAlias) { super(id, PlanType.LOGICAL_JDBC_SCAN, table, qualifier, ImmutableList.of(), virtualColumns, - groupExpression, logicalProperties); + groupExpression, logicalProperties, tableAlias); + } + + public LogicalJdbcScan(RelationId id, TableIf table, List qualifier, List virtualColumns, + Optional groupExpression, Optional logicalProperties) { + this(id, table, qualifier, virtualColumns, groupExpression, logicalProperties, ""); } public LogicalJdbcScan(RelationId id, TableIf table, List qualifier) { - this(id, table, qualifier, ImmutableList.of(), Optional.empty(), Optional.empty()); + this(id, table, qualifier, ImmutableList.of(), Optional.empty(), Optional.empty(), ""); } @Override @@ -63,28 +69,33 @@ public TableIf getTable() { @Override public String toString() { return Utils.toSqlString("LogicalJdbcScan", - "qualified", qualifiedName(), - "output", getOutput() - ); + "qualified", qualifiedName(), + "alias", tableAlias, + "output", getOutput()); } @Override public LogicalJdbcScan withGroupExpression(Optional groupExpression) { return new LogicalJdbcScan(relationId, table, qualifier, virtualColumns, - groupExpression, Optional.of(getLogicalProperties())); + groupExpression, Optional.of(getLogicalProperties()), tableAlias); } @Override public Plan withGroupExprLogicalPropChildren(Optional groupExpression, Optional logicalProperties, List children) { return new LogicalJdbcScan(relationId, table, qualifier, virtualColumns, - groupExpression, logicalProperties); + groupExpression, logicalProperties, tableAlias); } @Override public LogicalJdbcScan withRelationId(RelationId relationId) { return new LogicalJdbcScan(relationId, table, qualifier, virtualColumns, - Optional.empty(), Optional.empty()); + Optional.empty(), Optional.empty(), tableAlias); + } + + public LogicalJdbcScan withTableAlias(String tableAlias) { + return new LogicalJdbcScan(relationId, table, qualifier, virtualColumns, Optional.empty(), + Optional.of(getLogicalProperties()), tableAlias); } @Override diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalOdbcScan.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalOdbcScan.java index 51d108fc0328da..c33340254c9de1 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalOdbcScan.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalOdbcScan.java @@ -37,14 +37,20 @@ */ public class LogicalOdbcScan extends LogicalCatalogRelation { + public LogicalOdbcScan(RelationId id, TableIf table, List qualifier, + Optional groupExpression, + Optional logicalProperties, String tableAlias) { + super(id, PlanType.LOGICAL_ODBC_SCAN, table, qualifier, groupExpression, logicalProperties, tableAlias); + } + public LogicalOdbcScan(RelationId id, TableIf table, List qualifier, Optional groupExpression, Optional logicalProperties) { - super(id, PlanType.LOGICAL_ODBC_SCAN, table, qualifier, groupExpression, logicalProperties); + this(id, table, qualifier, groupExpression, logicalProperties, ""); } public LogicalOdbcScan(RelationId id, TableIf table, List qualifier) { - this(id, table, qualifier, Optional.empty(), Optional.empty()); + this(id, table, qualifier, Optional.empty(), Optional.empty(), ""); } @Override @@ -58,25 +64,30 @@ public TableIf getTable() { public String toString() { return Utils.toSqlString("LogicalOdbcScan", "qualified", qualifiedName(), - "output", getOutput() - ); + "alias", tableAlias, + "output", getOutput()); } @Override public LogicalOdbcScan withGroupExpression(Optional groupExpression) { return new LogicalOdbcScan(relationId, table, qualifier, groupExpression, - Optional.of(getLogicalProperties())); + Optional.of(getLogicalProperties()), tableAlias); } @Override public Plan withGroupExprLogicalPropChildren(Optional groupExpression, Optional logicalProperties, List children) { - return new LogicalOdbcScan(relationId, table, qualifier, groupExpression, logicalProperties); + return new LogicalOdbcScan(relationId, table, qualifier, groupExpression, logicalProperties, tableAlias); } @Override public LogicalOdbcScan withRelationId(RelationId relationId) { - return new LogicalOdbcScan(relationId, table, qualifier, Optional.empty(), Optional.empty()); + return new LogicalOdbcScan(relationId, table, qualifier, Optional.empty(), Optional.empty(), tableAlias); + } + + public LogicalOdbcScan withTableAlias(String tableAlias) { + return new LogicalOdbcScan(relationId, table, qualifier, Optional.empty(), + Optional.of(getLogicalProperties()), tableAlias); } @Override diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalOlapScan.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalOlapScan.java index 4ccf0d2bcd6055..eefa0d0e2263fd 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalOlapScan.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalOlapScan.java @@ -187,7 +187,7 @@ public LogicalOlapScan(RelationId id, OlapTable table, List qualifier) { Maps.newHashMap(), Optional.empty(), Optional.empty(), false, ImmutableMap.of(), ImmutableList.of(), ImmutableList.of(), ImmutableList.of(), ImmutableList.of(), Optional.empty(), Optional.empty(), ImmutableList.of(), Optional.empty(), - Optional.empty()); + Optional.empty(), ""); } /** @@ -200,7 +200,7 @@ public LogicalOlapScan(RelationId id, OlapTable table, List qualifier, L -1, false, PreAggStatus.unset(), ImmutableList.of(), hints, Maps.newHashMap(), Optional.empty(), tableSample, false, ImmutableMap.of(), ImmutableList.of(), operativeSlots, ImmutableList.of(), ImmutableList.of(), Optional.empty(), Optional.empty(), - ImmutableList.of(), Optional.empty(), Optional.empty()); + ImmutableList.of(), Optional.empty(), Optional.empty(), ""); } /** @@ -214,7 +214,7 @@ public LogicalOlapScan(RelationId id, OlapTable table, List qualifier, L -1, false, PreAggStatus.unset(), specifiedPartitions, hints, Maps.newHashMap(), Optional.empty(), tableSample, false, ImmutableMap.of(), ImmutableList.of(), operativeSlots, ImmutableList.of(), ImmutableList.of(), Optional.empty(), Optional.empty(), - ImmutableList.of(), Optional.empty(), Optional.empty()); + ImmutableList.of(), Optional.empty(), Optional.empty(), ""); } /** @@ -230,7 +230,7 @@ public LogicalOlapScan(RelationId id, OlapTable table, List qualifier, L specifiedPartitions, hints, Maps.newHashMap(), Optional.empty(), tableSample, true, ImmutableMap.of(), ImmutableList.of(), operativeSlots, ImmutableList.of(), ImmutableList.of(), Optional.empty(), Optional.empty(), - ImmutableList.of(), Optional.empty(), Optional.empty()); + ImmutableList.of(), Optional.empty(), Optional.empty(), ""); } /** @@ -252,7 +252,7 @@ public LogicalOlapScan(RelationId id, Table table, List qualifier, specifiedPartitions, hints, cacheSlotWithSlotName, cachedOutput, tableSample, directMvScan, colToSubPathsMap, specifiedTabletIds, operativeSlots, virtualColumns, scoreOrderKeys, scoreLimit, scoreRangeInfo, annOrderKeys, annLimit, - Optional.empty()); + Optional.empty(), ""); } /** @@ -269,9 +269,9 @@ public LogicalOlapScan(RelationId id, Table table, List qualifier, Collection operativeSlots, List virtualColumns, List scoreOrderKeys, Optional scoreLimit, Optional scoreRangeInfo, List annOrderKeys, Optional annLimit, - Optional partitionPrunablePredicates) { + Optional partitionPrunablePredicates, String tableAlias) { super(id, PlanType.LOGICAL_OLAP_SCAN, table, qualifier, - operativeSlots, virtualColumns, groupExpression, logicalProperties); + operativeSlots, virtualColumns, groupExpression, logicalProperties, tableAlias); Preconditions.checkArgument(selectedPartitionIds != null, "selectedPartitionIds can not be null"); this.selectedTabletIds = Utils.fastToImmutableList(selectedTabletIds); @@ -336,7 +336,7 @@ public LogicalOlapScan withPartitionPrunablePredicates( hints, cacheSlotWithSlotName, cachedOutput, tableSample, directMvScan, colToSubPathsMap, manuallySpecifiedTabletIds, operativeSlots, virtualColumns, scoreOrderKeys, scoreLimit, scoreRangeInfo, annOrderKeys, annLimit, - partitionPrunablePredicates); + partitionPrunablePredicates, tableAlias); } public boolean hasPartitionPredicate() { @@ -375,6 +375,7 @@ public OlapTable getTable() { public String toString() { return Utils.toSqlStringSkipNull("LogicalOlapScan", "qualified", qualifiedName(), + "alias", tableAlias, "indexName", getSelectedMaterializedIndexName().orElse(""), "selectedIndexId", selectedIndexId, "preAgg", preAggStatus, @@ -426,7 +427,8 @@ public LogicalOlapScan withGroupExpression(Optional groupExpres selectedIndexId, indexSelected, preAggStatus, manuallySpecifiedPartitions, hints, cacheSlotWithSlotName, cachedOutput, tableSample, directMvScan, colToSubPathsMap, manuallySpecifiedTabletIds, operativeSlots, virtualColumns, - scoreOrderKeys, scoreLimit, scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates); + scoreOrderKeys, scoreLimit, scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates, + tableAlias); } @Override @@ -437,7 +439,8 @@ public Plan withGroupExprLogicalPropChildren(Optional groupExpr selectedIndexId, indexSelected, preAggStatus, manuallySpecifiedPartitions, hints, cacheSlotWithSlotName, cachedOutput, tableSample, directMvScan, colToSubPathsMap, manuallySpecifiedTabletIds, operativeSlots, virtualColumns, - scoreOrderKeys, scoreLimit, scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates); + scoreOrderKeys, scoreLimit, scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates, + tableAlias); } /** @@ -458,7 +461,8 @@ public LogicalOlapScan withSelectedPartitionIds(List selectedPartitionIds, selectedIndexId, indexSelected, preAggStatus, manuallySpecifiedPartitions, hints, cacheSlotWithSlotName, cachedOutput, tableSample, directMvScan, colToSubPathsMap, manuallySpecifiedTabletIds, operativeSlots, virtualColumns, - scoreOrderKeys, scoreLimit, scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates); + scoreOrderKeys, scoreLimit, scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates, + tableAlias); } /** @@ -473,7 +477,7 @@ public LogicalOlapScan withMaterializedIndexSelected(long indexId) { indexId, true, PreAggStatus.unset(), manuallySpecifiedPartitions, hints, cacheSlotWithSlotName, cachedOutput, tableSample, directMvScan, colToSubPathsMap, manuallySpecifiedTabletIds, operativeSlots, virtualColumns, scoreOrderKeys, scoreLimit, scoreRangeInfo, - annOrderKeys, annLimit, partitionPrunablePredicates); + annOrderKeys, annLimit, partitionPrunablePredicates, tableAlias); } /** @@ -486,7 +490,7 @@ public LogicalOlapScan withSelectedTabletIds(List selectedTabletIds) { selectedIndexId, indexSelected, preAggStatus, manuallySpecifiedPartitions, hints, cacheSlotWithSlotName, cachedOutput, tableSample, directMvScan, colToSubPathsMap, manuallySpecifiedTabletIds, operativeSlots, virtualColumns, scoreOrderKeys, - scoreLimit, scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates); + scoreLimit, scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates, tableAlias); } /** @@ -499,7 +503,8 @@ public LogicalOlapScan withPreAggStatus(PreAggStatus preAggStatus) { selectedIndexId, indexSelected, preAggStatus, manuallySpecifiedPartitions, hints, cacheSlotWithSlotName, cachedOutput, tableSample, directMvScan, colToSubPathsMap, manuallySpecifiedTabletIds, operativeSlots, virtualColumns, - scoreOrderKeys, scoreLimit, scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates); + scoreOrderKeys, scoreLimit, scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates, + tableAlias); } /** @@ -512,7 +517,8 @@ public LogicalOlapScan withColToSubPathsMap(Map>> colTo selectedIndexId, indexSelected, preAggStatus, manuallySpecifiedPartitions, hints, cacheSlotWithSlotName, cachedOutput, tableSample, directMvScan, colToSubPathsMap, manuallySpecifiedTabletIds, operativeSlots, virtualColumns, - scoreOrderKeys, scoreLimit, scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates); + scoreOrderKeys, scoreLimit, scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates, + tableAlias); } /** @@ -525,7 +531,8 @@ public LogicalOlapScan withManuallySpecifiedTabletIds(List manuallySpecifi selectedIndexId, indexSelected, preAggStatus, manuallySpecifiedPartitions, hints, cacheSlotWithSlotName, cachedOutput, tableSample, directMvScan, colToSubPathsMap, manuallySpecifiedTabletIds, operativeSlots, virtualColumns, - scoreOrderKeys, scoreLimit, scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates); + scoreOrderKeys, scoreLimit, scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates, + tableAlias); } @Override @@ -537,7 +544,18 @@ public LogicalOlapScan withRelationId(RelationId relationId) { selectedIndexId, indexSelected, preAggStatus, manuallySpecifiedPartitions, hints, Maps.newHashMap(), Optional.empty(), tableSample, directMvScan, colToSubPathsMap, selectedTabletIds, operativeSlots, virtualColumns, scoreOrderKeys, - scoreLimit, scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates); + scoreLimit, scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates, tableAlias); + } + + @Override + public LogicalOlapScan withTableAlias(String tableAlias) { + return new LogicalOlapScan(relationId, (Table) table, qualifier, + Optional.empty(), Optional.of(getLogicalProperties()), + selectedPartitionIds, partitionPruned, hasPartitionPredicate, selectedTabletIds, + selectedIndexId, indexSelected, preAggStatus, manuallySpecifiedPartitions, + hints, cacheSlotWithSlotName, cachedOutput, tableSample, directMvScan, colToSubPathsMap, + manuallySpecifiedTabletIds, operativeSlots, virtualColumns, scoreOrderKeys, scoreLimit, + scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates, tableAlias); } /** @@ -557,7 +575,7 @@ public LogicalOlapScan withVirtualColumns(List virtualColumns) selectedIndexId, indexSelected, preAggStatus, manuallySpecifiedPartitions, hints, cacheSlotWithSlotName, cachedOutput, tableSample, directMvScan, colToSubPathsMap, manuallySpecifiedTabletIds, operativeSlots, virtualColumns, scoreOrderKeys, scoreLimit, - scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates); + scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates, tableAlias); } /** @@ -580,7 +598,7 @@ public LogicalOlapScan appendVirtualColumns(List additionalVirt selectedIndexId, indexSelected, preAggStatus, manuallySpecifiedPartitions, hints, cacheSlotWithSlotName, cachedOutput, tableSample, directMvScan, colToSubPathsMap, manuallySpecifiedTabletIds, operativeSlots, mergedVirtualColumns, scoreOrderKeys, scoreLimit, - scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates); + scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates, tableAlias); } /** @@ -609,7 +627,7 @@ public LogicalOlapScan appendVirtualColumnsAndTopN( selectedIndexId, indexSelected, preAggStatus, manuallySpecifiedPartitions, hints, cacheSlotWithSlotName, cachedOutput, tableSample, directMvScan, colToSubPathsMap, manuallySpecifiedTabletIds, operativeSlots, mergedVirtualColumns, scoreOrderKeys, scoreLimit, - scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates); + scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates, tableAlias); } @Override @@ -1011,7 +1029,7 @@ public CatalogRelation withOperativeSlots(Collection operativeSlots) { selectedIndexId, indexSelected, preAggStatus, manuallySpecifiedPartitions, hints, cacheSlotWithSlotName, cachedOutput, tableSample, directMvScan, colToSubPathsMap, manuallySpecifiedTabletIds, operativeSlots, virtualColumns, scoreOrderKeys, scoreLimit, - scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates); + scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates, tableAlias); } @VisibleForTesting @@ -1092,7 +1110,7 @@ public LogicalOlapScan withCachedOutput(List outputSlots) { selectedIndexId, indexSelected, preAggStatus, manuallySpecifiedPartitions, hints, cacheSlotWithSlotName, Optional.of(outputSlots), tableSample, directMvScan, colToSubPathsMap, manuallySpecifiedTabletIds, operativeSlots, virtualColumns, scoreOrderKeys, scoreLimit, - scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates); + scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates, tableAlias); } @Override diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalSchemaScan.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalSchemaScan.java index 586d5b9c8e1f3e..7fbdd9c8ea61ee 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalSchemaScan.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalSchemaScan.java @@ -54,24 +54,29 @@ public LogicalSchemaScan(RelationId id, TableIf table, List qualifier) { /** * Constructs a LogicalSchemaScan with the specified parameters. * - * @param id Unique identifier for this relation - * @param table The table interface representing the underlying data source - * @param qualifier The qualifier list representing the path to this table - * @param filterPushed Whether filter has been pushed down to this scan operation - * @param schemaCatalog Optional catalog name in the schema - * @param schemaDatabase Optional database name in the schema - * @param schemaTable Optional table name in the schema - * @param virtualColumns List of virtual columns to be included in the scan + * @param id Unique identifier for this relation + * @param table The table interface representing the underlying data + * source + * @param qualifier The qualifier list representing the path to this + * table + * @param filterPushed Whether filter has been pushed down to this scan + * operation + * @param schemaCatalog Optional catalog name in the schema + * @param schemaDatabase Optional database name in the schema + * @param schemaTable Optional table name in the schema + * @param virtualColumns List of virtual columns to be included in the scan * @param frontendConjuncts conjuncts needed by FrontendService - * @param groupExpression Optional group expression for memo representation + * @param groupExpression Optional group expression for memo representation * @param logicalProperties Optional logical properties for this plan node + * @param tableAlias Table alias for this scan */ public LogicalSchemaScan(RelationId id, TableIf table, List qualifier, boolean filterPushed, Optional schemaCatalog, Optional schemaDatabase, Optional schemaTable, List virtualColumns, List frontendConjuncts, - Optional groupExpression, Optional logicalProperties) { + Optional groupExpression, Optional logicalProperties, + String tableAlias) { super(id, PlanType.LOGICAL_SCHEMA_SCAN, table, qualifier, ImmutableList.of(), virtualColumns, - groupExpression, logicalProperties); + groupExpression, logicalProperties, tableAlias); this.filterPushed = filterPushed; this.schemaCatalog = schemaCatalog; this.schemaDatabase = schemaDatabase; @@ -79,6 +84,14 @@ public LogicalSchemaScan(RelationId id, TableIf table, List qualifier, b this.frontendConjuncts = frontendConjuncts; } + public LogicalSchemaScan(RelationId id, TableIf table, List qualifier, boolean filterPushed, + Optional schemaCatalog, Optional schemaDatabase, Optional schemaTable, + List virtualColumns, List frontendConjuncts, + Optional groupExpression, Optional logicalProperties) { + this(id, table, qualifier, filterPushed, schemaCatalog, schemaDatabase, schemaTable, virtualColumns, + frontendConjuncts, groupExpression, logicalProperties, ""); + } + public boolean isFilterPushed() { return filterPushed; } @@ -121,7 +134,7 @@ public R accept(PlanVisitor visitor, C context) { public Plan withGroupExpression(Optional groupExpression) { return new LogicalSchemaScan(relationId, table, qualifier, filterPushed, schemaCatalog, schemaDatabase, schemaTable, virtualColumns, - frontendConjuncts, groupExpression, Optional.of(getLogicalProperties())); + frontendConjuncts, groupExpression, Optional.of(getLogicalProperties()), tableAlias); } @Override @@ -129,25 +142,33 @@ public Plan withGroupExprLogicalPropChildren(Optional groupExpr Optional logicalProperties, List children) { return new LogicalSchemaScan(relationId, table, qualifier, filterPushed, schemaCatalog, schemaDatabase, schemaTable, virtualColumns, frontendConjuncts, groupExpression, - logicalProperties); + logicalProperties, tableAlias); } @Override public LogicalSchemaScan withRelationId(RelationId relationId) { return new LogicalSchemaScan(relationId, table, qualifier, filterPushed, schemaCatalog, schemaDatabase, schemaTable, virtualColumns, frontendConjuncts, Optional.empty(), - Optional.empty()); + Optional.empty(), tableAlias); } public LogicalSchemaScan withFrontendConjuncts(Optional schemaCatalog, Optional schemaDatabase, Optional schemaTable, List frontendConjuncts) { return new LogicalSchemaScan(relationId, table, qualifier, true, schemaCatalog, schemaDatabase, schemaTable, - virtualColumns, frontendConjuncts, Optional.empty(), Optional.of(getLogicalProperties())); + virtualColumns, frontendConjuncts, Optional.empty(), Optional.of(getLogicalProperties()), tableAlias); + } + + public LogicalSchemaScan withTableAlias(String tableAlias) { + return new LogicalSchemaScan(relationId, table, qualifier, filterPushed, schemaCatalog, schemaDatabase, + schemaTable, virtualColumns, frontendConjuncts, Optional.empty(), + Optional.of(getLogicalProperties()), tableAlias); } @Override public String toString() { - return Utils.toSqlString("LogicalSchemaScan"); + return Utils.toSqlString("LogicalSchemaScan", + "qualified", qualifiedName(), + "alias", tableAlias); } @Override diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalTestScan.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalTestScan.java index 869cbd5ccc160d..f2b576dc832f9d 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalTestScan.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalTestScan.java @@ -37,20 +37,26 @@ */ public class LogicalTestScan extends LogicalCatalogRelation { public LogicalTestScan(RelationId relationId, TableIf table, List qualifier) { - this(relationId, table, qualifier, Optional.empty(), Optional.empty()); + this(relationId, table, qualifier, Optional.empty(), Optional.empty(), ""); } private LogicalTestScan(RelationId relationId, TableIf table, List qualifier, - Optional groupExpression, Optional logicalProperties) { - super(relationId, PlanType.LOGICAL_TEST_SCAN, table, qualifier, groupExpression, logicalProperties); + Optional groupExpression, Optional logicalProperties, + String tableAlias) { + super(relationId, PlanType.LOGICAL_TEST_SCAN, table, qualifier, groupExpression, logicalProperties, tableAlias); + } + + private LogicalTestScan(RelationId relationId, TableIf table, List qualifier, + Optional groupExpression, Optional logicalProperties) { + this(relationId, table, qualifier, groupExpression, logicalProperties, ""); } @Override public String toString() { return Utils.toSqlString("LogicalTestScan", "qualified", qualifiedName(), - "output", getOutput() - ); + "alias", tableAlias, + "output", getOutput()); } @Override @@ -61,13 +67,18 @@ public boolean equals(Object o) { @Override public Plan withGroupExpression(Optional groupExpression) { return new LogicalTestScan(relationId, table, qualifier, - groupExpression, Optional.ofNullable(getLogicalProperties())); + groupExpression, Optional.ofNullable(getLogicalProperties()), tableAlias); } @Override public Plan withGroupExprLogicalPropChildren(Optional groupExpression, Optional logicalProperties, List children) { - return new LogicalTestScan(relationId, table, qualifier, groupExpression, logicalProperties); + return new LogicalTestScan(relationId, table, qualifier, groupExpression, logicalProperties, tableAlias); + } + + public LogicalTestScan withTableAlias(String tableAlias) { + return new LogicalTestScan(relationId, table, qualifier, Optional.empty(), + Optional.of(getLogicalProperties()), tableAlias); } @Override diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalCatalogRelation.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalCatalogRelation.java index 909ec09ee51537..82ead42ed74e4a 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalCatalogRelation.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalCatalogRelation.java @@ -60,6 +60,7 @@ public abstract class PhysicalCatalogRelation extends PhysicalRelation implement protected final TableIf table; protected final ImmutableList qualifier; protected final ImmutableList operativeSlots; + protected final String tableAlias; /** * Constructor for PhysicalCatalogRelation. @@ -75,6 +76,7 @@ public PhysicalCatalogRelation(RelationId relationId, PlanType type, TableIf tab this.qualifier = ImmutableList.copyOf(Objects.requireNonNull(qualifier, "qualifier can not be null")); this.operativeSlots = ImmutableList.copyOf(Objects.requireNonNull(operativeSlots, "operativeSlots can not be null")); + this.tableAlias = ""; } /** @@ -93,6 +95,27 @@ public PhysicalCatalogRelation(RelationId relationId, PlanType type, TableIf tab this.qualifier = ImmutableList.copyOf(Objects.requireNonNull(qualifier, "qualifier can not be null")); this.operativeSlots = ImmutableList.copyOf(Objects.requireNonNull(operativeSlots, "operativeSlots can not be null")); + this.tableAlias = ""; + } + + /** + * Constructor for PhysicalCatalogRelation. + * + * @param table Doris table + * @param qualifier qualified relation name + * @param tableAlias table alias + */ + public PhysicalCatalogRelation(RelationId relationId, PlanType type, TableIf table, List qualifier, + Optional groupExpression, LogicalProperties logicalProperties, + PhysicalProperties physicalProperties, + Statistics statistics, + Collection operativeSlots, String tableAlias) { + super(relationId, type, groupExpression, logicalProperties, physicalProperties, statistics); + this.table = Objects.requireNonNull(table, "table can not be null"); + this.qualifier = ImmutableList.copyOf(Objects.requireNonNull(qualifier, "qualifier can not be null")); + this.operativeSlots = ImmutableList.copyOf(Objects.requireNonNull(operativeSlots, + "operativeSlots can not be null")); + this.tableAlias = Objects.requireNonNull(tableAlias, "tableAlias can not be null"); } @Override @@ -151,6 +174,10 @@ public String qualifiedName() { return Utils.qualifiedName(qualifier, table.getName()); } + public String getTableAlias() { + return tableAlias; + } + @Override public boolean canPushDownRuntimeFilter() { return true; @@ -159,8 +186,12 @@ public boolean canPushDownRuntimeFilter() { @Override public String shapeInfo() { StringBuilder shapeBuilder = new StringBuilder(); + String tableNameAndAlias = table.getName(); + if (!"".equals(tableAlias)) { + tableNameAndAlias += "(" + tableAlias + ")"; + } shapeBuilder.append(this.getClass().getSimpleName()) - .append("[").append(table.getName()).append("]"); + .append("[").append(tableNameAndAlias).append("]"); if (!getAppliedRuntimeFilters().isEmpty()) { shapeBuilder.append(" apply RFs:"); getAppliedRuntimeFilters() diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalEsScan.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalEsScan.java index 78939714cce30c..bc893be02214ce 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalEsScan.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalEsScan.java @@ -57,18 +57,29 @@ public PhysicalEsScan(RelationId id, TableIf table, List qualifier, public PhysicalEsScan(RelationId id, TableIf table, List qualifier, DistributionSpec distributionSpec, Optional groupExpression, LogicalProperties logicalProperties, PhysicalProperties physicalProperties, Statistics statistics) { + this(id, table, qualifier, distributionSpec, groupExpression, logicalProperties, + physicalProperties, statistics, ""); + } + + /** + * Constructor for PhysicalEsScan. + */ + public PhysicalEsScan(RelationId id, TableIf table, List qualifier, + DistributionSpec distributionSpec, Optional groupExpression, + LogicalProperties logicalProperties, PhysicalProperties physicalProperties, Statistics statistics, + String tableAlias) { super(id, PlanType.PHYSICAL_ES_SCAN, table, qualifier, groupExpression, logicalProperties, - physicalProperties, statistics, ImmutableList.of()); + physicalProperties, statistics, ImmutableList.of(), tableAlias); this.distributionSpec = distributionSpec; } @Override public String toString() { return Utils.toSqlString("PhysicalEsScan", - "qualified", Utils.qualifiedName(qualifier, table.getName()), - "output", getOutput(), - "stats", statistics - ); + "qualified", Utils.qualifiedName(qualifier, table.getName()), + "alias", tableAlias, + "output", getOutput(), + "stats", statistics); } @Override @@ -79,20 +90,20 @@ public R accept(PlanVisitor visitor, C context) { @Override public PhysicalEsScan withGroupExpression(Optional groupExpression) { return new PhysicalEsScan(relationId, getTable(), qualifier, distributionSpec, - groupExpression, getLogicalProperties()); + groupExpression, getLogicalProperties(), null, null, tableAlias); } @Override public Plan withGroupExprLogicalPropChildren(Optional groupExpression, Optional logicalProperties, List children) { return new PhysicalEsScan(relationId, getTable(), qualifier, distributionSpec, - groupExpression, logicalProperties.get()); + groupExpression, logicalProperties.get(), null, null, tableAlias); } @Override public PhysicalEsScan withPhysicalPropertiesAndStats(PhysicalProperties physicalProperties, - Statistics statsDeriveResult) { + Statistics statsDeriveResult) { return new PhysicalEsScan(relationId, getTable(), qualifier, distributionSpec, - groupExpression, getLogicalProperties(), physicalProperties, statsDeriveResult); + groupExpression, getLogicalProperties(), physicalProperties, statsDeriveResult, tableAlias); } } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalJdbcScan.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalJdbcScan.java index 72aa3db1d741a9..f0d16a60f0ab73 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalJdbcScan.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalJdbcScan.java @@ -56,8 +56,19 @@ public PhysicalJdbcScan(RelationId id, TableIf table, List qualifier, Optional groupExpression, LogicalProperties logicalProperties, PhysicalProperties physicalProperties, Statistics statistics, Collection operativeSlots) { + this(id, table, qualifier, groupExpression, logicalProperties, physicalProperties, statistics, + operativeSlots, ""); + } + + /** + * Constructor for PhysicalJdbcScan. + */ + public PhysicalJdbcScan(RelationId id, TableIf table, List qualifier, + Optional groupExpression, + LogicalProperties logicalProperties, PhysicalProperties physicalProperties, Statistics statistics, + Collection operativeSlots, String tableAlias) { super(id, PlanType.PHYSICAL_JDBC_SCAN, table, qualifier, groupExpression, - logicalProperties, physicalProperties, statistics, operativeSlots); + logicalProperties, physicalProperties, statistics, operativeSlots, tableAlias); } @Override @@ -67,11 +78,11 @@ public String toString() { rfV2 = runtimeFiltersV2.toString(); } return Utils.toSqlString("PhysicalJdbcScan", - "qualified", Utils.qualifiedName(qualifier, table.getName()), - "output", getOutput(), - "RFV2", rfV2, - "stats", statistics - ); + "qualified", Utils.qualifiedName(qualifier, table.getName()), + "alias", tableAlias, + "output", getOutput(), + "RFV2", rfV2, + "stats", statistics); } @Override @@ -81,19 +92,21 @@ public R accept(PlanVisitor visitor, C context) { @Override public PhysicalJdbcScan withGroupExpression(Optional groupExpression) { - return new PhysicalJdbcScan(relationId, table, qualifier, groupExpression, getLogicalProperties()); + return new PhysicalJdbcScan(relationId, table, qualifier, groupExpression, getLogicalProperties(), + null, null, operativeSlots, tableAlias); } @Override public Plan withGroupExprLogicalPropChildren(Optional groupExpression, Optional logicalProperties, List children) { - return new PhysicalJdbcScan(relationId, table, qualifier, groupExpression, logicalProperties.get()); + return new PhysicalJdbcScan(relationId, table, qualifier, groupExpression, logicalProperties.get(), + null, null, operativeSlots, tableAlias); } @Override public PhysicalJdbcScan withPhysicalPropertiesAndStats(PhysicalProperties physicalProperties, - Statistics statistics) { + Statistics statistics) { return new PhysicalJdbcScan(relationId, table, qualifier, groupExpression, - getLogicalProperties(), physicalProperties, statistics, operativeSlots); + getLogicalProperties(), physicalProperties, statistics, operativeSlots, tableAlias); } } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalOdbcScan.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalOdbcScan.java index 79774e7604183a..8a6f542485feb7 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalOdbcScan.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalOdbcScan.java @@ -55,17 +55,28 @@ public PhysicalOdbcScan(RelationId id, TableIf table, List qualifier, Optional groupExpression, LogicalProperties logicalProperties, PhysicalProperties physicalProperties, Statistics statistics, Collection operativeSlots) { + this(id, table, qualifier, groupExpression, logicalProperties, physicalProperties, statistics, + operativeSlots, ""); + } + + /** + * Constructor for PhysicalOdbcScan. + */ + public PhysicalOdbcScan(RelationId id, TableIf table, List qualifier, + Optional groupExpression, + LogicalProperties logicalProperties, PhysicalProperties physicalProperties, Statistics statistics, + Collection operativeSlots, String tableAlias) { super(id, PlanType.PHYSICAL_ODBC_SCAN, table, qualifier, groupExpression, - logicalProperties, physicalProperties, statistics, operativeSlots); + logicalProperties, physicalProperties, statistics, operativeSlots, tableAlias); } @Override public String toString() { return Utils.toSqlString("PhysicalOdbcScan", - "qualified", Utils.qualifiedName(qualifier, table.getName()), - "output", getOutput(), - "stats", statistics - ); + "qualified", Utils.qualifiedName(qualifier, table.getName()), + "alias", tableAlias, + "output", getOutput(), + "stats", statistics); } @Override @@ -75,19 +86,21 @@ public R accept(PlanVisitor visitor, C context) { @Override public PhysicalOdbcScan withGroupExpression(Optional groupExpression) { - return new PhysicalOdbcScan(relationId, table, qualifier, groupExpression, getLogicalProperties()); + return new PhysicalOdbcScan(relationId, table, qualifier, groupExpression, getLogicalProperties(), + null, null, operativeSlots, tableAlias); } @Override public Plan withGroupExprLogicalPropChildren(Optional groupExpression, Optional logicalProperties, List children) { - return new PhysicalOdbcScan(relationId, table, qualifier, groupExpression, logicalProperties.get()); + return new PhysicalOdbcScan(relationId, table, qualifier, groupExpression, logicalProperties.get(), + null, null, operativeSlots, tableAlias); } @Override public PhysicalOdbcScan withPhysicalPropertiesAndStats(PhysicalProperties physicalProperties, - Statistics statistics) { + Statistics statistics) { return new PhysicalOdbcScan(relationId, table, qualifier, groupExpression, - getLogicalProperties(), physicalProperties, statistics, operativeSlots); + getLogicalProperties(), physicalProperties, statistics, operativeSlots, tableAlias); } } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalOlapScan.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalOlapScan.java index 9ed5624e6fe110..880d81e0b9de69 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalOlapScan.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalOlapScan.java @@ -102,7 +102,7 @@ public PhysicalOlapScan(RelationId id, OlapTable olapTable, List qualifi preAggStatus, baseOutputs, groupExpression, logicalProperties, null, null, tableSample, operativeSlots, virtualColumns, scoreOrderKeys, scoreLimit, - scoreRangeInfo, annOrderKeys, annLimit, Optional.empty()); + scoreRangeInfo, annOrderKeys, annLimit, Optional.empty(), ""); } /** @@ -121,7 +121,7 @@ public PhysicalOlapScan(RelationId id, OlapTable olapTable, List qualifi preAggStatus, baseOutputs, groupExpression, logicalProperties, null, null, tableSample, operativeSlots, virtualColumns, scoreOrderKeys, scoreLimit, - scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates); + scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates, ""); } /** @@ -140,7 +140,7 @@ public PhysicalOlapScan(RelationId id, OlapTable olapTable, List qualifi preAggStatus, baseOutputs, groupExpression, logicalProperties, null, null, tableSample, operativeSlots, virtualColumns, scoreOrderKeys, scoreLimit, - scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates); + scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates, ""); } /** @@ -159,7 +159,7 @@ public PhysicalOlapScan(RelationId id, OlapTable olapTable, List qualifi distributionSpec, preAggStatus, baseOutputs, groupExpression, logicalProperties, physicalProperties, statistics, tableSample, operativeSlots, virtualColumns, scoreOrderKeys, scoreLimit, scoreRangeInfo, annOrderKeys, annLimit, - Optional.empty()); + Optional.empty(), ""); } /** @@ -174,9 +174,9 @@ public PhysicalOlapScan(RelationId id, OlapTable olapTable, List qualifi Collection operativeSlots, List virtualColumns, List scoreOrderKeys, Optional scoreLimit, Optional scoreRangeInfo, List annOrderKeys, Optional annLimit, - Optional partitionPrunablePredicates) { + Optional partitionPrunablePredicates, String tableAlias) { super(id, PlanType.PHYSICAL_OLAP_SCAN, olapTable, qualifier, - groupExpression, logicalProperties, physicalProperties, statistics, operativeSlots); + groupExpression, logicalProperties, physicalProperties, statistics, operativeSlots, tableAlias); this.selectedIndexId = selectedIndexId; this.selectedTabletIds = ImmutableList.copyOf(selectedTabletIds); this.selectedPartitionIds = ImmutableList.copyOf(selectedPartitionIds); @@ -315,6 +315,7 @@ public String toString() { return Utils.toSqlString("PhysicalOlapScan[" + id.asInt() + "]" + getGroupIdWithPrefix(), "table", table.getName() + index + partitions, + "alias", tableAlias, "stats", statistics, "operativeSlots", operativeSlots, "virtualColumns", virtualColumns, @@ -368,7 +369,7 @@ public PhysicalOlapScan withGroupExpression(Optional groupExpre selectedIndexId, selectedTabletIds, selectedPartitionIds, hasPartitionPredicate, distributionSpec, preAggStatus, baseOutputs, groupExpression, getLogicalProperties(), null, null, tableSample, operativeSlots, virtualColumns, scoreOrderKeys, scoreLimit, scoreRangeInfo, - annOrderKeys, annLimit, partitionPrunablePredicates); + annOrderKeys, annLimit, partitionPrunablePredicates, tableAlias); } @Override @@ -378,7 +379,7 @@ public Plan withGroupExprLogicalPropChildren(Optional groupExpr selectedIndexId, selectedTabletIds, selectedPartitionIds, hasPartitionPredicate, distributionSpec, preAggStatus, baseOutputs, groupExpression, logicalProperties.get(), null, null, tableSample, operativeSlots, virtualColumns, scoreOrderKeys, scoreLimit, scoreRangeInfo, - annOrderKeys, annLimit, partitionPrunablePredicates); + annOrderKeys, annLimit, partitionPrunablePredicates, tableAlias); } @Override @@ -388,7 +389,7 @@ public PhysicalOlapScan withPhysicalPropertiesAndStats( selectedIndexId, selectedTabletIds, selectedPartitionIds, hasPartitionPredicate, distributionSpec, preAggStatus, baseOutputs, groupExpression, getLogicalProperties(), physicalProperties, statistics, tableSample, operativeSlots, virtualColumns, scoreOrderKeys, - scoreLimit, scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates); + scoreLimit, scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates, tableAlias); } @Override @@ -416,7 +417,7 @@ public CatalogRelation withOperativeSlots(Collection operativeSlots) { distributionSpec, preAggStatus, baseOutputs, groupExpression, getLogicalProperties(), getPhysicalProperties(), statistics, tableSample, operativeSlots, virtualColumns, scoreOrderKeys, scoreLimit, - scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates); + scoreRangeInfo, annOrderKeys, annLimit, partitionPrunablePredicates, tableAlias); } @Override diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/util/Utils.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/util/Utils.java index bf0f4a1dd0fa0e..0b5b5539fddec0 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/util/Utils.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/util/Utils.java @@ -214,12 +214,13 @@ public static String toSqlString(String planName, Object... variables) { if (variables.length == 0) { return stringBuilder.append(" )").toString(); } - + boolean first = true; for (int i = 0; i < variables.length - 1; i += 2) { if (!"".equals(toStringOrNull(variables[i + 1]))) { - if (i != 0) { + if (!first) { stringBuilder.append(", "); } + first = false; stringBuilder.append(toStringOrNull(variables[i])).append("=").append(toStringOrNull(variables[i + 1])); } } diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/jobs/RewriteTopDownJobTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/jobs/RewriteTopDownJobTest.java index 5fb4e16988cd56..d8f5a0e8131c00 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/jobs/RewriteTopDownJobTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/jobs/RewriteTopDownJobTest.java @@ -130,5 +130,10 @@ public Plan withGroupExprLogicalPropChildren(Optional groupExpr public LogicalBoundRelation withRelationId(RelationId relationId) { throw new RuntimeException("should not call LogicalBoundRelation's withRelationId method"); } + + @Override + public LogicalBoundRelation withTableAlias(String alias) { + return this; + } } } diff --git a/regression-test/data/nereids_rules_p0/agg_skew_rewrite/agg_skew_rewrite.out b/regression-test/data/nereids_rules_p0/agg_skew_rewrite/agg_skew_rewrite.out index ba513d54b02e35..21af6f5304a23d 100644 --- a/regression-test/data/nereids_rules_p0/agg_skew_rewrite/agg_skew_rewrite.out +++ b/regression-test/data/nereids_rules_p0/agg_skew_rewrite/agg_skew_rewrite.out @@ -280,9 +280,9 @@ \N \N 0 -- !all_null_sum0 -- -0.0 -0.0 -0.0 +0 +0 +0 -- !subquery_skew -- 3 @@ -522,8 +522,8 @@ PhysicalResultSink ------hashAgg[GLOBAL] --------hashAgg[LOCAL] ----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.a = t2.a)) otherCondition=() -------------PhysicalOlapScan[test_skew_hint] -------------PhysicalOlapScan[test_skew_hint] +------------PhysicalOlapScan[test_skew_hint(t1)] +------------PhysicalOlapScan[test_skew_hint(t2)] -- !shape_hint_agg_agg -- PhysicalResultSink diff --git a/regression-test/data/nereids_rules_p0/eliminate_gby_key/eliminate_group_by.out b/regression-test/data/nereids_rules_p0/eliminate_gby_key/eliminate_group_by.out index a6bdf691ffd128..037e9672190ef8 100644 --- a/regression-test/data/nereids_rules_p0/eliminate_gby_key/eliminate_group_by.out +++ b/regression-test/data/nereids_rules_p0/eliminate_gby_key/eliminate_group_by.out @@ -14,24 +14,24 @@ 5 1 -- !avg -- -1 2.0 -2 2.0 -3 4.0 -4 4.0 +1 2 +2 2 +3 4 +4 4 5 \N -- !expr -- -1 2 101.0 3 -2 3 102.0 4 -3 4 103.0 7 -4 5 104.0 8 -5 6 105.0 \N +1 2 101 3 +2 3 102 4 +3 4 103 7 +4 5 104 8 +5 6 105 \N -- !window -- -1 2.0 -2 4.0 -3 4.0 -4 8.0 +1 2 +2 4 +3 4 +4 8 5 \N -- !two_args_func_min_by -- @@ -50,44 +50,44 @@ -- !two_args_func_avg_weighted -- \N \N \N \N \N -2.0 2.0 \N \N \N -2.0 2.0 \N \N \N -4.0 4.0 \N \N \N -4.0 4.0 \N \N \N +2 2 \N \N \N +2 2 \N \N \N +4 4 \N \N \N +4 4 \N \N \N -- !two_args_func_percentile -- \N \N \N -\N \N 2.0 -\N \N 2.0 -\N \N 4.0 -\N \N 4.0 +\N \N 2 +\N \N 2 +\N \N 4 +\N \N 4 -- !stddev -- -1 0.0 \N -2 0.0 \N -3 0.0 \N -4 0.0 \N +1 0 \N +2 0 \N +3 0 \N +4 0 \N 5 \N \N -- !stddev_samp -- -1 0.0 \N -2 0.0 \N -3 0.0 \N -4 0.0 \N +1 0 \N +2 0 \N +3 0 \N +4 0 \N 5 \N \N -- !variance -- -1 0.0 \N -2 0.0 \N -3 0.0 \N -4 0.0 \N +1 0 \N +2 0 \N +3 0 \N +4 0 \N 5 \N \N -- !variance_samp -- -1 0.0 \N -2 0.0 \N -3 0.0 \N -4 0.0 \N +1 0 \N +2 0 \N +3 0 \N +4 0 \N 5 \N \N -- !sum0 -- @@ -98,11 +98,11 @@ 5 0 0 -- !median -- -1 2.0 2 1.0 2.0 2.0 -2 2.0 2 2.0 2.0 2.0 -3 4.0 4 3.0 4.0 4.0 -4 4.0 4 4.0 4.0 4.0 -5 \N \N 5.0 \N \N +1 2 2 1 2 2 +2 2 2 2 2 2 +3 4 4 3 4 4 +4 4 4 4 4 4 +5 \N \N 5 \N \N -- !count_star_shape -- PhysicalResultSink diff --git a/regression-test/data/nereids_rules_p0/eliminate_gby_key/eliminate_group_by_key_by_uniform.out b/regression-test/data/nereids_rules_p0/eliminate_gby_key/eliminate_group_by_key_by_uniform.out index 83fc7e067d92f4..32e744e16307c2 100644 --- a/regression-test/data/nereids_rules_p0/eliminate_gby_key/eliminate_group_by_key_by_uniform.out +++ b/regression-test/data/nereids_rules_p0/eliminate_gby_key/eliminate_group_by_key_by_uniform.out @@ -305,7 +305,7 @@ cherry 3 PhysicalResultSink --PhysicalLimit[GLOBAL] ----hashJoin[INNER_JOIN] hashCondition=((t1.a = t2.a)) otherCondition=() -------PhysicalOlapScan[test1] +------PhysicalOlapScan[test1(t1)] ------filter((test2.b = 105)) --------PhysicalOlapScan[test2] 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 ba16949c0c2425..5f99df941c12fa 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 @@ -2,50 +2,50 @@ -- !inner_join -- PhysicalResultSink --NestedLoopJoin[CROSS_JOIN] -----PhysicalOlapScan[t] -----PhysicalOlapScan[t] +----PhysicalOlapScan[t(t1)] +----PhysicalOlapScan[t(t2)] -- !left_outer_join -- PhysicalResultSink --NestedLoopJoin[LEFT_OUTER_JOIN] -----PhysicalOlapScan[t] -----PhysicalOlapScan[t] +----PhysicalOlapScan[t(t1)] +----PhysicalOlapScan[t(t2)] -- !right_outer_join -- PhysicalResultSink --NestedLoopJoin[RIGHT_OUTER_JOIN] -----PhysicalOlapScan[t] -----PhysicalOlapScan[t] +----PhysicalOlapScan[t(t1)] +----PhysicalOlapScan[t(t2)] -- !full_outer_join -- PhysicalResultSink --NestedLoopJoin[FULL_OUTER_JOIN] -----PhysicalOlapScan[t] -----PhysicalOlapScan[t] +----PhysicalOlapScan[t(t1)] +----PhysicalOlapScan[t(t2)] -- !left_semi_join -- PhysicalResultSink --NestedLoopJoin[LEFT_SEMI_JOIN] -----PhysicalOlapScan[t] +----PhysicalOlapScan[t(t1)] ----PhysicalStorageLayerAggregate[t] -- !left_anti_join -- PhysicalResultSink --NestedLoopJoin[LEFT_ANTI_JOIN] -----PhysicalOlapScan[t] +----PhysicalOlapScan[t(t1)] ----PhysicalStorageLayerAggregate[t] -- !right_semi_join -- PhysicalResultSink --NestedLoopJoin[RIGHT_SEMI_JOIN] ----PhysicalStorageLayerAggregate[t] -----PhysicalOlapScan[t] +----PhysicalOlapScan[t(t2)] -- !right_anti_join -- PhysicalResultSink --NestedLoopJoin[RIGHT_ANTI_JOIN] ----PhysicalStorageLayerAggregate[t] -----PhysicalOlapScan[t] +----PhysicalOlapScan[t(t2)] -- !inner_join -- 1 1 a 1 1 a 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 68d116d02ade20..1031281c82596b 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 @@ -3,51 +3,51 @@ PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] ----hashJoin[INNER_JOIN colocated] hashCondition=((t1.id = t2.id)) otherCondition=() -------PhysicalOlapScan[t] +------PhysicalOlapScan[t(t1)] ------filter((t2.score > 10)) ---------PhysicalOlapScan[t] +--------PhysicalOlapScan[t(t2)] -- !right_outer -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] ----hashJoin[INNER_JOIN colocated] hashCondition=((t1.id = t2.id)) otherCondition=() ------filter((t1.score > 10)) ---------PhysicalOlapScan[t] -------PhysicalOlapScan[t] +--------PhysicalOlapScan[t(t1)] +------PhysicalOlapScan[t(t2)] -- !full_outer_join -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] ----hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((t1.id = t2.id)) otherCondition=() ------filter((t1.score > 10)) ---------PhysicalOlapScan[t] -------PhysicalOlapScan[t] +--------PhysicalOlapScan[t(t1)] +------PhysicalOlapScan[t(t2)] -- !full_outer_join -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] ----hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((t1.id = t2.id)) otherCondition=() -------PhysicalOlapScan[t] +------PhysicalOlapScan[t(t1)] ------filter((t2.score > 10)) ---------PhysicalOlapScan[t] +--------PhysicalOlapScan[t(t2)] -- !full_outer_join -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] ----hashJoin[INNER_JOIN colocated] hashCondition=((t1.id = t2.id)) otherCondition=() ------filter((t1.score > 10)) ---------PhysicalOlapScan[t] +--------PhysicalOlapScan[t(t1)] ------filter((t2.score > 10)) ---------PhysicalOlapScan[t] +--------PhysicalOlapScan[t(t2)] -- !left_outer -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] ----hashJoin[INNER_JOIN colocated] hashCondition=((t1.id = t2.id)) otherCondition=() ------filter((t1.score > 10)) ---------PhysicalOlapScan[t] +--------PhysicalOlapScan[t(t1)] ------filter((t2.score > 10)) ---------PhysicalOlapScan[t] +--------PhysicalOlapScan[t(t2)] -- !multiple_left_outer_1 -- PhysicalResultSink @@ -55,19 +55,19 @@ PhysicalResultSink ----hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((t1.id = t3.id)) otherCondition=() ------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((t1.id = t2.id)) otherCondition=() --------filter((t1.score > 10)) -----------PhysicalOlapScan[t] ---------PhysicalOlapScan[t] -------PhysicalOlapScan[t] +----------PhysicalOlapScan[t(t1)] +--------PhysicalOlapScan[t(t2)] +------PhysicalOlapScan[t(t3)] -- !multiple_left_outer_2 -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] ----hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((t1.id = t3.id)) otherCondition=() ------hashJoin[INNER_JOIN colocated] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[t] +--------PhysicalOlapScan[t(t1)] --------filter((t2.score > 10)) -----------PhysicalOlapScan[t] -------PhysicalOlapScan[t] +----------PhysicalOlapScan[t(t2)] +------PhysicalOlapScan[t(t3)] -- !multiple_right_outer_1 -- PhysicalResultSink @@ -75,19 +75,19 @@ PhysicalResultSink ----hashJoin[INNER_JOIN colocated] hashCondition=((t1.id = t3.id)) otherCondition=() ------hashJoin[INNER_JOIN colocated] hashCondition=((t1.id = t2.id)) otherCondition=() --------filter((t1.score > 10)) -----------PhysicalOlapScan[t] ---------PhysicalOlapScan[t] -------PhysicalOlapScan[t] +----------PhysicalOlapScan[t(t1)] +--------PhysicalOlapScan[t(t2)] +------PhysicalOlapScan[t(t3)] -- !multiple_right_outer_2 -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] ----hashJoin[INNER_JOIN colocated] hashCondition=((t1.id = t3.id)) otherCondition=() ------hashJoin[INNER_JOIN colocated] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[t] +--------PhysicalOlapScan[t(t1)] --------filter((t2.score > 10)) -----------PhysicalOlapScan[t] -------PhysicalOlapScan[t] +----------PhysicalOlapScan[t(t2)] +------PhysicalOlapScan[t(t3)] -- !multiple_full_outer_1 -- PhysicalResultSink @@ -95,43 +95,43 @@ PhysicalResultSink ----hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((t1.id = t3.id)) otherCondition=() ------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((t1.id = t2.id)) otherCondition=() --------filter((t1.score > 10)) -----------PhysicalOlapScan[t] ---------PhysicalOlapScan[t] -------PhysicalOlapScan[t] +----------PhysicalOlapScan[t(t1)] +--------PhysicalOlapScan[t(t2)] +------PhysicalOlapScan[t(t3)] -- !multiple_full_outer_2 -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] ----hashJoin[LEFT_OUTER_JOIN broadcast] hashCondition=((t1.id = t3.id)) otherCondition=() ------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[t] +--------PhysicalOlapScan[t(t1)] --------filter((t2.score > 10)) -----------PhysicalOlapScan[t] -------PhysicalOlapScan[t] +----------PhysicalOlapScan[t(t2)] +------PhysicalOlapScan[t(t3)] -- !left_outer_join_non_null_assertion -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] ----hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((t1.id = t2.id)) otherCondition=() ------filter(( not id IS NULL) and (t1.score > 5)) ---------PhysicalOlapScan[t] -------PhysicalOlapScan[t] +--------PhysicalOlapScan[t(t1)] +------PhysicalOlapScan[t(t2)] -- !right_outer_join_non_null_assertion -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] ----hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((t1.id = t2.id)) otherCondition=() -------PhysicalOlapScan[t] +------PhysicalOlapScan[t(t1)] ------filter(( not id IS NULL) and (t2.score > 5)) ---------PhysicalOlapScan[t] +--------PhysicalOlapScan[t(t2)] -- !full_outer_join_compound_conditions -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] ----filter(OR[(t1.score > 5),(t2.score > 5)]) ------hashJoin[FULL_OUTER_JOIN colocated] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[t] ---------PhysicalOlapScan[t] +--------PhysicalOlapScan[t(t1)] +--------PhysicalOlapScan[t(t2)] -- !multiple_joins_complex_conditions -- PhysicalResultSink @@ -139,10 +139,10 @@ PhysicalResultSink ----hashJoin[INNER_JOIN colocated] hashCondition=((t2.id = t3.id)) otherCondition=() ------hashJoin[INNER_JOIN colocated] hashCondition=((t1.id = t2.id)) otherCondition=() --------filter((t1.score > 5)) -----------PhysicalOlapScan[t] ---------PhysicalOlapScan[t] +----------PhysicalOlapScan[t(t1)] +--------PhysicalOlapScan[t(t2)] ------filter(( not score IS NULL)) ---------PhysicalOlapScan[t] +--------PhysicalOlapScan[t(t3)] -- !using_non_equijoin_conditions -- PhysicalResultSink @@ -151,9 +151,9 @@ PhysicalResultSink ------hashJoin[LEFT_OUTER_JOIN broadcast] hashCondition=((expr_cast(score as BIGINT) = expr_(cast(score as BIGINT) + 10))) otherCondition=() --------PhysicalProject ----------filter(( not id IS NULL)) -------------PhysicalOlapScan[t] +------------PhysicalOlapScan[t(t1)] --------PhysicalProject -----------PhysicalOlapScan[t] +----------PhysicalOlapScan[t(t2)] -- !joining_multiple_tables_with_aggregate_functions -- PhysicalResultSink @@ -163,9 +163,9 @@ PhysicalResultSink --------hashAgg[GLOBAL] ----------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((t1.id = t2.id)) otherCondition=() ------------PhysicalProject ---------------PhysicalOlapScan[t] +--------------PhysicalOlapScan[t(t1)] ------------PhysicalProject ---------------PhysicalOlapScan[t] +--------------PhysicalOlapScan[t(t2)] -- !using_subqueries -- PhysicalResultSink @@ -173,44 +173,44 @@ PhysicalResultSink ----PhysicalProject ------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((t1.id = t2.id)) otherCondition=() --------filter(( not id IS NULL)) -----------PhysicalOlapScan[t] +----------PhysicalOlapScan[t(t1)] --------PhysicalProject -----------PhysicalOlapScan[t] +----------PhysicalOlapScan[t(t2)] -- !left_outer -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] ----hashJoin[INNER_JOIN colocated] hashCondition=((t1.id = t2.id)) otherCondition=() ------filter((t1.score > 10)) ---------PhysicalOlapScan[t] +--------PhysicalOlapScan[t(t1)] ------filter(( not name IS NULL)) ---------PhysicalOlapScan[t] +--------PhysicalOlapScan[t(t2)] -- !right_outer -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] ----hashJoin[INNER_JOIN colocated] hashCondition=((t1.id = t2.id)) otherCondition=() ------filter((t1.score > 10)) ---------PhysicalOlapScan[t] +--------PhysicalOlapScan[t(t1)] ------filter(( not name IS NULL)) ---------PhysicalOlapScan[t] +--------PhysicalOlapScan[t(t2)] -- !full_outer -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] ----hashJoin[INNER_JOIN colocated] hashCondition=((t1.id = t2.id)) otherCondition=() ------filter((t1.score > 10)) ---------PhysicalOlapScan[t] +--------PhysicalOlapScan[t(t1)] ------filter(( not name IS NULL)) ---------PhysicalOlapScan[t] +--------PhysicalOlapScan[t(t2)] -- !self_left_outer -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] ----hashJoin[INNER_JOIN colocated] hashCondition=((t1.id = t1_alias.id)) otherCondition=() -------PhysicalOlapScan[t] +------PhysicalOlapScan[t(t1)] ------filter((t1_alias.name > '2023-01-01')) ---------PhysicalOlapScan[t] +--------PhysicalOlapScan[t(t1_alias)] -- !right_outer_aggregate -- PhysicalResultSink @@ -219,9 +219,9 @@ PhysicalResultSink ------PhysicalProject --------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((t1.id = t2.id)) otherCondition=() ----------PhysicalProject -------------PhysicalOlapScan[t] +------------PhysicalOlapScan[t(t1)] ----------PhysicalProject -------------PhysicalOlapScan[t] +------------PhysicalOlapScan[t(t2)] -- !full_outer_multiple_tables -- PhysicalResultSink @@ -229,15 +229,15 @@ PhysicalResultSink ----filter(name IS NULL) ------hashJoin[FULL_OUTER_JOIN shuffle] hashCondition=((t1.id = t3.id)) otherCondition=() --------hashJoin[FULL_OUTER_JOIN colocated] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[t] -----------PhysicalOlapScan[t] ---------PhysicalOlapScan[t] +----------PhysicalOlapScan[t(t1)] +----------PhysicalOlapScan[t(t2)] +--------PhysicalOlapScan[t(t3)] -- !left_outer_with_subquery -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] ----hashJoin[INNER_JOIN colocated] hashCondition=((t1.id = t2.id)) otherCondition=() -------PhysicalOlapScan[t] +------PhysicalOlapScan[t(t1)] ------PhysicalProject --------filter((t2.score > 20)) ----------PhysicalOlapScan[t] @@ -248,9 +248,9 @@ PhysicalResultSink ----PhysicalProject ------hashJoin[INNER_JOIN broadcast] hashCondition=((expr_cast(score as BIGINT) = expr_(cast(score as BIGINT) * 2))) otherCondition=((t1.id < t2.id)) --------PhysicalProject -----------PhysicalOlapScan[t] +----------PhysicalOlapScan[t(t1)] --------PhysicalProject -----------PhysicalOlapScan[t] +----------PhysicalOlapScan[t(t2)] -- !multiple_outer_with_window_function -- PhysicalResultSink @@ -261,15 +261,15 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((t1.id = t2.id)) otherCondition=() --------------PhysicalProject -----------------PhysicalOlapScan[t] +----------------PhysicalOlapScan[t(t1)] --------------PhysicalProject -----------------PhysicalOlapScan[t] +----------------PhysicalOlapScan[t(t2)] -- !join_different_tables_non_null -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] ----hashJoin[INNER_JOIN colocated] hashCondition=((t1.id = t2.id)) otherCondition=() -------PhysicalOlapScan[t] +------PhysicalOlapScan[t(t1)] ------filter(( not name IS NULL)) ---------PhysicalOlapScan[t] +--------PhysicalOlapScan[t(t2)] diff --git a/regression-test/data/nereids_rules_p0/expression/test_simplify_comparison_predicate_int_vs_double.out b/regression-test/data/nereids_rules_p0/expression/test_simplify_comparison_predicate_int_vs_double.out index 59ae6df0d908b5..4bff663fa577f4 100644 --- a/regression-test/data/nereids_rules_p0/expression/test_simplify_comparison_predicate_int_vs_double.out +++ b/regression-test/data/nereids_rules_p0/expression/test_simplify_comparison_predicate_int_vs_double.out @@ -3,9 +3,9 @@ PhysicalResultSink --NestedLoopJoin[LEFT_OUTER_JOIN] ----filter((t1.c_s = '870479087484055553')) -------PhysicalOlapScan[tbl1_test_simplify_comparison_predicate_int_vs_double] +------PhysicalOlapScan[tbl1_test_simplify_comparison_predicate_int_vs_double(t1)] ----filter((cast(c_bigint as DOUBLE) = 8.7047908748405555E17)) -------PhysicalOlapScan[tbl2_test_simplify_comparison_predicate_int_vs_double] +------PhysicalOlapScan[tbl2_test_simplify_comparison_predicate_int_vs_double(t2)] -- !cast_bigint_as_double_result -- 100 870479087484055553 200 870479087484055553 999.999 diff --git a/regression-test/data/nereids_rules_p0/infer_predicate/infer_intersect_except.out b/regression-test/data/nereids_rules_p0/infer_predicate/infer_intersect_except.out index 5c1abbb7e34c8f..8ba73f974738d7 100644 --- a/regression-test/data/nereids_rules_p0/infer_predicate/infer_intersect_except.out +++ b/regression-test/data/nereids_rules_p0/infer_predicate/infer_intersect_except.out @@ -78,17 +78,17 @@ PhysicalResultSink PhysicalResultSink --PhysicalIntersect ----filter((abs(a) < 3)) -------PhysicalOlapScan[infer_intersect_except1] +------PhysicalOlapScan[infer_intersect_except1(t1)] ----filter((abs(a) < 3)) -------PhysicalOlapScan[infer_intersect_except2] +------PhysicalOlapScan[infer_intersect_except2(t2)] -- !function_except -- PhysicalResultSink --PhysicalExcept ----filter((abs(a) < 3)) -------PhysicalOlapScan[infer_intersect_except1] +------PhysicalOlapScan[infer_intersect_except1(t1)] ----filter((abs(a) < 3)) -------PhysicalOlapScan[infer_intersect_except2] +------PhysicalOlapScan[infer_intersect_except2(t2)] -- !except_res -- diff --git a/regression-test/data/nereids_rules_p0/infer_predicate/pull_up_predicate_set_op.out b/regression-test/data/nereids_rules_p0/infer_predicate/pull_up_predicate_set_op.out index 24759dc85762bf..cd6b1b43c11747 100644 --- a/regression-test/data/nereids_rules_p0/infer_predicate/pull_up_predicate_set_op.out +++ b/regression-test/data/nereids_rules_p0/infer_predicate/pull_up_predicate_set_op.out @@ -8,7 +8,7 @@ PhysicalResultSink ------filter((test_pull_up_predicate_set_op2.a < 1) and (test_pull_up_predicate_set_op2.b > 'ab')) --------PhysicalOlapScan[test_pull_up_predicate_set_op2] ----filter((t3.a < 1) and (t3.b > 'ab')) -------PhysicalOlapScan[test_pull_up_predicate_set_op3] +------PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !except -- PhysicalResultSink @@ -19,7 +19,7 @@ PhysicalResultSink ------filter((test_pull_up_predicate_set_op2.a < 1) and (test_pull_up_predicate_set_op2.b > 'ab')) --------PhysicalOlapScan[test_pull_up_predicate_set_op2] ----filter((t3.a < 1)) -------PhysicalOlapScan[test_pull_up_predicate_set_op3] +------PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !union -- PhysicalResultSink @@ -32,7 +32,7 @@ PhysicalResultSink ----------filter((test_pull_up_predicate_set_op2.a < 1)) ------------PhysicalOlapScan[test_pull_up_predicate_set_op2] ----filter((t3.a < 1)) -------PhysicalOlapScan[test_pull_up_predicate_set_op3] +------PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !intersect_one_side_constant_one_side_column -- PhysicalResultSink @@ -43,7 +43,7 @@ PhysicalResultSink ------filter((test_pull_up_predicate_set_op2.a = 1) and (test_pull_up_predicate_set_op2.b > 'ab')) --------PhysicalOlapScan[test_pull_up_predicate_set_op2] ----filter((t3.a = 1) and (t3.b > 'ab')) -------PhysicalOlapScan[test_pull_up_predicate_set_op3] +------PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !intersect_one_side -- PhysicalResultSink @@ -54,7 +54,7 @@ PhysicalResultSink ------filter((test_pull_up_predicate_set_op2.b > 'ab')) --------PhysicalOlapScan[test_pull_up_predicate_set_op2] ----filter((t3.b > 'ab')) -------PhysicalOlapScan[test_pull_up_predicate_set_op3] +------PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !intersect_one_side_no_filter -- PhysicalResultSink @@ -62,7 +62,7 @@ PhysicalResultSink ----PhysicalIntersect ------PhysicalOlapScan[test_pull_up_predicate_set_op1] ------PhysicalOlapScan[test_pull_up_predicate_set_op2] -----PhysicalOlapScan[test_pull_up_predicate_set_op3] +----PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !except_first_no_filter -- PhysicalResultSink @@ -71,7 +71,7 @@ PhysicalResultSink ------PhysicalOlapScan[test_pull_up_predicate_set_op1] ------filter((test_pull_up_predicate_set_op2.b > 'ab')) --------PhysicalOlapScan[test_pull_up_predicate_set_op2] -----PhysicalOlapScan[test_pull_up_predicate_set_op3] +----PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !except_second_no_filter -- PhysicalResultSink @@ -82,7 +82,7 @@ PhysicalResultSink ------filter((test_pull_up_predicate_set_op2.a > 1)) --------PhysicalOlapScan[test_pull_up_predicate_set_op2] ----filter((t3.a > 1)) -------PhysicalOlapScan[test_pull_up_predicate_set_op3] +------PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !except_no_filter -- PhysicalResultSink @@ -90,7 +90,7 @@ PhysicalResultSink ----PhysicalExcept ------PhysicalOlapScan[test_pull_up_predicate_set_op1] ------PhysicalOlapScan[test_pull_up_predicate_set_op2] -----PhysicalOlapScan[test_pull_up_predicate_set_op3] +----PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !union_different_filter -- PhysicalResultSink @@ -100,7 +100,7 @@ PhysicalResultSink --------PhysicalOlapScan[test_pull_up_predicate_set_op1] ------filter((test_pull_up_predicate_set_op2.a < 1)) --------PhysicalOlapScan[test_pull_up_predicate_set_op2] -----PhysicalOlapScan[test_pull_up_predicate_set_op3] +----PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !union_one_side_filter -- PhysicalResultSink @@ -111,7 +111,7 @@ PhysicalResultSink ----------PhysicalOlapScan[test_pull_up_predicate_set_op1] ----------filter((test_pull_up_predicate_set_op2.a < 1)) ------------PhysicalOlapScan[test_pull_up_predicate_set_op2] -----PhysicalOlapScan[test_pull_up_predicate_set_op3] +----PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !union_with_const -- PhysicalResultSink @@ -121,56 +121,56 @@ PhysicalResultSink --------PhysicalOlapScan[test_pull_up_predicate_set_op1] ------filter((test_pull_up_predicate_set_op2.a < 1)) --------PhysicalOlapScan[test_pull_up_predicate_set_op2] -----PhysicalOlapScan[test_pull_up_predicate_set_op3] +----PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !union_all_const -- PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((t3.a = t.a) and (t3.b = t.b)) otherCondition=() ----PhysicalUnion ----filter(a IN (133333, 2) and b IN ('aa', 'dd')) -------PhysicalOlapScan[test_pull_up_predicate_set_op3] +------PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !union_all_const_tinyint_int -- PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((t3.a = expr_cast(a as INT)) and (t3.b = t.b)) otherCondition=() ----PhysicalUnion ----filter(a IN (2, 3) and b IN ('aa', 'dd')) -------PhysicalOlapScan[test_pull_up_predicate_set_op3] +------PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !union_all_const_empty_relation -- PhysicalResultSink --NestedLoopJoin[INNER_JOIN] ----PhysicalUnion ----filter((t3.a = 2) and (t3.b = 'dd')) -------PhysicalOlapScan[test_pull_up_predicate_set_op3] +------PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !union_all_const2_has_cast_to_null_different_type -- PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((expr_cast(a as DECIMALV3(38, 6)) = expr_cast(a as DECIMALV3(38, 6))) and (t3.b = t.b)) otherCondition=() ----PhysicalUnion ----filter(b IN ('aa', 'dd')) -------PhysicalOlapScan[test_pull_up_predicate_set_op3] +------PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !union_all_const2_has_cast_to_null_different_type -- PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((expr_cast(a as DECIMALV3(38, 6)) = expr_cast(a as DECIMALV3(38, 6))) and (t3.b = t.b)) otherCondition=() ----PhysicalUnion ----filter(b IN ('12', 'dd')) -------PhysicalOlapScan[test_pull_up_predicate_set_op3] +------PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !union_all_different_type_int_cast_to_char -- PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((expr_cast(a as DECIMALV3(38, 6)) = expr_cast(a as DECIMALV3(38, 6))) and (t3.b = t.b)) otherCondition=() ----PhysicalUnion ----filter(b IN ('12', 'dd')) -------PhysicalOlapScan[test_pull_up_predicate_set_op3] +------PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !union_all_const_char3_char2 -- PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((t3.a = expr_cast(a as INT)) and (t3.b = t.b)) otherCondition=() ----PhysicalUnion ----filter(a IN (2, 3, 5) and b IN ('aa', 'aab', 'dd')) -------PhysicalOlapScan[test_pull_up_predicate_set_op3] +------PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !union_child_and_const_exprs -- PhysicalResultSink @@ -183,7 +183,7 @@ PhysicalResultSink ----------filter(a IN (1, 2)) ------------PhysicalOlapScan[test_pull_up_predicate_set_op2] ----filter(a IN (1, 2)) -------PhysicalOlapScan[test_pull_up_predicate_set_op3] +------PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !union_child_and_const_exprs_andpredicates -- PhysicalResultSink @@ -194,7 +194,7 @@ PhysicalResultSink ----------filter(a IN (1, 2) and b IN ('2d', '3')) ------------PhysicalOlapScan[test_pull_up_predicate_set_op1] ----filter(a IN (1, 2)) -------PhysicalOlapScan[test_pull_up_predicate_set_op3] +------PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !union_child_and_const_exprs_orpredicates -- PhysicalResultSink @@ -204,7 +204,7 @@ PhysicalResultSink --------PhysicalUnion ----------filter(OR[a IN (1, 2),b IN ('2d', '3')]) ------------PhysicalOlapScan[test_pull_up_predicate_set_op1] -----PhysicalOlapScan[test_pull_up_predicate_set_op3] +----PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !intersect_one_side_constant_one_side_column_left_join -- PhysicalResultSink @@ -215,7 +215,7 @@ PhysicalResultSink ------filter((test_pull_up_predicate_set_op2.a = 1) and (test_pull_up_predicate_set_op2.b > 'ab')) --------PhysicalOlapScan[test_pull_up_predicate_set_op2] ----filter((t3.a = 1) and (t3.b > 'ab')) -------PhysicalOlapScan[test_pull_up_predicate_set_op3] +------PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !except_second_no_filter_left_join -- PhysicalResultSink @@ -226,7 +226,7 @@ PhysicalResultSink ------filter((test_pull_up_predicate_set_op2.a > 1)) --------PhysicalOlapScan[test_pull_up_predicate_set_op2] ----filter((t3.a > 1)) -------PhysicalOlapScan[test_pull_up_predicate_set_op3] +------PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !union_left_join -- PhysicalResultSink @@ -239,7 +239,7 @@ PhysicalResultSink ----------filter((test_pull_up_predicate_set_op2.a < 1)) ------------PhysicalOlapScan[test_pull_up_predicate_set_op2] ----filter((t3.a < 1)) -------PhysicalOlapScan[test_pull_up_predicate_set_op3] +------PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !union_right_join -- PhysicalResultSink @@ -251,7 +251,7 @@ PhysicalResultSink ------------PhysicalOlapScan[test_pull_up_predicate_set_op1] ----------filter((test_pull_up_predicate_set_op2.a < 1)) ------------PhysicalOlapScan[test_pull_up_predicate_set_op2] -----PhysicalOlapScan[test_pull_up_predicate_set_op3] +----PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !intersect_one_side_constant_one_side_column_left_semi_join -- PhysicalResultSink @@ -262,7 +262,7 @@ PhysicalResultSink ------filter((test_pull_up_predicate_set_op2.a = 1) and (test_pull_up_predicate_set_op2.b > 'ab')) --------PhysicalOlapScan[test_pull_up_predicate_set_op2] ----filter((t3.a = 1) and (t3.b > 'ab')) -------PhysicalOlapScan[test_pull_up_predicate_set_op3] +------PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !except_second_no_filter_right_semi_join -- PhysicalResultSink @@ -273,7 +273,7 @@ PhysicalResultSink ------filter((test_pull_up_predicate_set_op2.a > 1)) --------PhysicalOlapScan[test_pull_up_predicate_set_op2] ----filter((t3.a > 1)) -------PhysicalOlapScan[test_pull_up_predicate_set_op3] +------PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !union_left_anti_join -- PhysicalResultSink @@ -286,7 +286,7 @@ PhysicalResultSink ----------filter((test_pull_up_predicate_set_op2.a < 1)) ------------PhysicalOlapScan[test_pull_up_predicate_set_op2] ----filter((t3.a < 1)) -------PhysicalOlapScan[test_pull_up_predicate_set_op3] +------PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !union_right_anti_join -- PhysicalResultSink @@ -298,19 +298,19 @@ PhysicalResultSink ------------PhysicalOlapScan[test_pull_up_predicate_set_op1] ----------filter((test_pull_up_predicate_set_op2.a < 1)) ------------PhysicalOlapScan[test_pull_up_predicate_set_op2] -----PhysicalOlapScan[test_pull_up_predicate_set_op3] +----PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !union_all_const_full_join -- PhysicalResultSink --hashJoin[FULL_OUTER_JOIN] hashCondition=((t3.a = t.a) and (t3.b = t.b)) otherCondition=() ----PhysicalUnion -----PhysicalOlapScan[test_pull_up_predicate_set_op3] +----PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !union_all_const_tinyint_int_cross_join -- PhysicalResultSink --NestedLoopJoin[CROSS_JOIN] ----PhysicalUnion -----PhysicalOlapScan[test_pull_up_predicate_set_op3] +----PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !intersect_union -- PhysicalResultSink @@ -351,8 +351,8 @@ PhysicalResultSink ------------PhysicalOlapScan[test_pull_up_predicate_set_op2] ----NestedLoopJoin[CROSS_JOIN] ------filter((t3.a < 1)) ---------PhysicalOlapScan[test_pull_up_predicate_set_op3] -------PhysicalOlapScan[test_pull_up_predicate_set_op1] +--------PhysicalOlapScan[test_pull_up_predicate_set_op3(t1)] +------PhysicalOlapScan[test_pull_up_predicate_set_op1(t2)] -- !union_inner_join -- PhysicalResultSink @@ -366,37 +366,37 @@ PhysicalResultSink ------------PhysicalOlapScan[test_pull_up_predicate_set_op2] ----hashJoin[INNER_JOIN] hashCondition=((t1.a = t2.a)) otherCondition=() ------filter((t3.a < 1)) ---------PhysicalOlapScan[test_pull_up_predicate_set_op3] +--------PhysicalOlapScan[test_pull_up_predicate_set_op3(t1)] ------filter((t2.a < 1)) ---------PhysicalOlapScan[test_pull_up_predicate_set_op1] +--------PhysicalOlapScan[test_pull_up_predicate_set_op1(t2)] -- !union_all_const_datetime -- PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((expr_cast(d_datetimev2 as DATETIMEV2(6)) = expr_cast(b as DATETIMEV2(6))) and (expr_cast(d_smallint as INT) = t.a)) otherCondition=() ----PhysicalUnion ----filter(cast(d_smallint as INT) IN (12222222, 2)) -------PhysicalOlapScan[test_pull_up_predicate_set_op4] +------PhysicalOlapScan[test_pull_up_predicate_set_op4(t3)] -- !union_all_const_date -- PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((expr_cast(d_datev2 as DATETIMEV2(6)) = expr_cast(b as DATETIMEV2(6))) and (expr_cast(d_smallint as INT) = t.a)) otherCondition=() ----PhysicalUnion ----filter(cast(d_smallint as INT) IN (12222222, 2)) -------PhysicalOlapScan[test_pull_up_predicate_set_op4] +------PhysicalOlapScan[test_pull_up_predicate_set_op4(t3)] -- !union_all_const_char100 -- PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((expr_cast(d_smallint as INT) = t.a) and (t3.d_char100 = t.b)) otherCondition=() ----PhysicalUnion ----filter(cast(d_smallint as INT) IN (12222222, 2) and d_char100 IN ('2024-01-03 10:00:00', '2024-01-03')) -------PhysicalOlapScan[test_pull_up_predicate_set_op4] +------PhysicalOlapScan[test_pull_up_predicate_set_op4(t3)] -- !union_all_const_char10 -- PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((t3.d_char10 = t.b)) otherCondition=() ----PhysicalUnion ----filter(d_char10 IN ('2024-01-03 10:00:00', '2024-01-04')) -------PhysicalOlapScan[test_pull_up_predicate_set_op4] +------PhysicalOlapScan[test_pull_up_predicate_set_op4(t3)] -- !union_all_and_project_pull_up -- PhysicalResultSink @@ -405,7 +405,7 @@ PhysicalResultSink ------PhysicalOlapScan[test_pull_up_predicate_set_op3] ------PhysicalOlapScan[test_pull_up_predicate_set_op3] ----filter((t3.a = 3)) -------PhysicalOlapScan[test_pull_up_predicate_set_op3] +------PhysicalOlapScan[test_pull_up_predicate_set_op3(t3)] -- !union_and_const -- PhysicalResultSink @@ -414,7 +414,7 @@ PhysicalResultSink ------hashAgg[LOCAL] --------PhysicalUnion ----filter(a IN (1, 2)) -------PhysicalOlapScan[test_pull_up_predicate_set_op3] +------PhysicalOlapScan[test_pull_up_predicate_set_op3(t2)] -- !intersect_res -- 0 d2 diff --git a/regression-test/data/nereids_rules_p0/pkfk/eliminate_inner.out b/regression-test/data/nereids_rules_p0/pkfk/eliminate_inner.out index c1e1c409c72e1a..1a2c37fe9dfe7a 100644 --- a/regression-test/data/nereids_rules_p0/pkfk/eliminate_inner.out +++ b/regression-test/data/nereids_rules_p0/pkfk/eliminate_inner.out @@ -33,8 +33,8 @@ PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((pkt.pk = fkt_not_null.fk)) otherCondition=() ----PhysicalOlapScan[pkt] ----hashJoin[INNER_JOIN] hashCondition=((fkt_not_null1.fk = fkt_not_null2.fk)) otherCondition=() -------PhysicalOlapScan[fkt_not_null] -------PhysicalOlapScan[fkt_not_null] +------PhysicalOlapScan[fkt_not_null(fkt_not_null1)] +------PhysicalOlapScan[fkt_not_null(fkt_not_null2)] -- !res -- 1 John 1 @@ -51,9 +51,9 @@ PhysicalResultSink ------PhysicalOlapScan[pkt] ----hashJoin[INNER_JOIN] hashCondition=((fkt_not_null1.fk = fkt_not_null2.fk)) otherCondition=() ------filter((fkt_not_null1.fk > 1)) ---------PhysicalOlapScan[fkt_not_null] +--------PhysicalOlapScan[fkt_not_null(fkt_not_null1)] ------filter((fkt_not_null2.fk > 1)) ---------PhysicalOlapScan[fkt_not_null] +--------PhysicalOlapScan[fkt_not_null(fkt_not_null2)] -- !res -- 2 Alice 2 @@ -67,7 +67,7 @@ PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((pkt.pk = fkt_not_null.fk)) otherCondition=() ----PhysicalOlapScan[pkt] ----hashAgg[GLOBAL] -------PhysicalOlapScan[fkt_not_null] +------PhysicalOlapScan[fkt_not_null(fkt_not_null1)] -- !res -- 1 1 @@ -195,8 +195,8 @@ PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((pkt.pk = fkt.fk)) otherCondition=() ----PhysicalOlapScan[pkt] ----hashJoin[INNER_JOIN] hashCondition=((fkt1.fk = fkt2.fk)) otherCondition=() -------PhysicalOlapScan[fkt] -------PhysicalOlapScan[fkt] +------PhysicalOlapScan[fkt(fkt1)] +------PhysicalOlapScan[fkt(fkt2)] -- !res -- 1 John 1 @@ -212,9 +212,9 @@ PhysicalResultSink ------PhysicalOlapScan[pkt] ----hashJoin[INNER_JOIN] hashCondition=((fkt1.fk = fkt2.fk)) otherCondition=() ------filter((fkt1.fk > 1)) ---------PhysicalOlapScan[fkt] +--------PhysicalOlapScan[fkt(fkt1)] ------filter((fkt2.fk > 1)) ---------PhysicalOlapScan[fkt] +--------PhysicalOlapScan[fkt(fkt2)] -- !res -- 2 Alice 2 @@ -227,7 +227,7 @@ PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((pkt.pk = fkt.fk)) otherCondition=() ----PhysicalOlapScan[pkt] ----hashAgg[GLOBAL] -------PhysicalOlapScan[fkt] +------PhysicalOlapScan[fkt(fkt1)] -- !res -- 1 1 @@ -328,7 +328,7 @@ PhysicalResultSink ------filter((cast(p as DECIMALV3(38, 6)) = 1.000000)) --------PhysicalOlapScan[pkt] ------PhysicalOlapScan[fkt_not_null] -----PhysicalOlapScan[fkt_not_null] +----PhysicalOlapScan[fkt_not_null(fkt_not_null2)] -- !res -- @@ -341,7 +341,7 @@ PhysicalResultSink ----filter((fkt_not_null.fk = 1)) ------PhysicalOlapScan[fkt_not_null] ----filter((fkt_not_null2.fk = 1)) -------PhysicalOlapScan[fkt_not_null] +------PhysicalOlapScan[fkt_not_null(fkt_not_null2)] -- !res -- 1 John diff --git a/regression-test/data/nereids_rules_p0/pull_up_join_from_union/pull_up_join_from_union.out b/regression-test/data/nereids_rules_p0/pull_up_join_from_union/pull_up_join_from_union.out index 02ff79cfb17d09..75c992d9bd9e7c 100644 --- a/regression-test/data/nereids_rules_p0/pull_up_join_from_union/pull_up_join_from_union.out +++ b/regression-test/data/nereids_rules_p0/pull_up_join_from_union/pull_up_join_from_union.out @@ -3,70 +3,70 @@ PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((id = id)) otherCondition=() ----PhysicalUnion -------PhysicalOlapScan[table_b] -------PhysicalOlapScan[table_c] -----PhysicalOlapScan[table_a] +------PhysicalOlapScan[table_b(b)] +------PhysicalOlapScan[table_c(c)] +----PhysicalOlapScan[table_a(a)] -- !three_way_union -- PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((id = id)) otherCondition=() ----PhysicalUnion -------PhysicalOlapScan[table_b] -------PhysicalOlapScan[table_c] -------PhysicalOlapScan[table_d] -----PhysicalOlapScan[table_a] +------PhysicalOlapScan[table_b(b)] +------PhysicalOlapScan[table_c(c)] +------PhysicalOlapScan[table_d(d)] +----PhysicalOlapScan[table_a(a)] -- !union_with_projections -- PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((id = id)) otherCondition=() ----PhysicalUnion -------PhysicalOlapScan[table_b] -------PhysicalOlapScan[table_c] -----PhysicalOlapScan[table_a] +------PhysicalOlapScan[table_b(b)] +------PhysicalOlapScan[table_c(c)] +----PhysicalOlapScan[table_a(a)] -- !union_with_constants -- PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((id = id)) otherCondition=() ----PhysicalUnion -------PhysicalOlapScan[table_b] -------PhysicalOlapScan[table_c] -----PhysicalOlapScan[table_a] +------PhysicalOlapScan[table_b(b)] +------PhysicalOlapScan[table_c(c)] +----PhysicalOlapScan[table_a(a)] -- !union_with_loss_slots -- PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((id = id)) otherCondition=() ----PhysicalUnion -------PhysicalOlapScan[table_b] -------PhysicalOlapScan[table_c] -----PhysicalOlapScan[table_a] +------PhysicalOlapScan[table_b(b)] +------PhysicalOlapScan[table_c(c)] +----PhysicalOlapScan[table_a(a)] -- !different_join_conditions -- PhysicalResultSink --PhysicalUnion ----hashJoin[INNER_JOIN] hashCondition=((a.id = b.id)) otherCondition=() -------PhysicalOlapScan[table_a] -------PhysicalOlapScan[table_b] +------PhysicalOlapScan[table_a(a)] +------PhysicalOlapScan[table_b(b)] ----hashJoin[INNER_JOIN] hashCondition=((a.name = c.name)) otherCondition=() -------PhysicalOlapScan[table_a] -------PhysicalOlapScan[table_c] +------PhysicalOlapScan[table_a(a)] +------PhysicalOlapScan[table_c(c)] -- !multi_column_join -- PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((id = id) and (name = name)) otherCondition=() ----PhysicalUnion -------PhysicalOlapScan[table_b] -------PhysicalOlapScan[table_c] -----PhysicalOlapScan[table_a] +------PhysicalOlapScan[table_b(b)] +------PhysicalOlapScan[table_c(c)] +----PhysicalOlapScan[table_a(a)] -- !left_joins -- PhysicalResultSink --PhysicalUnion ----hashJoin[LEFT_OUTER_JOIN] hashCondition=((a.id = b.id)) otherCondition=() -------PhysicalOlapScan[table_a] -------PhysicalOlapScan[table_b] +------PhysicalOlapScan[table_a(a)] +------PhysicalOlapScan[table_b(b)] ----hashJoin[LEFT_OUTER_JOIN] hashCondition=((a.id = c.id)) otherCondition=() -------PhysicalOlapScan[table_a] -------PhysicalOlapScan[table_c] +------PhysicalOlapScan[table_a(a)] +------PhysicalOlapScan[table_c(c)] -- !subquery_join -- PhysicalResultSink @@ -76,45 +76,45 @@ PhysicalResultSink --------PhysicalOlapScan[table_b] ------hashAgg[GLOBAL] --------PhysicalOlapScan[table_c] -----PhysicalOlapScan[table_a] +----PhysicalOlapScan[table_a(a)] -- !complex_join_condition1 -- PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((expr_(cast(id as BIGINT) - 1) = expr_cast(id as BIGINT))) otherCondition=() ----PhysicalUnion -------PhysicalOlapScan[table_b] -------PhysicalOlapScan[table_c] -----PhysicalOlapScan[table_a] +------PhysicalOlapScan[table_b(b)] +------PhysicalOlapScan[table_c(c)] +----PhysicalOlapScan[table_a(a)] -- !complex_join_condition2 -- PhysicalResultSink --PhysicalUnion ----hashJoin[INNER_JOIN] hashCondition=((expr_cast(id as BIGINT) = expr_(cast(id as BIGINT) - 1))) otherCondition=() -------PhysicalOlapScan[table_a] -------PhysicalOlapScan[table_b] +------PhysicalOlapScan[table_a(a)] +------PhysicalOlapScan[table_b(b)] ----hashJoin[INNER_JOIN] hashCondition=((expr_cast(id as DOUBLE) = expr_(cast(id as DOUBLE) - 1.0))) otherCondition=() -------PhysicalOlapScan[table_a] -------PhysicalOlapScan[table_c] +------PhysicalOlapScan[table_a(a)] +------PhysicalOlapScan[table_c(c)] -- !union_filter1 -- PhysicalResultSink --NestedLoopJoin[INNER_JOIN] ----PhysicalUnion ------filter((b.id = 1)) ---------PhysicalOlapScan[table_b] +--------PhysicalOlapScan[table_b(b)] ------filter((c.id = 1)) ---------PhysicalOlapScan[table_c] +--------PhysicalOlapScan[table_c(c)] ----filter((a.id = 1)) -------PhysicalOlapScan[table_a] +------PhysicalOlapScan[table_a(a)] -- !union_filter2 -- PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((id = id)) otherCondition=() ----PhysicalUnion -------PhysicalOlapScan[table_b] -------PhysicalOlapScan[table_c] +------PhysicalOlapScan[table_b(b)] +------PhysicalOlapScan[table_c(c)] ----filter((cast(value as DECIMALV3(38, 6)) = 1.000000)) -------PhysicalOlapScan[table_a] +------PhysicalOlapScan[table_a(a)] -- !basic_join_union_res -- 1 Alice Value_B1 diff --git a/regression-test/data/nereids_rules_p0/push_down_filter/extract_from_disjunction_in_join.out b/regression-test/data/nereids_rules_p0/push_down_filter/extract_from_disjunction_in_join.out index 1c9c25ba337c78..a3726bd6d97034 100644 --- a/regression-test/data/nereids_rules_p0/push_down_filter/extract_from_disjunction_in_join.out +++ b/regression-test/data/nereids_rules_p0/push_down_filter/extract_from_disjunction_in_join.out @@ -3,61 +3,61 @@ PhysicalResultSink --hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.b = t2.b)) otherCondition=(OR[AND[(t2.a = 9),(t1.a = 1)],AND[(t1.a = 2),(t2.a = 8)]]) ----filter(a IN (1, 2)) -------PhysicalOlapScan[extract_from_disjunction_in_join_t1] +------PhysicalOlapScan[extract_from_disjunction_in_join_t1(t1)] ----filter(a IN (8, 9)) -------PhysicalOlapScan[extract_from_disjunction_in_join_t2] +------PhysicalOlapScan[extract_from_disjunction_in_join_t2(t2)] -- !right_semi -- PhysicalResultSink --hashJoin[RIGHT_SEMI_JOIN] hashCondition=((t1.b = t2.b)) otherCondition=(OR[AND[(t2.a = 9),(t1.a = 1)],AND[(t1.a = 2),(t2.a = 8)]]) ----filter(a IN (1, 2)) -------PhysicalOlapScan[extract_from_disjunction_in_join_t1] +------PhysicalOlapScan[extract_from_disjunction_in_join_t1(t1)] ----filter(a IN (8, 9)) -------PhysicalOlapScan[extract_from_disjunction_in_join_t2] +------PhysicalOlapScan[extract_from_disjunction_in_join_t2(t2)] -- !left -- PhysicalResultSink --hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.b = t2.b)) otherCondition=(OR[AND[(t2.a = 9),(t1.a = 1)],AND[(t1.a = 2),(t2.a = 8)]] and a IN (1, 2)) -----PhysicalOlapScan[extract_from_disjunction_in_join_t1] +----PhysicalOlapScan[extract_from_disjunction_in_join_t1(t1)] ----filter(a IN (8, 9)) -------PhysicalOlapScan[extract_from_disjunction_in_join_t2] +------PhysicalOlapScan[extract_from_disjunction_in_join_t2(t2)] -- !right -- PhysicalResultSink --hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.b = t2.b)) otherCondition=(OR[AND[(t2.a = 9),(t1.a = 1)],AND[(t1.a = 2),(t2.a = 8)]] and a IN (8, 9)) ----filter(a IN (1, 2)) -------PhysicalOlapScan[extract_from_disjunction_in_join_t1] -----PhysicalOlapScan[extract_from_disjunction_in_join_t2] +------PhysicalOlapScan[extract_from_disjunction_in_join_t1(t1)] +----PhysicalOlapScan[extract_from_disjunction_in_join_t2(t2)] -- !left_anti -- PhysicalResultSink --hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.b = t2.b)) otherCondition=(OR[AND[(t2.a = 9),(t1.a = 1)],AND[(t1.a = 2),(t2.a = 8)]] and a IN (1, 2)) -----PhysicalOlapScan[extract_from_disjunction_in_join_t1] +----PhysicalOlapScan[extract_from_disjunction_in_join_t1(t1)] ----filter(a IN (8, 9)) -------PhysicalOlapScan[extract_from_disjunction_in_join_t2] +------PhysicalOlapScan[extract_from_disjunction_in_join_t2(t2)] -- !right_anti -- PhysicalResultSink --hashJoin[RIGHT_ANTI_JOIN] hashCondition=((t1.b = t2.b)) otherCondition=(OR[AND[(t2.a = 9),(t1.a = 1)],AND[(t1.a = 2),(t2.a = 8)]] and a IN (8, 9)) ----filter(a IN (1, 2)) -------PhysicalOlapScan[extract_from_disjunction_in_join_t1] -----PhysicalOlapScan[extract_from_disjunction_in_join_t2] +------PhysicalOlapScan[extract_from_disjunction_in_join_t1(t1)] +----PhysicalOlapScan[extract_from_disjunction_in_join_t2(t2)] -- !inner -- PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((t1.b = t2.b)) otherCondition=(OR[AND[(t2.a = 9),(t1.a = 1)],AND[(t1.a = 2),(t2.a = 8)]]) ----filter(a IN (1, 2)) -------PhysicalOlapScan[extract_from_disjunction_in_join_t1] +------PhysicalOlapScan[extract_from_disjunction_in_join_t1(t1)] ----filter(a IN (8, 9)) -------PhysicalOlapScan[extract_from_disjunction_in_join_t2] +------PhysicalOlapScan[extract_from_disjunction_in_join_t2(t2)] -- !outer -- PhysicalResultSink --hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.b = t2.b)) otherCondition=(OR[AND[(t2.a = 9),(t1.a = 1)],AND[(t1.a = 2),(t2.a = 8)]] and a IN (1, 2)) ----filter((t1.c = 3)) -------PhysicalOlapScan[extract_from_disjunction_in_join_t1] +------PhysicalOlapScan[extract_from_disjunction_in_join_t1(t1)] ----filter(a IN (8, 9)) -------PhysicalOlapScan[extract_from_disjunction_in_join_t2] +------PhysicalOlapScan[extract_from_disjunction_in_join_t2(t2)] -- !left_semi_res -- 1 diff --git a/regression-test/data/nereids_rules_p0/push_down_limit_distinct/push_down_limit_distinct_through_join.out b/regression-test/data/nereids_rules_p0/push_down_limit_distinct/push_down_limit_distinct_through_join.out index 9ac0d2a4732bc7..db22dd60f56e24 100644 --- a/regression-test/data/nereids_rules_p0/push_down_limit_distinct/push_down_limit_distinct_through_join.out +++ b/regression-test/data/nereids_rules_p0/push_down_limit_distinct/push_down_limit_distinct_through_join.out @@ -8,8 +8,8 @@ PhysicalResultSink ----------PhysicalUnion ------------PhysicalLimit[LOCAL] --------------hashAgg[GLOBAL] -----------------PhysicalOlapScan[t] +----------------PhysicalOlapScan[t(t1)] ------------PhysicalLimit[LOCAL] --------------hashAgg[GLOBAL] -----------------PhysicalOlapScan[t] +----------------PhysicalOlapScan[t(t2)] diff --git a/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_distinct_through_join.out b/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_distinct_through_join.out index c5f90edd139ce5..1d7a6c9c516a62 100644 --- a/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_distinct_through_join.out +++ b/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_distinct_through_join.out @@ -9,8 +9,8 @@ PhysicalResultSink ------------PhysicalTopN[MERGE_SORT] --------------PhysicalTopN[LOCAL_SORT] ----------------hashAgg[GLOBAL] -------------------PhysicalOlapScan[table_join] -------------PhysicalOlapScan[table_join] +------------------PhysicalOlapScan[table_join(t1)] +------------PhysicalOlapScan[table_join(t2)] -- !push_down_topn_through_join_data -- 0 @@ -32,7 +32,7 @@ PhysicalResultSink ------------PhysicalTopN[MERGE_SORT] --------------PhysicalTopN[LOCAL_SORT] ----------------hashAgg[GLOBAL] -------------------PhysicalOlapScan[table_join] +------------------PhysicalOlapScan[table_join(t1)] ------------PhysicalStorageLayerAggregate[table_join] -- !push_down_topn_through_join_data -- 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 fdbc9f780efc3b..1741d085313c4c 100644 --- a/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_distinct_through_union.out +++ b/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_distinct_through_union.out @@ -9,11 +9,11 @@ PhysicalResultSink ------------PhysicalTopN[MERGE_SORT] --------------PhysicalTopN[LOCAL_SORT] ----------------hashAgg[GLOBAL] -------------------PhysicalOlapScan[table2] +------------------PhysicalOlapScan[table2(t1)] ------------PhysicalTopN[MERGE_SORT] --------------PhysicalTopN[LOCAL_SORT] ----------------hashAgg[GLOBAL] -------------------PhysicalOlapScan[table2] +------------------PhysicalOlapScan[table2(t2)] -- !push_down_topn_union_with_conditions -- PhysicalResultSink @@ -26,17 +26,17 @@ PhysicalResultSink --------------PhysicalTopN[LOCAL_SORT] ----------------hashAgg[GLOBAL] ------------------filter((t1.score > 10)) ---------------------PhysicalOlapScan[table2] +--------------------PhysicalOlapScan[table2(t1)] ------------PhysicalTopN[MERGE_SORT] --------------PhysicalTopN[LOCAL_SORT] ----------------hashAgg[GLOBAL] ------------------filter((t2.name = 'Test')) ---------------------PhysicalOlapScan[table2] +--------------------PhysicalOlapScan[table2(t2)] ------------PhysicalTopN[MERGE_SORT] --------------PhysicalTopN[LOCAL_SORT] ----------------hashAgg[GLOBAL] ------------------filter((t3.id < 5)) ---------------------PhysicalOlapScan[table2] +--------------------PhysicalOlapScan[table2(t3)] -- !push_down_topn_union_with_order_by -- PhysicalResultSink @@ -48,15 +48,15 @@ PhysicalResultSink ------------PhysicalTopN[MERGE_SORT] --------------PhysicalTopN[LOCAL_SORT] ----------------hashAgg[GLOBAL] -------------------PhysicalOlapScan[table2] +------------------PhysicalOlapScan[table2(t1)] ------------PhysicalTopN[MERGE_SORT] --------------PhysicalTopN[LOCAL_SORT] ----------------hashAgg[GLOBAL] -------------------PhysicalOlapScan[table2] +------------------PhysicalOlapScan[table2(t2)] ------------PhysicalTopN[MERGE_SORT] --------------PhysicalTopN[LOCAL_SORT] ----------------hashAgg[GLOBAL] -------------------PhysicalOlapScan[table2] +------------------PhysicalOlapScan[table2(t3)] -- !push_down_topn_nested_union -- PhysicalResultSink @@ -68,19 +68,19 @@ PhysicalResultSink ------------PhysicalTopN[MERGE_SORT] --------------PhysicalTopN[LOCAL_SORT] ----------------hashAgg[GLOBAL] -------------------PhysicalOlapScan[table2] +------------------PhysicalOlapScan[table2(t1)] ------------PhysicalTopN[MERGE_SORT] --------------PhysicalTopN[LOCAL_SORT] ----------------hashAgg[GLOBAL] -------------------PhysicalOlapScan[table2] +------------------PhysicalOlapScan[table2(t2)] ------------PhysicalTopN[MERGE_SORT] --------------PhysicalTopN[LOCAL_SORT] ----------------hashAgg[GLOBAL] -------------------PhysicalOlapScan[table2] +------------------PhysicalOlapScan[table2(t3)] ------------PhysicalTopN[MERGE_SORT] --------------PhysicalTopN[LOCAL_SORT] ----------------hashAgg[GLOBAL] -------------------PhysicalOlapScan[table2] +------------------PhysicalOlapScan[table2(t4)] -- !push_down_topn_union_after_join -- PhysicalResultSink @@ -93,12 +93,12 @@ PhysicalResultSink --------------PhysicalTopN[LOCAL_SORT] ----------------hashAgg[GLOBAL] ------------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------------------PhysicalOlapScan[table2] ---------------------PhysicalOlapScan[table2] +--------------------PhysicalOlapScan[table2(t1)] +--------------------PhysicalOlapScan[table2(t2)] ------------PhysicalTopN[MERGE_SORT] --------------PhysicalTopN[LOCAL_SORT] ----------------hashAgg[GLOBAL] -------------------PhysicalOlapScan[table2] +------------------PhysicalOlapScan[table2(t3)] -- !push_down_topn_union_different_projections -- PhysicalResultSink @@ -111,12 +111,12 @@ PhysicalResultSink --------------PhysicalTopN[LOCAL_SORT] ----------------hashAgg[GLOBAL] ------------------hashAgg[LOCAL] ---------------------PhysicalOlapScan[table2] +--------------------PhysicalOlapScan[table2(t1)] ------------PhysicalTopN[MERGE_SORT] --------------PhysicalTopN[LOCAL_SORT] ----------------hashAgg[GLOBAL] ------------------hashAgg[LOCAL] ---------------------PhysicalOlapScan[table2] +--------------------PhysicalOlapScan[table2(t2)] -- !push_down_topn_union_with_subquery -- PhysicalResultSink @@ -133,7 +133,7 @@ PhysicalResultSink ------------PhysicalTopN[MERGE_SORT] --------------PhysicalTopN[LOCAL_SORT] ----------------hashAgg[GLOBAL] -------------------PhysicalOlapScan[table2] +------------------PhysicalOlapScan[table2(t2)] -- !push_down_topn_union_with_limit -- PhysicalResultSink @@ -148,14 +148,14 @@ PhysicalResultSink ------------------hashAgg[LOCAL] --------------------PhysicalLimit[GLOBAL] ----------------------PhysicalLimit[LOCAL] -------------------------PhysicalOlapScan[table2] +------------------------PhysicalOlapScan[table2(t1)] ------------PhysicalTopN[MERGE_SORT] --------------PhysicalTopN[LOCAL_SORT] ----------------hashAgg[GLOBAL] ------------------hashAgg[LOCAL] --------------------PhysicalLimit[GLOBAL] ----------------------PhysicalLimit[LOCAL] -------------------------PhysicalOlapScan[table2] +------------------------PhysicalOlapScan[table2(t2)] -- !push_down_topn_union_complex_conditions -- PhysicalResultSink @@ -168,10 +168,10 @@ PhysicalResultSink --------------PhysicalTopN[LOCAL_SORT] ----------------hashAgg[GLOBAL] ------------------filter((t1.name = 'Test') and (t1.score > 10)) ---------------------PhysicalOlapScan[table2] +--------------------PhysicalOlapScan[table2(t1)] ------------PhysicalTopN[MERGE_SORT] --------------PhysicalTopN[LOCAL_SORT] ----------------hashAgg[GLOBAL] ------------------filter((t2.id < 5) and (t2.score < 20)) ---------------------PhysicalOlapScan[table2] +--------------------PhysicalOlapScan[table2(t2)] 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 5e515a9861f3c2..3a7c64e7c2b773 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 @@ -6,10 +6,10 @@ PhysicalResultSink ------PhysicalUnion --------PhysicalTopN[MERGE_SORT] ----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[table1] +------------PhysicalOlapScan[table1(t1)] --------PhysicalTopN[MERGE_SORT] ----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[table1] +------------PhysicalOlapScan[table1(t2)] -- !push_down_topn_union_with_conditions -- PhysicalResultSink @@ -19,15 +19,15 @@ PhysicalResultSink --------PhysicalTopN[MERGE_SORT] ----------PhysicalTopN[LOCAL_SORT] ------------filter((t1.score > 10)) ---------------PhysicalOlapScan[table1] +--------------PhysicalOlapScan[table1(t1)] --------PhysicalTopN[MERGE_SORT] ----------PhysicalTopN[LOCAL_SORT] ------------filter((t2.name = 'Test')) ---------------PhysicalOlapScan[table1] +--------------PhysicalOlapScan[table1(t2)] --------PhysicalTopN[MERGE_SORT] ----------PhysicalTopN[LOCAL_SORT] ------------filter((t3.id < 5)) ---------------PhysicalOlapScan[table1] +--------------PhysicalOlapScan[table1(t3)] -- !push_down_topn_union_with_order_by -- PhysicalResultSink @@ -36,13 +36,13 @@ PhysicalResultSink ------PhysicalUnion --------PhysicalTopN[MERGE_SORT] ----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[table1] +------------PhysicalOlapScan[table1(t1)] --------PhysicalTopN[MERGE_SORT] ----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[table1] +------------PhysicalOlapScan[table1(t2)] --------PhysicalTopN[MERGE_SORT] ----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[table1] +------------PhysicalOlapScan[table1(t3)] -- !push_down_topn_nested_union -- PhysicalResultSink @@ -51,16 +51,16 @@ PhysicalResultSink ------PhysicalUnion --------PhysicalTopN[MERGE_SORT] ----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[table1] +------------PhysicalOlapScan[table1(t1)] --------PhysicalTopN[MERGE_SORT] ----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[table1] +------------PhysicalOlapScan[table1(t2)] --------PhysicalTopN[MERGE_SORT] ----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[table1] +------------PhysicalOlapScan[table1(t3)] --------PhysicalTopN[MERGE_SORT] ----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[table1] +------------PhysicalOlapScan[table1(t4)] -- !push_down_topn_union_after_join -- PhysicalResultSink @@ -70,11 +70,11 @@ PhysicalResultSink --------PhysicalTopN[MERGE_SORT] ----------PhysicalTopN[LOCAL_SORT] ------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------------PhysicalOlapScan[table1] ---------------PhysicalOlapScan[table1] +--------------PhysicalOlapScan[table1(t1)] +--------------PhysicalOlapScan[table1(t2)] --------PhysicalTopN[MERGE_SORT] ----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[table1] +------------PhysicalOlapScan[table1(t3)] -- !push_down_topn_union_different_projections -- PhysicalResultSink @@ -83,10 +83,10 @@ PhysicalResultSink ------PhysicalUnion --------PhysicalTopN[MERGE_SORT] ----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[table1] +------------PhysicalOlapScan[table1(t1)] --------PhysicalTopN[MERGE_SORT] ----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[table1] +------------PhysicalOlapScan[table1(t2)] -- !push_down_topn_union_with_subquery -- PhysicalResultSink @@ -99,7 +99,7 @@ PhysicalResultSink --------------PhysicalOlapScan[table1] --------PhysicalTopN[MERGE_SORT] ----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[table1] +------------PhysicalOlapScan[table1(t2)] -- !push_down_topn_union_with_limit -- PhysicalResultSink @@ -109,11 +109,11 @@ PhysicalResultSink --------PhysicalTopN[GATHER_SORT] ----------PhysicalLimit[GLOBAL] ------------PhysicalLimit[LOCAL] ---------------PhysicalOlapScan[table1] +--------------PhysicalOlapScan[table1(t1)] --------PhysicalTopN[GATHER_SORT] ----------PhysicalLimit[GLOBAL] ------------PhysicalLimit[LOCAL] ---------------PhysicalOlapScan[table1] +--------------PhysicalOlapScan[table1(t2)] -- !push_down_topn_union_complex_conditions -- PhysicalResultSink @@ -123,11 +123,11 @@ PhysicalResultSink --------PhysicalTopN[MERGE_SORT] ----------PhysicalTopN[LOCAL_SORT] ------------filter((t1.name = 'Test') and (t1.score > 10)) ---------------PhysicalOlapScan[table1] +--------------PhysicalOlapScan[table1(t1)] --------PhysicalTopN[MERGE_SORT] ----------PhysicalTopN[LOCAL_SORT] ------------filter((t2.id < 5) and (t2.score < 20)) ---------------PhysicalOlapScan[table1] +--------------PhysicalOlapScan[table1(t2)] -- !union_all_push_down_top_n -- error_code=500&message=Database+connection+failed {"component":"database","severity":"critical"} 500 Database connection error 192.168.1.103 /api/v1/products 192.168.1.103 api.example.com {"app":"api-gateway","dependencies":["mysql", "redis"],"env":"production"} {"city":"Tokyo","coordinates":{"lat":35.6762,"lon":139.6503},"country":"JP"} {"Content-Type":"application/json","X-Correlation-ID":"corr_456mno"} {"region":"ap-northeast-1","server":"api-node-05"} https://app.example.com/products Mozilla/5.0 (Linux; Android 13; SM-S901B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Mobile Safari/537.36 {"source":"mobile","tags":["error", "database"]} {"context":{"attempts":3,"database":"products_db","duration_ms":5000,"error":"Connection timeout"},"level":"ERROR","message":"Failed to connect to database","timestamp":"2025-07-31T16:45:33Z"} 2025-07-31T16:45:33 diff --git a/regression-test/data/nereids_rules_p0/salt_join/salt_join.out b/regression-test/data/nereids_rules_p0/salt_join/salt_join.out index e215f700af5834..47cbbb203ac8b7 100644 --- a/regression-test/data/nereids_rules_p0/salt_join/salt_join.out +++ b/regression-test/data/nereids_rules_p0/salt_join/salt_join.out @@ -580,8 +580,8 @@ -- !equal_inner_only_null_shape -- PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((t1.b = t2.b)) otherCondition=() -----PhysicalOlapScan[test_null_safe3] -----PhysicalOlapScan[test_null_safe4] +----PhysicalOlapScan[test_null_safe3(t1)] +----PhysicalOlapScan[test_null_safe4(t2)] Hint log: Used: [shuffle]_1 @@ -591,8 +591,8 @@ SyntaxError: -- !equal_left_only_null_shape -- PhysicalResultSink --hashJoin[LEFT_OUTER_JOIN] hashCondition=((r1$c$1 = r2$c$2) and (t1.b = t2.b)) otherCondition=() -----PhysicalOlapScan[test_null_safe3] -----PhysicalOlapScan[test_null_safe4] +----PhysicalOlapScan[test_null_safe3(t1)] +----PhysicalOlapScan[test_null_safe4(t2)] Hint log: Used: [shuffle_skew]_1 @@ -602,8 +602,8 @@ SyntaxError: -- !equal_right_only_null_shape -- PhysicalResultSink --hashJoin[RIGHT_OUTER_JOIN] hashCondition=((r2$c$1 = r1$c$2) and (t1.b = t2.b)) otherCondition=() -----PhysicalOlapScan[test_null_safe3] -----PhysicalOlapScan[test_null_safe4] +----PhysicalOlapScan[test_null_safe3(t1)] +----PhysicalOlapScan[test_null_safe4(t2)] Hint log: Used: [shuffle_skew]_1 @@ -613,11 +613,11 @@ SyntaxError: -- !equal_inner_no_null_shape -- PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((r1$c$1 = r2$c$2) and (t1.b = t2.b)) otherCondition=() -----PhysicalOlapScan[test_null_safe3] +----PhysicalOlapScan[test_null_safe3(t1)] ----hashJoin[RIGHT_OUTER_JOIN] hashCondition=((skewValue$c$5 = t2.b)) otherCondition=() ------PhysicalGenerate --------PhysicalUnion -------PhysicalOlapScan[test_null_safe4] +------PhysicalOlapScan[test_null_safe4(t2)] Hint log: Used: [shuffle_skew]_1 @@ -627,11 +627,11 @@ SyntaxError: -- !equal_left_no_null_shape -- PhysicalResultSink --hashJoin[LEFT_OUTER_JOIN] hashCondition=((r1$c$1 = r2$c$2) and (t1.b = t2.b)) otherCondition=() -----PhysicalOlapScan[test_null_safe3] +----PhysicalOlapScan[test_null_safe3(t1)] ----hashJoin[RIGHT_OUTER_JOIN] hashCondition=((skewValue$c$5 = t2.b)) otherCondition=() ------PhysicalGenerate --------PhysicalUnion -------PhysicalOlapScan[test_null_safe4] +------PhysicalOlapScan[test_null_safe4(t2)] Hint log: Used: [shuffle_skew]_1 @@ -644,8 +644,8 @@ PhysicalResultSink ----hashJoin[RIGHT_OUTER_JOIN] hashCondition=((skewValue$c$4 = t1.b)) otherCondition=() ------PhysicalGenerate --------PhysicalUnion -------PhysicalOlapScan[test_null_safe3] -----PhysicalOlapScan[test_null_safe4] +------PhysicalOlapScan[test_null_safe3(t1)] +----PhysicalOlapScan[test_null_safe4(t2)] Hint log: Used: [shuffle_skew]_1 @@ -655,11 +655,11 @@ SyntaxError: -- !equal_inner_other_and_null_shape -- PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((r1$c$1 = r2$c$2) and (t1.b = t2.b)) otherCondition=() -----PhysicalOlapScan[test_null_safe3] +----PhysicalOlapScan[test_null_safe3(t1)] ----hashJoin[RIGHT_OUTER_JOIN] hashCondition=((skewValue$c$5 = t2.b)) otherCondition=() ------PhysicalGenerate --------PhysicalUnion -------PhysicalOlapScan[test_null_safe4] +------PhysicalOlapScan[test_null_safe4(t2)] Hint log: Used: [shuffle_skew]_1 @@ -669,11 +669,11 @@ SyntaxError: -- !equal_left_other_and_null_shape -- PhysicalResultSink --hashJoin[LEFT_OUTER_JOIN] hashCondition=((r1$c$1 = r2$c$2) and (t1.b = t2.b)) otherCondition=() -----PhysicalOlapScan[test_null_safe3] +----PhysicalOlapScan[test_null_safe3(t1)] ----hashJoin[RIGHT_OUTER_JOIN] hashCondition=((skewValue$c$5 = t2.b)) otherCondition=() ------PhysicalGenerate --------PhysicalUnion -------PhysicalOlapScan[test_null_safe4] +------PhysicalOlapScan[test_null_safe4(t2)] Hint log: Used: [shuffle_skew]_1 @@ -686,8 +686,8 @@ PhysicalResultSink ----hashJoin[RIGHT_OUTER_JOIN] hashCondition=((skewValue$c$4 = t1.b)) otherCondition=() ------PhysicalGenerate --------PhysicalUnion -------PhysicalOlapScan[test_null_safe3] -----PhysicalOlapScan[test_null_safe4] +------PhysicalOlapScan[test_null_safe3(t1)] +----PhysicalOlapScan[test_null_safe4(t2)] Hint log: Used: [shuffle_skew]_1 @@ -697,11 +697,11 @@ SyntaxError: -- !null_safe_equal_inner_only_null_shape -- PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((r1$c$1 = r2$c$2) and (t1.b <=> t2.b)) otherCondition=() -----PhysicalOlapScan[test_null_safe3] +----PhysicalOlapScan[test_null_safe3(t1)] ----hashJoin[RIGHT_OUTER_JOIN] hashCondition=((skewValue$c$4 <=> t2.b)) otherCondition=() ------PhysicalGenerate --------PhysicalUnion -------PhysicalOlapScan[test_null_safe4] +------PhysicalOlapScan[test_null_safe4(t2)] Hint log: Used: [shuffle_skew]_1 @@ -711,11 +711,11 @@ SyntaxError: -- !null_safe_equal_left_only_null_shape -- PhysicalResultSink --hashJoin[LEFT_OUTER_JOIN] hashCondition=((r1$c$1 = r2$c$2) and (t1.b <=> t2.b)) otherCondition=() -----PhysicalOlapScan[test_null_safe3] +----PhysicalOlapScan[test_null_safe3(t1)] ----hashJoin[RIGHT_OUTER_JOIN] hashCondition=((skewValue$c$4 <=> t2.b)) otherCondition=() ------PhysicalGenerate --------PhysicalUnion -------PhysicalOlapScan[test_null_safe4] +------PhysicalOlapScan[test_null_safe4(t2)] Hint log: Used: [shuffle_skew]_1 @@ -728,8 +728,8 @@ PhysicalResultSink ----hashJoin[RIGHT_OUTER_JOIN] hashCondition=((skewValue$c$3 <=> t1.b)) otherCondition=() ------PhysicalGenerate --------PhysicalUnion -------PhysicalOlapScan[test_null_safe3] -----PhysicalOlapScan[test_null_safe4] +------PhysicalOlapScan[test_null_safe3(t1)] +----PhysicalOlapScan[test_null_safe4(t2)] Hint log: Used: [shuffle_skew]_1 @@ -739,11 +739,11 @@ SyntaxError: -- !null_safe_equal_inner_no_null_shape -- PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((r1$c$1 = r2$c$2) and (t1.b <=> t2.b)) otherCondition=() -----PhysicalOlapScan[test_null_safe3] +----PhysicalOlapScan[test_null_safe3(t1)] ----hashJoin[RIGHT_OUTER_JOIN] hashCondition=((skewValue$c$5 = t2.b)) otherCondition=() ------PhysicalGenerate --------PhysicalUnion -------PhysicalOlapScan[test_null_safe4] +------PhysicalOlapScan[test_null_safe4(t2)] Hint log: Used: [shuffle_skew]_1 @@ -753,11 +753,11 @@ SyntaxError: -- !null_safe_equal_left_no_null_shape -- PhysicalResultSink --hashJoin[LEFT_OUTER_JOIN] hashCondition=((r1$c$1 = r2$c$2) and (t1.b <=> t2.b)) otherCondition=() -----PhysicalOlapScan[test_null_safe3] +----PhysicalOlapScan[test_null_safe3(t1)] ----hashJoin[RIGHT_OUTER_JOIN] hashCondition=((skewValue$c$5 = t2.b)) otherCondition=() ------PhysicalGenerate --------PhysicalUnion -------PhysicalOlapScan[test_null_safe4] +------PhysicalOlapScan[test_null_safe4(t2)] Hint log: Used: [shuffle_skew]_1 @@ -770,8 +770,8 @@ PhysicalResultSink ----hashJoin[RIGHT_OUTER_JOIN] hashCondition=((skewValue$c$4 = t1.b)) otherCondition=() ------PhysicalGenerate --------PhysicalUnion -------PhysicalOlapScan[test_null_safe3] -----PhysicalOlapScan[test_null_safe4] +------PhysicalOlapScan[test_null_safe3(t1)] +----PhysicalOlapScan[test_null_safe4(t2)] Hint log: Used: [shuffle_skew]_1 @@ -781,11 +781,11 @@ SyntaxError: -- !null_safe_equal_inner_other_and_null_shape -- PhysicalResultSink --hashJoin[INNER_JOIN] hashCondition=((r1$c$1 = r2$c$2) and (t1.b <=> t2.b)) otherCondition=() -----PhysicalOlapScan[test_null_safe3] +----PhysicalOlapScan[test_null_safe3(t1)] ----hashJoin[RIGHT_OUTER_JOIN] hashCondition=((skewValue$c$6 <=> t2.b)) otherCondition=() ------PhysicalGenerate --------PhysicalUnion -------PhysicalOlapScan[test_null_safe4] +------PhysicalOlapScan[test_null_safe4(t2)] Hint log: Used: [shuffle_skew]_1 @@ -795,11 +795,11 @@ SyntaxError: -- !null_safe_equal_left_other_and_null_shape -- PhysicalResultSink --hashJoin[LEFT_OUTER_JOIN] hashCondition=((r1$c$1 = r2$c$2) and (t1.b <=> t2.b)) otherCondition=() -----PhysicalOlapScan[test_null_safe3] +----PhysicalOlapScan[test_null_safe3(t1)] ----hashJoin[RIGHT_OUTER_JOIN] hashCondition=((skewValue$c$6 <=> t2.b)) otherCondition=() ------PhysicalGenerate --------PhysicalUnion -------PhysicalOlapScan[test_null_safe4] +------PhysicalOlapScan[test_null_safe4(t2)] Hint log: Used: [shuffle_skew]_1 @@ -812,8 +812,8 @@ PhysicalResultSink ----hashJoin[RIGHT_OUTER_JOIN] hashCondition=((skewValue$c$5 <=> t1.b)) otherCondition=() ------PhysicalGenerate --------PhysicalUnion -------PhysicalOlapScan[test_null_safe3] -----PhysicalOlapScan[test_null_safe4] +------PhysicalOlapScan[test_null_safe3(t1)] +----PhysicalOlapScan[test_null_safe4(t2)] Hint log: Used: [shuffle_skew]_1 diff --git a/regression-test/data/query_p0/join/eliminate_const_join_condition.out b/regression-test/data/query_p0/join/eliminate_const_join_condition.out index 26483be2b83fd8..8464a5d9e9cd7d 100644 --- a/regression-test/data/query_p0/join/eliminate_const_join_condition.out +++ b/regression-test/data/query_p0/join/eliminate_const_join_condition.out @@ -4,9 +4,9 @@ PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] ----hashJoin[INNER_JOIN broadcast] hashCondition=((t1.v <=> t2.v)) otherCondition=() ------filter((t1.k = 1)) ---------PhysicalOlapScan[eliminate_cost_join_condition_t1] +--------PhysicalOlapScan[eliminate_cost_join_condition_t1(t1)] ------filter((t2.k = 1)) ---------PhysicalOlapScan[eliminate_cost_join_condition_t2] +--------PhysicalOlapScan[eliminate_cost_join_condition_t2(t2)] -- !null_safe_equal -- 1 \N 1 \N @@ -18,36 +18,36 @@ PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] ----hashJoin[LEFT_OUTER_JOIN broadcast] hashCondition=((t1.k = t2.k) and (t1.v <=> t2.v)) otherCondition=() ------filter((t1.k = 1)) ---------PhysicalOlapScan[eliminate_cost_join_condition_t1] +--------PhysicalOlapScan[eliminate_cost_join_condition_t1(t1)] ------filter((t2.k = 1)) ---------PhysicalOlapScan[eliminate_cost_join_condition_t2] +--------PhysicalOlapScan[eliminate_cost_join_condition_t2(t2)] -- !shape_right_join -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] ----hashJoin[LEFT_OUTER_JOIN broadcast] hashCondition=((t1.k = t2.k) and (t1.v <=> t2.v)) otherCondition=() ------filter((t2.k = 1)) ---------PhysicalOlapScan[eliminate_cost_join_condition_t2] +--------PhysicalOlapScan[eliminate_cost_join_condition_t2(t2)] ------filter((t1.k = 1)) ---------PhysicalOlapScan[eliminate_cost_join_condition_t1] +--------PhysicalOlapScan[eliminate_cost_join_condition_t1(t1)] -- !shape_anti_join -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] ----hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((t1.k = t2.k) and (t1.v <=> t2.v)) otherCondition=() ------filter((t1.k = 1)) ---------PhysicalOlapScan[eliminate_cost_join_condition_t1] +--------PhysicalOlapScan[eliminate_cost_join_condition_t1(t1)] ------filter((t2.k = 1)) ---------PhysicalOlapScan[eliminate_cost_join_condition_t2] +--------PhysicalOlapScan[eliminate_cost_join_condition_t2(t2)] -- !shape_semi_join -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] ----hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((t1.v <=> t2.v)) otherCondition=() ------filter((t1.k = 1)) ---------PhysicalOlapScan[eliminate_cost_join_condition_t1] +--------PhysicalOlapScan[eliminate_cost_join_condition_t1(t1)] ------filter((t2.k = 1)) ---------PhysicalOlapScan[eliminate_cost_join_condition_t2] +--------PhysicalOlapScan[eliminate_cost_join_condition_t2(t2)] -- !shape_mark_join -- PhysicalResultSink @@ -56,8 +56,8 @@ PhysicalResultSink ------filter(OR[ifnull($c$1, FALSE),(t1.k > 10)]) --------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((t1.k = t2.k)) otherCondition=() ----------filter((t1.k = 1)) -------------PhysicalOlapScan[eliminate_cost_join_condition_t1] +------------PhysicalOlapScan[eliminate_cost_join_condition_t1(t1)] ----------PhysicalProject ------------filter((t2.k = 1)) ---------------PhysicalOlapScan[eliminate_cost_join_condition_t2] +--------------PhysicalOlapScan[eliminate_cost_join_condition_t2(t2)] diff --git a/regression-test/data/shape_check/ssb_sf100/shape/flat.out b/regression-test/data/shape_check/ssb_sf100/shape/flat.out index 3a180194ef57b5..60c14689f21480 100644 --- a/regression-test/data/shape_check/ssb_sf100/shape/flat.out +++ b/regression-test/data/shape_check/ssb_sf100/shape/flat.out @@ -9,7 +9,7 @@ PhysicalResultSink ------------PhysicalProject --------------hashJoin[INNER_JOIN broadcast] hashCondition=((p.p_partkey = l.lo_partkey)) otherCondition=() build RFs:RF0 p_partkey->[lo_partkey] ----------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 -----------------PhysicalOlapScan[part] -------------PhysicalOlapScan[customer] ---------PhysicalOlapScan[supplier] +----------------PhysicalOlapScan[part(p)] +------------PhysicalOlapScan[customer(c)] +--------PhysicalOlapScan[supplier(s)] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query10.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query10.out index 5fb40519b131d5..9d8fd66f8d9faa 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query10.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query10.out @@ -25,7 +25,7 @@ PhysicalResultSink ----------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) ------------------------------------------PhysicalOlapScan[date_dim] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer] apply RFs: RF5 +------------------------------------PhysicalOlapScan[customer(c)] apply RFs: RF5 --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject @@ -36,7 +36,7 @@ PhysicalResultSink ------------------------------PhysicalOlapScan[customer_demographics] --------------------------PhysicalProject ----------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County')) -------------------------------PhysicalOlapScan[customer_address] +------------------------------PhysicalOlapScan[customer_address(ca)] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query16.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query16.out index 02559f87cb35c3..d4148ef0cf90ea 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query16.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query16.out @@ -18,11 +18,11 @@ PhysicalResultSink ------------------------------PhysicalProject --------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF0 cs_order_number->[cs_order_number] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +------------------------------------PhysicalOlapScan[catalog_sales(cs2)] apply RFs: RF0 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF2 RF3 +------------------------------------PhysicalOlapScan[catalog_sales(cs1)] apply RFs: RF1 RF2 RF3 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_returns] +--------------------------------PhysicalOlapScan[catalog_returns(cr1)] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) --------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query17.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query17.out index c10cc616923d3c..2cb1cd6ed4156e 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query17.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query17.out @@ -32,13 +32,13 @@ PhysicalResultSink --------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject ----------------------------------filter((d1.d_quarter_name = '2001Q1')) -------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalOlapScan[date_dim(d1)] ----------------------------PhysicalProject ------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalOlapScan[date_dim(d2)] ------------------------PhysicalProject --------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(d3)] --------------------PhysicalProject ----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query18.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query18.out index dcda7d5d7eb3ee..7ea2466e0db3e3 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query18.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query18.out @@ -25,12 +25,12 @@ PhysicalResultSink --------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF5 ------------------------------------------PhysicalProject --------------------------------------------filter((cd1.cd_education_status = 'Advanced Degree') and (cd1.cd_gender = 'F')) -----------------------------------------------PhysicalOlapScan[customer_demographics] +----------------------------------------------PhysicalOlapScan[customer_demographics(cd1)] --------------------------------------PhysicalProject ----------------------------------------filter(c_birth_month IN (1, 10, 2, 4, 7, 8)) ------------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer_demographics] +------------------------------------PhysicalOlapScan[customer_demographics(cd2)] ------------------------------PhysicalProject --------------------------------filter(ca_state IN ('GA', 'IN', 'ME', 'NC', 'OK', 'WA', 'WY')) ----------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query25.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query25.out index 80edfc46e41f5d..64bf6561b81485 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query25.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query25.out @@ -31,13 +31,13 @@ PhysicalResultSink ------------------------------------PhysicalOlapScan[item] ------------------------------PhysicalProject --------------------------------filter((d1.d_moy = 4) and (d1.d_year = 2000)) -----------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------PhysicalProject ----------------------------filter((d2.d_moy <= 10) and (d2.d_moy >= 4) and (d2.d_year = 2000)) -------------------------------PhysicalOlapScan[date_dim] +------------------------------PhysicalOlapScan[date_dim(d2)] ----------------------PhysicalProject ------------------------filter((d3.d_moy <= 10) and (d3.d_moy >= 4) and (d3.d_year = 2000)) ---------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalOlapScan[date_dim(d3)] ------------------PhysicalProject --------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query29.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query29.out index b09148bd528c7b..6a7e2fc732d9b6 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query29.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query29.out @@ -31,13 +31,13 @@ PhysicalResultSink ------------------------------------PhysicalOlapScan[item] ------------------------------PhysicalProject --------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1999)) -----------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------PhysicalProject ----------------------------filter((d2.d_moy <= 7) and (d2.d_moy >= 4) and (d2.d_year = 1999)) -------------------------------PhysicalOlapScan[date_dim] +------------------------------PhysicalOlapScan[date_dim(d2)] ----------------------PhysicalProject ------------------------filter(d_year IN (1999, 2000, 2001)) ---------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalOlapScan[date_dim(d3)] ------------------PhysicalProject --------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query3.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query3.out index 8beaf9b74953fb..59108cbbf44ac0 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query3.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query3.out @@ -16,7 +16,7 @@ PhysicalResultSink --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------PhysicalProject --------------------------filter((dt.d_moy = 11)) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(dt)] --------------------PhysicalProject ----------------------filter((item.i_manufact_id = 816)) ------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query35.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query35.out index c14ce7550a3069..a3be655f1306d7 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query35.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query35.out @@ -25,7 +25,7 @@ PhysicalResultSink ----------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ------------------------------------------PhysicalOlapScan[date_dim] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer] +------------------------------------PhysicalOlapScan[customer(c)] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject @@ -34,7 +34,7 @@ PhysicalResultSink --------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ----------------------------------------PhysicalOlapScan[date_dim] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalOlapScan[customer_address(ca)] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[customer_demographics] ----------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query36.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query36.out index 5e091a8245be48..d820e4d8949dd6 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query36.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query36.out @@ -26,7 +26,7 @@ PhysicalResultSink ------------------------------------------PhysicalOlapScan[item] ------------------------------------PhysicalProject --------------------------------------filter((d1.d_year = 2002)) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------------PhysicalProject ----------------------------------filter(s_state IN ('AL', 'GA', 'MI', 'MO', 'OH', 'SC', 'SD', 'TN')) ------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query41.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query41.out index 27f61565b67f12..1a37dd7da92355 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query41.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query41.out @@ -11,7 +11,7 @@ PhysicalResultSink ----------------hashJoin[INNER_JOIN broadcast] 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 +----------------------PhysicalOlapScan[item(i1)] apply RFs: RF0 ------------------PhysicalProject --------------------filter((item_cnt > 0)) ----------------------hashAgg[GLOBAL] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query42.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query42.out index f0c7ba1a2ee5d1..3a0e76a2f9b715 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query42.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query42.out @@ -16,7 +16,7 @@ PhysicalResultSink --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------PhysicalProject --------------------------filter((dt.d_moy = 11) and (dt.d_year = 2002)) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(dt)] --------------------PhysicalProject ----------------------filter((item.i_manager_id = 1)) ------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query44.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query44.out index ce6d0a23f7b2e6..55817d25e51c9a 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query44.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query44.out @@ -31,7 +31,7 @@ PhysicalResultSink ------------------------------------------------hashAgg[LOCAL] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((ss1.ss_store_sk = 146)) -------------------------------------------------------PhysicalOlapScan[store_sales] +------------------------------------------------------PhysicalOlapScan[store_sales(ss1)] ------------------------------------------PhysicalProject --------------------------------------------PhysicalAssertNumRows ----------------------------------------------PhysicalDistribute[DistributionSpecGather] @@ -57,7 +57,7 @@ PhysicalResultSink ------------------------------------------------hashAgg[LOCAL] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((ss1.ss_store_sk = 146)) -------------------------------------------------------PhysicalOlapScan[store_sales] +------------------------------------------------------PhysicalOlapScan[store_sales(ss1)] ------------------------------------------PhysicalProject --------------------------------------------PhysicalAssertNumRows ----------------------------------------------PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query46.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query46.out index 26ac77a46ec8ac..96c1c9a9933627 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query46.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query46.out @@ -36,5 +36,5 @@ PhysicalResultSink ----------------PhysicalProject ------------------PhysicalOlapScan[customer] ------------PhysicalProject ---------------PhysicalOlapScan[customer_address] +--------------PhysicalOlapScan[customer_address(current_addr)] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query49.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query49.out index 0463d58df08fcf..5444fa73c979dc 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query49.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query49.out @@ -33,10 +33,10 @@ PhysicalResultSink ------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF0 wr_order_number->[ws_order_number];RF1 wr_item_sk->[ws_item_sk] --------------------------------------------------------------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 RF1 RF2 +------------------------------------------------------------------PhysicalOlapScan[web_sales(ws)] apply RFs: RF0 RF1 RF2 --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) -------------------------------------------------------------------PhysicalOlapScan[web_returns] +------------------------------------------------------------------PhysicalOlapScan[web_returns(wr)] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) --------------------------------------------------------------PhysicalOlapScan[date_dim] @@ -65,10 +65,10 @@ PhysicalResultSink ------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF3 cr_order_number->[cs_order_number];RF4 cr_item_sk->[cs_item_sk] --------------------------------------------------------------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 RF4 RF5 +------------------------------------------------------------------PhysicalOlapScan[catalog_sales(cs)] apply RFs: RF3 RF4 RF5 --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) -------------------------------------------------------------------PhysicalOlapScan[catalog_returns] +------------------------------------------------------------------PhysicalOlapScan[catalog_returns(cr)] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) --------------------------------------------------------------PhysicalOlapScan[date_dim] @@ -97,10 +97,10 @@ PhysicalResultSink ------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF6 sr_ticket_number->[ss_ticket_number];RF7 sr_item_sk->[ss_item_sk] --------------------------------------------------------------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 RF7 RF8 +------------------------------------------------------------------PhysicalOlapScan[store_sales(sts)] apply RFs: RF6 RF7 RF8 --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) -------------------------------------------------------------------PhysicalOlapScan[store_returns] +------------------------------------------------------------------PhysicalOlapScan[store_returns(sr)] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) --------------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query50.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query50.out index 8bdf05df39ed98..e3e40cab6afe5a 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query50.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query50.out @@ -22,8 +22,8 @@ PhysicalResultSink --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store] ----------------------PhysicalProject -------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[date_dim(d1)] ------------------PhysicalProject --------------------filter((d2.d_moy = 8) and (d2.d_year = 2001)) -----------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[date_dim(d2)] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query52.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query52.out index 15a333bc25275d..77a12f26c80f0d 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query52.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query52.out @@ -16,7 +16,7 @@ PhysicalResultSink --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------PhysicalProject --------------------------filter((dt.d_moy = 12) and (dt.d_year = 2002)) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(dt)] --------------------PhysicalProject ----------------------filter((item.i_manager_id = 1)) ------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query59.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query59.out index 5e3aac2f739c01..ed597a568ea0eb 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query59.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query59.out @@ -35,8 +35,8 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------------PhysicalOlapScan[store] ----------------------PhysicalProject ------------------------filter((d.d_month_seq <= 1219) and (d.d_month_seq >= 1208)) ---------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalOlapScan[date_dim(d)] --------------PhysicalProject ----------------filter((d.d_month_seq <= 1207) and (d.d_month_seq >= 1196)) -------------------PhysicalOlapScan[date_dim] +------------------PhysicalOlapScan[date_dim(d)] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query6.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query6.out index 3a5d6b4d4405d6..f1b755f78ac89b 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query6.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query6.out @@ -20,17 +20,17 @@ PhysicalResultSink ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 +----------------------------------------PhysicalOlapScan[store_sales(s)] apply RFs: RF2 --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[customer] +--------------------------------------------PhysicalOlapScan[customer(c)] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[customer_address] +--------------------------------------------PhysicalOlapScan[customer_address(a)] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 +------------------------------------PhysicalOlapScan[date_dim(d)] apply RFs: RF4 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[item] +--------------------------------PhysicalOlapScan[item(i)] --------------------------PhysicalAssertNumRows ----------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------hashAgg[GLOBAL] @@ -43,5 +43,5 @@ PhysicalResultSink ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[item] +------------------------------PhysicalOlapScan[item(j)] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query64.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query64.out index 80addfcc7ff5f6..4b64f5149a4211 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query64.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query64.out @@ -58,32 +58,32 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) ------------------------------------------------------------------------PhysicalProject --------------------------------------------------------------------------PhysicalOlapScan[customer] --------------------------------------------------------------------PhysicalProject -----------------------------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------------------------PhysicalOlapScan[date_dim(d2)] ----------------------------------------------------------------PhysicalProject -------------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------------------------------------PhysicalOlapScan[date_dim(d3)] ------------------------------------------------------------PhysicalProject --------------------------------------------------------------filter(d_year IN (2001, 2002)) -----------------------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------------------------------------PhysicalProject ----------------------------------------------------------PhysicalOlapScan[store] ----------------------------------------------------PhysicalProject -------------------------------------------------------PhysicalOlapScan[customer_demographics] +------------------------------------------------------PhysicalOlapScan[customer_demographics(cd1)] ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[customer_demographics] +--------------------------------------------------PhysicalOlapScan[customer_demographics(cd2)] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[promotion] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[household_demographics] +------------------------------------------PhysicalOlapScan[household_demographics(hd1)] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[household_demographics] +--------------------------------------PhysicalOlapScan[household_demographics(hd2)] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer_address] +----------------------------------PhysicalOlapScan[customer_address(ad1)] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer_address] +------------------------------PhysicalOlapScan[customer_address(ad2)] ------------------------PhysicalProject ---------------------------PhysicalOlapScan[income_band] +--------------------------PhysicalOlapScan[income_band(ib1)] --------------------PhysicalProject -----------------------PhysicalOlapScan[income_band] +----------------------PhysicalOlapScan[income_band(ib2)] ----------------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] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query68.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query68.out index 327930cde7b3c0..3b7647471468ac 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query68.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query68.out @@ -38,5 +38,5 @@ PhysicalResultSink --------------------PhysicalProject ----------------------PhysicalLazyMaterializeOlapScan[customer lazySlots:(customer.c_first_name)] ----------------PhysicalProject -------------------PhysicalOlapScan[customer_address] +------------------PhysicalOlapScan[customer_address(current_addr)] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query69.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query69.out index e0bbeea823735d..87b059da3cc712 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query69.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query69.out @@ -24,7 +24,7 @@ PhysicalResultSink --------------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer] apply RFs: RF5 +----------------------------------PhysicalOlapScan[customer(c)] apply RFs: RF5 ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ----------------------------------PhysicalProject @@ -36,7 +36,7 @@ PhysicalResultSink ------------------------------PhysicalOlapScan[customer_demographics] ------------------------PhysicalProject --------------------------filter(ca_state IN ('MI', 'TX', 'VA')) -----------------------------PhysicalOlapScan[customer_address] +----------------------------PhysicalOlapScan[customer_address(ca)] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query70.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query70.out index 9c9d7b7638d6a5..fcebb167c2cbf5 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query70.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query70.out @@ -22,7 +22,7 @@ PhysicalResultSink --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 ------------------------------------PhysicalProject --------------------------------------filter((d1.d_month_seq <= 1224) and (d1.d_month_seq >= 1213)) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------------hashJoin[RIGHT_SEMI_JOIN bucketShuffle] hashCondition=((store.s_state = tmp1.s_state)) otherCondition=() ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query72.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query72.out index 3a93e8ed707328..dd5198cb2d7f3e 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query72.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query72.out @@ -42,13 +42,13 @@ PhysicalResultSink ------------------------------------filter((customer_demographics.cd_marital_status = 'W')) --------------------------------------PhysicalOlapScan[customer_demographics] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[date_dim] apply RFs: RF7 +--------------------------------PhysicalOlapScan[date_dim(d2)] apply RFs: RF7 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(d3)] ----------------------PhysicalProject ------------------------filter((household_demographics.hd_buy_potential = '501-1000')) --------------------------PhysicalOlapScan[household_demographics] ------------------PhysicalProject --------------------filter((d1.d_year = 2002)) -----------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[date_dim(d1)] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query85.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query85.out index 63fc92a6f489d9..6a28590bf1ed62 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query85.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query85.out @@ -31,10 +31,10 @@ PhysicalResultSink ------------------------------------------PhysicalOlapScan[web_page] ------------------------------------PhysicalProject --------------------------------------filter(OR[AND[(cd1.cd_marital_status = 'M'),(cd1.cd_education_status = '4 yr Degree')],AND[(cd1.cd_marital_status = 'S'),(cd1.cd_education_status = 'Secondary')],AND[(cd1.cd_marital_status = 'W'),(cd1.cd_education_status = 'Advanced Degree')]] and cd_education_status IN ('4 yr Degree', 'Advanced Degree', 'Secondary') and cd_marital_status IN ('M', 'S', 'W')) -----------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF5 RF6 +----------------------------------------PhysicalOlapScan[customer_demographics(cd1)] apply RFs: RF5 RF6 --------------------------------PhysicalProject ----------------------------------filter(cd_education_status IN ('4 yr Degree', 'Advanced Degree', 'Secondary') and cd_marital_status IN ('M', 'S', 'W')) -------------------------------------PhysicalOlapScan[customer_demographics] +------------------------------------PhysicalOlapScan[customer_demographics(cd2)] ----------------------------PhysicalProject ------------------------------filter((customer_address.ca_country = 'United States') and ca_state IN ('DE', 'FL', 'ID', 'IL', 'IN', 'MT', 'ND', 'OH', 'TX')) --------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query86.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query86.out index 2cb80b5a081379..bddfa4a3fb0c02 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query86.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query86.out @@ -24,5 +24,5 @@ PhysicalResultSink --------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject ----------------------------------filter((d1.d_month_seq <= 1235) and (d1.d_month_seq >= 1224)) -------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalOlapScan[date_dim(d1)] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query94.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query94.out index d26128a78f3b6a..0136beaa55a567 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query94.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query94.out @@ -18,11 +18,11 @@ PhysicalResultSink ------------------------------PhysicalProject --------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] 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] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +------------------------------------PhysicalOlapScan[web_sales(ws2)] apply RFs: RF0 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 +------------------------------------PhysicalOlapScan[web_sales(ws1)] apply RFs: RF1 RF2 RF3 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_returns] +--------------------------------PhysicalOlapScan[web_returns(wr1)] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) --------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query95.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query95.out index 4435e9fb23dcd5..14616a0e2fcac3 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query95.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query95.out @@ -5,9 +5,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN shuffle] 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] --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF0 RF7 +----------PhysicalOlapScan[web_sales(ws1)] apply RFs: RF0 RF7 --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF7 +----------PhysicalOlapScan[web_sales(ws2)] apply RFs: RF7 --PhysicalResultSink ----PhysicalLimit[GLOBAL] ------PhysicalLimit[LOCAL] @@ -31,7 +31,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF2 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 RF6 +------------------------------------PhysicalOlapScan[web_sales(ws1)] apply RFs: RF4 RF5 RF6 ------------------------------PhysicalProject --------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) ----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query10.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query10.out index 4fdff8b37961c5..d26279eb8a9ebd 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query10.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query10.out @@ -25,7 +25,7 @@ PhysicalResultSink ----------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) ------------------------------------------PhysicalOlapScan[date_dim] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5 +------------------------------------PhysicalOlapScan[customer(c)] apply RFs: RF4 RF5 --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject @@ -36,7 +36,7 @@ PhysicalResultSink ------------------------------PhysicalOlapScan[customer_demographics] --------------------------PhysicalProject ----------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County')) -------------------------------PhysicalOlapScan[customer_address] +------------------------------PhysicalOlapScan[customer_address(ca)] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query16.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query16.out index 02559f87cb35c3..d4148ef0cf90ea 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query16.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query16.out @@ -18,11 +18,11 @@ PhysicalResultSink ------------------------------PhysicalProject --------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF0 cs_order_number->[cs_order_number] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +------------------------------------PhysicalOlapScan[catalog_sales(cs2)] apply RFs: RF0 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF2 RF3 +------------------------------------PhysicalOlapScan[catalog_sales(cs1)] apply RFs: RF1 RF2 RF3 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_returns] +--------------------------------PhysicalOlapScan[catalog_returns(cr1)] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) --------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query17.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query17.out index 52da90d84ff3a8..c599c71404d484 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query17.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query17.out @@ -32,13 +32,13 @@ PhysicalResultSink --------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject ----------------------------------filter((d1.d_quarter_name = '2001Q1')) -------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalOlapScan[date_dim(d1)] ----------------------------PhysicalProject ------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalOlapScan[date_dim(d2)] ------------------------PhysicalProject --------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(d3)] --------------------PhysicalProject ----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query18.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query18.out index 22f67b07a4698c..162fe9033d9d5e 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query18.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query18.out @@ -25,12 +25,12 @@ PhysicalResultSink --------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF4 RF5 ------------------------------------------PhysicalProject --------------------------------------------filter((cd1.cd_education_status = 'Advanced Degree') and (cd1.cd_gender = 'F')) -----------------------------------------------PhysicalOlapScan[customer_demographics] +----------------------------------------------PhysicalOlapScan[customer_demographics(cd1)] --------------------------------------PhysicalProject ----------------------------------------filter(c_birth_month IN (1, 10, 2, 4, 7, 8)) ------------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 RF3 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer_demographics] +------------------------------------PhysicalOlapScan[customer_demographics(cd2)] ------------------------------PhysicalProject --------------------------------filter(ca_state IN ('GA', 'IN', 'ME', 'NC', 'OK', 'WA', 'WY')) ----------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query25.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query25.out index 10bab76c77b7f3..0b34b0af789834 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query25.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query25.out @@ -31,13 +31,13 @@ PhysicalResultSink ------------------------------------PhysicalOlapScan[item] ------------------------------PhysicalProject --------------------------------filter((d1.d_moy = 4) and (d1.d_year = 2000)) -----------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------PhysicalProject ----------------------------filter((d2.d_moy <= 10) and (d2.d_moy >= 4) and (d2.d_year = 2000)) -------------------------------PhysicalOlapScan[date_dim] +------------------------------PhysicalOlapScan[date_dim(d2)] ----------------------PhysicalProject ------------------------filter((d3.d_moy <= 10) and (d3.d_moy >= 4) and (d3.d_year = 2000)) ---------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalOlapScan[date_dim(d3)] ------------------PhysicalProject --------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query29.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query29.out index 6d0d5cb82d5160..644e9640820dc6 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query29.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query29.out @@ -31,13 +31,13 @@ PhysicalResultSink ------------------------------------PhysicalOlapScan[item] ------------------------------PhysicalProject --------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1999)) -----------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------PhysicalProject ----------------------------filter((d2.d_moy <= 7) and (d2.d_moy >= 4) and (d2.d_year = 1999)) -------------------------------PhysicalOlapScan[date_dim] +------------------------------PhysicalOlapScan[date_dim(d2)] ----------------------PhysicalProject ------------------------filter(d_year IN (1999, 2000, 2001)) ---------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalOlapScan[date_dim(d3)] ------------------PhysicalProject --------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query3.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query3.out index 8beaf9b74953fb..59108cbbf44ac0 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query3.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query3.out @@ -16,7 +16,7 @@ PhysicalResultSink --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------PhysicalProject --------------------------filter((dt.d_moy = 11)) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(dt)] --------------------PhysicalProject ----------------------filter((item.i_manufact_id = 816)) ------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query35.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query35.out index b414e22cb15150..80d83176e3f98d 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query35.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query35.out @@ -25,7 +25,7 @@ PhysicalResultSink ----------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ------------------------------------------PhysicalOlapScan[date_dim] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5 +------------------------------------PhysicalOlapScan[customer(c)] apply RFs: RF4 RF5 --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject @@ -34,7 +34,7 @@ PhysicalResultSink --------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ----------------------------------------PhysicalOlapScan[date_dim] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalOlapScan[customer_address(ca)] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[customer_demographics] ----------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query36.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query36.out index 08593e2e439b92..169a5294c1db97 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query36.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query36.out @@ -26,7 +26,7 @@ PhysicalResultSink ------------------------------------------PhysicalOlapScan[item] ------------------------------------PhysicalProject --------------------------------------filter((d1.d_year = 2002)) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------------PhysicalProject ----------------------------------filter(s_state IN ('AL', 'GA', 'MI', 'MO', 'OH', 'SC', 'SD', 'TN')) ------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query41.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query41.out index 27f61565b67f12..1a37dd7da92355 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query41.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query41.out @@ -11,7 +11,7 @@ PhysicalResultSink ----------------hashJoin[INNER_JOIN broadcast] 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 +----------------------PhysicalOlapScan[item(i1)] apply RFs: RF0 ------------------PhysicalProject --------------------filter((item_cnt > 0)) ----------------------hashAgg[GLOBAL] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query42.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query42.out index f0c7ba1a2ee5d1..3a0e76a2f9b715 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query42.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query42.out @@ -16,7 +16,7 @@ PhysicalResultSink --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------PhysicalProject --------------------------filter((dt.d_moy = 11) and (dt.d_year = 2002)) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(dt)] --------------------PhysicalProject ----------------------filter((item.i_manager_id = 1)) ------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query44.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query44.out index ce6d0a23f7b2e6..55817d25e51c9a 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query44.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query44.out @@ -31,7 +31,7 @@ PhysicalResultSink ------------------------------------------------hashAgg[LOCAL] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((ss1.ss_store_sk = 146)) -------------------------------------------------------PhysicalOlapScan[store_sales] +------------------------------------------------------PhysicalOlapScan[store_sales(ss1)] ------------------------------------------PhysicalProject --------------------------------------------PhysicalAssertNumRows ----------------------------------------------PhysicalDistribute[DistributionSpecGather] @@ -57,7 +57,7 @@ PhysicalResultSink ------------------------------------------------hashAgg[LOCAL] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((ss1.ss_store_sk = 146)) -------------------------------------------------------PhysicalOlapScan[store_sales] +------------------------------------------------------PhysicalOlapScan[store_sales(ss1)] ------------------------------------------PhysicalProject --------------------------------------------PhysicalAssertNumRows ----------------------------------------------PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query46.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query46.out index 73faa771d22a1b..be32832b58c6b5 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query46.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query46.out @@ -36,5 +36,5 @@ PhysicalResultSink ----------------PhysicalProject ------------------PhysicalOlapScan[customer] apply RFs: RF5 ------------PhysicalProject ---------------PhysicalOlapScan[customer_address] +--------------PhysicalOlapScan[customer_address(current_addr)] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query49.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query49.out index 0463d58df08fcf..5444fa73c979dc 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query49.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query49.out @@ -33,10 +33,10 @@ PhysicalResultSink ------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF0 wr_order_number->[ws_order_number];RF1 wr_item_sk->[ws_item_sk] --------------------------------------------------------------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 RF1 RF2 +------------------------------------------------------------------PhysicalOlapScan[web_sales(ws)] apply RFs: RF0 RF1 RF2 --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) -------------------------------------------------------------------PhysicalOlapScan[web_returns] +------------------------------------------------------------------PhysicalOlapScan[web_returns(wr)] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) --------------------------------------------------------------PhysicalOlapScan[date_dim] @@ -65,10 +65,10 @@ PhysicalResultSink ------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF3 cr_order_number->[cs_order_number];RF4 cr_item_sk->[cs_item_sk] --------------------------------------------------------------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 RF4 RF5 +------------------------------------------------------------------PhysicalOlapScan[catalog_sales(cs)] apply RFs: RF3 RF4 RF5 --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) -------------------------------------------------------------------PhysicalOlapScan[catalog_returns] +------------------------------------------------------------------PhysicalOlapScan[catalog_returns(cr)] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) --------------------------------------------------------------PhysicalOlapScan[date_dim] @@ -97,10 +97,10 @@ PhysicalResultSink ------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF6 sr_ticket_number->[ss_ticket_number];RF7 sr_item_sk->[ss_item_sk] --------------------------------------------------------------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 RF7 RF8 +------------------------------------------------------------------PhysicalOlapScan[store_sales(sts)] apply RFs: RF6 RF7 RF8 --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) -------------------------------------------------------------------PhysicalOlapScan[store_returns] +------------------------------------------------------------------PhysicalOlapScan[store_returns(sr)] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) --------------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query50.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query50.out index e7941ce875f02f..28bcc4770780da 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query50.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query50.out @@ -22,8 +22,8 @@ PhysicalResultSink --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store] ----------------------PhysicalProject -------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[date_dim(d1)] ------------------PhysicalProject --------------------filter((d2.d_moy = 8) and (d2.d_year = 2001)) -----------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[date_dim(d2)] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query52.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query52.out index 15a333bc25275d..77a12f26c80f0d 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query52.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query52.out @@ -16,7 +16,7 @@ PhysicalResultSink --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------PhysicalProject --------------------------filter((dt.d_moy = 12) and (dt.d_year = 2002)) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(dt)] --------------------PhysicalProject ----------------------filter((item.i_manager_id = 1)) ------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query59.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query59.out index f4de54b576470a..3b44092028b2d4 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query59.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query59.out @@ -35,8 +35,8 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------------PhysicalOlapScan[store] ----------------------PhysicalProject ------------------------filter((d.d_month_seq <= 1219) and (d.d_month_seq >= 1208)) ---------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalOlapScan[date_dim(d)] --------------PhysicalProject ----------------filter((d.d_month_seq <= 1207) and (d.d_month_seq >= 1196)) -------------------PhysicalOlapScan[date_dim] +------------------PhysicalOlapScan[date_dim(d)] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query6.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query6.out index 538ad1a80e2901..cfe7b629f40a00 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query6.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query6.out @@ -20,17 +20,17 @@ PhysicalResultSink ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 +----------------------------------------PhysicalOlapScan[store_sales(s)] apply RFs: RF1 RF2 RF3 --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 +--------------------------------------------PhysicalOlapScan[customer(c)] apply RFs: RF0 ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[customer_address] +--------------------------------------------PhysicalOlapScan[customer_address(a)] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 +------------------------------------PhysicalOlapScan[date_dim(d)] apply RFs: RF4 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[item] apply RFs: RF5 +--------------------------------PhysicalOlapScan[item(i)] apply RFs: RF5 --------------------------PhysicalAssertNumRows ----------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------hashAgg[GLOBAL] @@ -43,5 +43,5 @@ PhysicalResultSink ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[item] +------------------------------PhysicalOlapScan[item(j)] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query64.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query64.out index 634b564c010c97..440f2f8cdc56f6 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query64.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query64.out @@ -58,32 +58,32 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) ------------------------------------------------------------------------PhysicalProject --------------------------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF6 RF7 RF11 RF14 RF16 --------------------------------------------------------------------PhysicalProject -----------------------------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------------------------PhysicalOlapScan[date_dim(d2)] ----------------------------------------------------------------PhysicalProject -------------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------------------------------------PhysicalOlapScan[date_dim(d3)] ------------------------------------------------------------PhysicalProject --------------------------------------------------------------filter(d_year IN (2001, 2002)) -----------------------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------------------------------------PhysicalProject ----------------------------------------------------------PhysicalOlapScan[store] ----------------------------------------------------PhysicalProject -------------------------------------------------------PhysicalOlapScan[customer_demographics] +------------------------------------------------------PhysicalOlapScan[customer_demographics(cd1)] ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[customer_demographics] +--------------------------------------------------PhysicalOlapScan[customer_demographics(cd2)] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[promotion] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF17 +------------------------------------------PhysicalOlapScan[household_demographics(hd1)] apply RFs: RF17 ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF18 +--------------------------------------PhysicalOlapScan[household_demographics(hd2)] apply RFs: RF18 --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer_address] +----------------------------------PhysicalOlapScan[customer_address(ad1)] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer_address] +------------------------------PhysicalOlapScan[customer_address(ad2)] ------------------------PhysicalProject ---------------------------PhysicalOlapScan[income_band] +--------------------------PhysicalOlapScan[income_band(ib1)] --------------------PhysicalProject -----------------------PhysicalOlapScan[income_band] +----------------------PhysicalOlapScan[income_band(ib2)] ----------------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] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query68.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query68.out index 3e4c771ecc20c6..11909898553eb0 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query68.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query68.out @@ -38,5 +38,5 @@ PhysicalResultSink --------------------PhysicalProject ----------------------PhysicalLazyMaterializeOlapScan[customer lazySlots:(customer.c_first_name)] apply RFs: RF5 ----------------PhysicalProject -------------------PhysicalOlapScan[customer_address] +------------------PhysicalOlapScan[customer_address(current_addr)] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query69.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query69.out index af6d7e8c85a5f6..27b37a02c840b8 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query69.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query69.out @@ -24,7 +24,7 @@ PhysicalResultSink --------------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5 +----------------------------------PhysicalOlapScan[customer(c)] apply RFs: RF4 RF5 ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ----------------------------------PhysicalProject @@ -36,7 +36,7 @@ PhysicalResultSink ------------------------------PhysicalOlapScan[customer_demographics] ------------------------PhysicalProject --------------------------filter(ca_state IN ('MI', 'TX', 'VA')) -----------------------------PhysicalOlapScan[customer_address] +----------------------------PhysicalOlapScan[customer_address(ca)] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query70.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query70.out index 866c026a90dd67..d2f40ca65ce3d9 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query70.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query70.out @@ -22,7 +22,7 @@ PhysicalResultSink --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 ------------------------------------PhysicalProject --------------------------------------filter((d1.d_month_seq <= 1224) and (d1.d_month_seq >= 1213)) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------------hashJoin[RIGHT_SEMI_JOIN bucketShuffle] hashCondition=((store.s_state = tmp1.s_state)) otherCondition=() build RFs:RF2 s_state->[s_state] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query72.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query72.out index fd5f3db15c5786..74e055d94e8fce 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query72.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query72.out @@ -42,13 +42,13 @@ PhysicalResultSink ------------------------------------filter((customer_demographics.cd_marital_status = 'W')) --------------------------------------PhysicalOlapScan[customer_demographics] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[date_dim] apply RFs: RF7 +--------------------------------PhysicalOlapScan[date_dim(d2)] apply RFs: RF7 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(d3)] ----------------------PhysicalProject ------------------------filter((household_demographics.hd_buy_potential = '501-1000')) --------------------------PhysicalOlapScan[household_demographics] ------------------PhysicalProject --------------------filter((d1.d_year = 2002)) -----------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[date_dim(d1)] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query85.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query85.out index 62c4b147f59a22..fde67057518869 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query85.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query85.out @@ -31,10 +31,10 @@ PhysicalResultSink ------------------------------------------PhysicalOlapScan[web_page] ------------------------------------PhysicalProject --------------------------------------filter(OR[AND[(cd1.cd_marital_status = 'M'),(cd1.cd_education_status = '4 yr Degree')],AND[(cd1.cd_marital_status = 'S'),(cd1.cd_education_status = 'Secondary')],AND[(cd1.cd_marital_status = 'W'),(cd1.cd_education_status = 'Advanced Degree')]] and cd_education_status IN ('4 yr Degree', 'Advanced Degree', 'Secondary') and cd_marital_status IN ('M', 'S', 'W')) -----------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF5 RF6 +----------------------------------------PhysicalOlapScan[customer_demographics(cd1)] apply RFs: RF5 RF6 --------------------------------PhysicalProject ----------------------------------filter(cd_education_status IN ('4 yr Degree', 'Advanced Degree', 'Secondary') and cd_marital_status IN ('M', 'S', 'W')) -------------------------------------PhysicalOlapScan[customer_demographics] +------------------------------------PhysicalOlapScan[customer_demographics(cd2)] ----------------------------PhysicalProject ------------------------------filter((customer_address.ca_country = 'United States') and ca_state IN ('DE', 'FL', 'ID', 'IL', 'IN', 'MT', 'ND', 'OH', 'TX')) --------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query86.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query86.out index 13c2b5c88bc677..843e13ba805a60 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query86.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query86.out @@ -24,5 +24,5 @@ PhysicalResultSink --------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject ----------------------------------filter((d1.d_month_seq <= 1235) and (d1.d_month_seq >= 1224)) -------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalOlapScan[date_dim(d1)] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query94.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query94.out index d26128a78f3b6a..0136beaa55a567 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query94.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query94.out @@ -18,11 +18,11 @@ PhysicalResultSink ------------------------------PhysicalProject --------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] 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] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +------------------------------------PhysicalOlapScan[web_sales(ws2)] apply RFs: RF0 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 +------------------------------------PhysicalOlapScan[web_sales(ws1)] apply RFs: RF1 RF2 RF3 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_returns] +--------------------------------PhysicalOlapScan[web_returns(wr1)] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) --------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query95.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query95.out index 253f14febe60d7..e4a9fb53beac46 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query95.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query95.out @@ -5,9 +5,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN shuffle] 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];RF1 ws_order_number->[ws_order_number] --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF14 RF15 +----------PhysicalOlapScan[web_sales(ws1)] apply RFs: RF0 RF1 RF14 RF15 --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF14 RF15 +----------PhysicalOlapScan[web_sales(ws2)] apply RFs: RF14 RF15 --PhysicalResultSink ----PhysicalLimit[GLOBAL] ------PhysicalLimit[LOCAL] @@ -31,7 +31,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF4 RF5 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 RF10 RF11 RF12 RF13 +------------------------------------PhysicalOlapScan[web_sales(ws1)] apply RFs: RF8 RF9 RF10 RF11 RF12 RF13 ------------------------------PhysicalProject --------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) ----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query10.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query10.out index 4dfc2de4cf3fe5..d5e5d3e9ef04e7 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query10.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query10.out @@ -40,8 +40,8 @@ PhysicalResultSink ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] 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 +------------------------------------PhysicalOlapScan[customer(c)] apply RFs: RF0 ----------------------------------PhysicalProject ------------------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County')) ---------------------------------------PhysicalOlapScan[customer_address] +--------------------------------------PhysicalOlapScan[customer_address(ca)] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query14.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query14.out index 7637771c4319ea..64b458d09eb3b0 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query14.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query14.out @@ -18,9 +18,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ------------------------PhysicalProject --------------------------filter((d1.d_year <= 2002) and (d1.d_year >= 2000)) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(d1)] --------------------PhysicalProject -----------------------PhysicalOlapScan[item] +----------------------PhysicalOlapScan[item(iss)] ----------hashAgg[GLOBAL] ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] @@ -32,9 +32,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 ------------------------PhysicalProject --------------------------filter((d2.d_year <= 2002) and (d2.d_year >= 2000)) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(d2)] --------------------PhysicalProject -----------------------PhysicalOlapScan[item] RFV2: RF19 +----------------------PhysicalOlapScan[item(ics)] RFV2: RF19 ----------hashAgg[GLOBAL] ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] @@ -46,9 +46,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 ------------------------PhysicalProject --------------------------filter((d3.d_year <= 2002) and (d3.d_year >= 2000)) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(d3)] --------------------PhysicalProject -----------------------PhysicalOlapScan[item] RFV2: RF20 +----------------------PhysicalOlapScan[item(iws)] RFV2: RF20 --PhysicalCteAnchor ( cteId=CTEId#1 ) ----PhysicalCteProducer ( cteId=CTEId#1 ) ------hashAgg[GLOBAL] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query16.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query16.out index b1b5037f23d714..4b3bbb95139e6e 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query16.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query16.out @@ -11,7 +11,7 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF3 cs_order_number->[cs_order_number] --------------------PhysicalProject -----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 +----------------------PhysicalOlapScan[catalog_sales(cs2)] apply RFs: RF3 --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cc_call_center_sk->[cs_call_center_sk] ------------------------PhysicalProject @@ -20,9 +20,9 @@ PhysicalResultSink ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cs_ship_addr_sk] --------------------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 +------------------------------------PhysicalOlapScan[catalog_sales(cs1)] apply RFs: RF0 RF1 RF2 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_returns] +------------------------------------PhysicalOlapScan[catalog_returns(cr1)] --------------------------------PhysicalProject ----------------------------------filter((customer_address.ca_state = 'WV')) ------------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query17.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query17.out index 5342955a97aae2..9d260c97301ca3 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query17.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query17.out @@ -16,7 +16,7 @@ PhysicalResultSink --------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 RF8 RF9 ------------------------PhysicalProject --------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(d3)] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() ------------------------PhysicalProject @@ -29,14 +29,14 @@ PhysicalResultSink --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 ------------------------------------PhysicalProject --------------------------------------filter((d1.d_quarter_name = '2001Q1')) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] 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 ------------------------------------PhysicalProject --------------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalOlapScan[date_dim(d2)] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[item] ------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query18.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query18.out index cc7308bfd957b8..178c86ab50e025 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query18.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query18.out @@ -23,11 +23,11 @@ PhysicalResultSink ------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 RF4 ----------------------------------PhysicalProject ------------------------------------filter((cd1.cd_education_status = 'Advanced Degree') and (cd1.cd_gender = 'F')) ---------------------------------------PhysicalOlapScan[customer_demographics] +--------------------------------------PhysicalOlapScan[customer_demographics(cd1)] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() build RFs:RF1 c_current_cdemo_sk->[cd_demo_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF1 +------------------------------------PhysicalOlapScan[customer_demographics(cd2)] apply RFs: RF1 ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] --------------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query25.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query25.out index f4a203e70a0ca2..477eca331245ca 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query25.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query25.out @@ -15,7 +15,7 @@ PhysicalResultSink ------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 RF8 RF9 ----------------------PhysicalProject ------------------------filter((d3.d_moy <= 10) and (d3.d_moy >= 4) and (d3.d_year = 2000)) ---------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalOlapScan[date_dim(d3)] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() ----------------------PhysicalProject @@ -28,14 +28,14 @@ PhysicalResultSink ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 ----------------------------------PhysicalProject ------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 2000)) ---------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------PhysicalOlapScan[date_dim(d1)] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] 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 ----------------------------------PhysicalProject ------------------------------------filter((d2.d_moy <= 10) and (d2.d_moy >= 4) and (d2.d_year = 2000)) ---------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------PhysicalOlapScan[date_dim(d2)] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[item] ----------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query29.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query29.out index 7fa2a8b96626a7..850049c8ff7bf2 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query29.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query29.out @@ -25,19 +25,19 @@ PhysicalResultSink ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 --------------------------------------PhysicalProject ----------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1999)) -------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------------PhysicalOlapScan[date_dim(d1)] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] 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 --------------------------------------PhysicalProject ----------------------------------------filter((d2.d_moy <= 7) and (d2.d_moy >= 4) and (d2.d_year = 1999)) -------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------------PhysicalOlapScan[date_dim(d2)] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[item] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store] ------------------PhysicalProject --------------------filter(d_year IN (1999, 2000, 2001)) -----------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[date_dim(d3)] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query36.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query36.out index 78618ea60dfcc0..2920c769191a85 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query36.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query36.out @@ -24,7 +24,7 @@ PhysicalResultSink ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF2 ----------------------------------------PhysicalProject ------------------------------------------filter((d1.d_year = 2002)) ---------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------------PhysicalOlapScan[date_dim(d1)] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query41.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query41.out index 27f61565b67f12..1a37dd7da92355 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query41.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query41.out @@ -11,7 +11,7 @@ PhysicalResultSink ----------------hashJoin[INNER_JOIN broadcast] 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 +----------------------PhysicalOlapScan[item(i1)] apply RFs: RF0 ------------------PhysicalProject --------------------filter((item_cnt > 0)) ----------------------hashAgg[GLOBAL] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query44.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query44.out index 0bac032032ce42..5c55cff87e3832 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query44.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query44.out @@ -27,7 +27,7 @@ PhysicalResultSink --------------------------------------------hashAgg[LOCAL] ----------------------------------------------PhysicalProject ------------------------------------------------filter((ss1.ss_store_sk = 146)) ---------------------------------------------------PhysicalOlapScan[store_sales] +--------------------------------------------------PhysicalOlapScan[store_sales(ss1)] --------------------------------------PhysicalProject ----------------------------------------PhysicalAssertNumRows ------------------------------------------PhysicalDistribute[DistributionSpecGather] @@ -57,7 +57,7 @@ PhysicalResultSink --------------------------------------------hashAgg[LOCAL] ----------------------------------------------PhysicalProject ------------------------------------------------filter((ss1.ss_store_sk = 146)) ---------------------------------------------------PhysicalOlapScan[store_sales] +--------------------------------------------------PhysicalOlapScan[store_sales(ss1)] --------------------------------------PhysicalProject ----------------------------------------PhysicalAssertNumRows ------------------------------------------PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query46.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query46.out index 2b48783b05a5a4..0afa0645209e31 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query46.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query46.out @@ -34,5 +34,5 @@ PhysicalResultSink ----------------PhysicalProject ------------------PhysicalOlapScan[customer] ------------PhysicalProject ---------------PhysicalOlapScan[customer_address] +--------------PhysicalOlapScan[customer_address(current_addr)] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query49.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query49.out index b13ecb58ccc887..423e1cf346f6dd 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query49.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query49.out @@ -31,12 +31,12 @@ PhysicalResultSink --------------------------------------------------------hashJoin[INNER_JOIN colocated] 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] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) ---------------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2 +--------------------------------------------------------------PhysicalOlapScan[web_returns(wr)] apply RFs: RF1 RF2 ----------------------------------------------------------PhysicalProject ------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] --------------------------------------------------------------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 +------------------------------------------------------------------PhysicalOlapScan[web_sales(ws)] apply RFs: RF0 --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) ------------------------------------------------------------------PhysicalOlapScan[date_dim] @@ -63,12 +63,12 @@ PhysicalResultSink --------------------------------------------------------hashJoin[INNER_JOIN colocated] 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] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) ---------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5 +--------------------------------------------------------------PhysicalOlapScan[catalog_returns(cr)] apply RFs: RF4 RF5 ----------------------------------------------------------PhysicalProject ------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] --------------------------------------------------------------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 +------------------------------------------------------------------PhysicalOlapScan[catalog_sales(cs)] apply RFs: RF3 --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) ------------------------------------------------------------------PhysicalOlapScan[date_dim] @@ -95,12 +95,12 @@ PhysicalResultSink --------------------------------------------------------hashJoin[INNER_JOIN colocated] 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] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) ---------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8 +--------------------------------------------------------------PhysicalOlapScan[store_returns(sr)] apply RFs: RF7 RF8 ----------------------------------------------------------PhysicalProject ------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] --------------------------------------------------------------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 +------------------------------------------------------------------PhysicalOlapScan[store_sales(sts)] apply RFs: RF6 --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) ------------------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query50.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query50.out index 2f0a1b10cbff1b..0b39425d1b40d8 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query50.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query50.out @@ -21,9 +21,9 @@ PhysicalResultSink --------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 ------------------------------PhysicalProject --------------------------------filter((d2.d_moy = 8) and (d2.d_year = 2001)) -----------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[date_dim(d2)] ----------------------PhysicalProject -------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[date_dim(d1)] ------------------PhysicalProject --------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query59.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query59.out index a469768f451aab..12ffd327e847a8 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query59.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query59.out @@ -30,7 +30,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------PhysicalOlapScan[store] apply RFs: RF5 ------------------PhysicalProject --------------------filter((d.d_month_seq <= 1207) and (d.d_month_seq >= 1196)) -----------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[date_dim(d)] --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_week_seq = d_week_seq2)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq] ------------------PhysicalProject @@ -41,5 +41,5 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------PhysicalOlapScan[store] ------------------PhysicalProject --------------------filter((d.d_month_seq <= 1219) and (d.d_month_seq >= 1208)) -----------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[date_dim(d)] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query6.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query6.out index 0e5441712726f9..a8480f05e068a5 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query6.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query6.out @@ -12,21 +12,21 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() build RFs:RF5 c_current_addr_sk->[ca_address_sk] ----------------------PhysicalProject -------------------------PhysicalOlapScan[customer_address] apply RFs: RF5 +------------------------PhysicalOlapScan[customer_address(a)] apply RFs: RF5 ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] apply RFs: RF4 +----------------------------PhysicalOlapScan[customer(c)] apply RFs: RF4 --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((s.ss_item_sk = i.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] 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 +------------------------------------PhysicalOlapScan[store_sales(s)] apply RFs: RF2 RF3 ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] 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 +----------------------------------------PhysicalOlapScan[date_dim(d)] apply RFs: RF1 --------------------------------------PhysicalAssertNumRows ----------------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------------hashAgg[GLOBAL] @@ -38,10 +38,10 @@ PhysicalResultSink ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((j.i_category = i.i_category)) otherCondition=((cast(i_current_price as DECIMALV3(38, 5)) > (1.2 * avg(j.i_current_price)))) ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] +------------------------------------PhysicalOlapScan[item(i)] ----------------------------------hashAgg[GLOBAL] ------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------hashAgg[LOCAL] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[item] +------------------------------------------PhysicalOlapScan[item(j)] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query64.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query64.out index e253bb99af68a0..1c68a5089d11d0 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query64.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query64.out @@ -23,13 +23,13 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((hd2.hd_income_band_sk = ib2.ib_income_band_sk)) otherCondition=() ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[household_demographics] +------------------------------------------PhysicalOlapScan[household_demographics(hd2)] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[income_band] +------------------------------------------PhysicalOlapScan[income_band(ib2)] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer_demographics] +----------------------------------PhysicalOlapScan[customer_demographics(cd2)] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer_address] +------------------------------PhysicalOlapScan[customer_address(ad2)] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN bucketShuffle] 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 @@ -37,11 +37,11 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_addr_sk = ad1.ca_address_sk)) otherCondition=() build RFs:RF10 ss_addr_sk->[ca_address_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer_address] apply RFs: RF10 +----------------------------------PhysicalOlapScan[customer_address(ad1)] apply RFs: RF10 --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF9 ss_cdemo_sk->[cd_demo_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF9 +--------------------------------------PhysicalOlapScan[customer_demographics(cd1)] apply RFs: RF9 ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF8 i_item_sk->[cr_item_sk,cs_item_sk,ss_item_sk] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() @@ -59,7 +59,7 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) ----------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 RF8 --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter(d_year IN (2001, 2002)) -------------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------------------------------------PhysicalOlapScan[date_dim(d1)] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((sale > (2 * refund))) --------------------------------------------------------------hashAgg[GLOBAL] @@ -72,9 +72,9 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) ------------------------------------------------------------------------PhysicalProject --------------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF8 ------------------------------------------------------PhysicalProject ---------------------------------------------------------PhysicalOlapScan[household_demographics] +--------------------------------------------------------PhysicalOlapScan[household_demographics(hd1)] --------------------------------------------------PhysicalProject -----------------------------------------------------PhysicalOlapScan[income_band] +----------------------------------------------------PhysicalOlapScan[income_band(ib1)] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[store] ------------------------------------------PhysicalProject @@ -83,9 +83,9 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) ----------------------------------------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] --------------------PhysicalProject -----------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[date_dim(d2)] ----------------PhysicalProject -------------------PhysicalOlapScan[date_dim] +------------------PhysicalOlapScan[date_dim(d3)] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query68.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query68.out index 8edc384cd49a83..04c6bb6e8b04b2 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query68.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query68.out @@ -9,7 +9,7 @@ PhysicalResultSink ------------PhysicalProject --------------hashJoin[INNER_JOIN shuffle] 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 +------------------PhysicalOlapScan[customer_address(current_addr)] apply RFs: RF5 ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] --------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query69.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query69.out index a68ff0c1138094..6e04a1e80acc91 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query69.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query69.out @@ -33,7 +33,7 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] ------------------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer] apply RFs: RF1 +----------------------------------PhysicalOlapScan[customer(c)] apply RFs: RF1 --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject @@ -43,5 +43,5 @@ PhysicalResultSink ----------------------------------------PhysicalOlapScan[date_dim] ------------------------------PhysicalProject --------------------------------filter(ca_state IN ('MI', 'TX', 'VA')) -----------------------------------PhysicalOlapScan[customer_address] +----------------------------------PhysicalOlapScan[customer_address(ca)] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query70.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query70.out index cdba03945b5183..166f868d4dcc24 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query70.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query70.out @@ -22,7 +22,7 @@ PhysicalResultSink --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 ------------------------------------PhysicalProject --------------------------------------filter((d1.d_month_seq <= 1224) and (d1.d_month_seq >= 1213)) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((store.s_state = tmp1.s_state)) otherCondition=() build RFs:RF2 s_state->[s_state] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store] apply RFs: RF2 diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query72.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query72.out index a052b1ac62fd13..6b1d29b746cb0e 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query72.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query72.out @@ -35,16 +35,16 @@ PhysicalResultSink ----------------------------------------------------------PhysicalOlapScan[household_demographics] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((d1.d_year = 2002)) -------------------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------------------------PhysicalOlapScan[date_dim(d1)] ----------------------------------------------PhysicalProject ------------------------------------------------filter((customer_demographics.cd_marital_status = 'W')) --------------------------------------------------PhysicalOlapScan[customer_demographics] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------------PhysicalOlapScan[date_dim(d3)] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[item] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalOlapScan[date_dim(d2)] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[warehouse] ----------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query85.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query85.out index 143dae01fa79a2..1d6abeb68b47cc 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query85.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query85.out @@ -16,12 +16,12 @@ PhysicalResultSink --------------------------hashJoin[INNER_JOIN broadcast] 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 wr_returning_cdemo_sk->[cd_demo_sk];RF6 cd_marital_status->[cd_marital_status];RF7 cd_education_status->[cd_education_status] ----------------------------PhysicalProject ------------------------------filter(cd_education_status IN ('4 yr Degree', 'Advanced Degree', 'Secondary') and cd_marital_status IN ('M', 'S', 'W')) ---------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF5 RF6 RF7 +--------------------------------PhysicalOlapScan[customer_demographics(cd2)] apply RFs: RF5 RF6 RF7 ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk)) otherCondition=(OR[AND[(cd1.cd_marital_status = 'M'),(cd1.cd_education_status = '4 yr Degree'),(web_sales.ws_sales_price >= 100.00),(web_sales.ws_sales_price <= 150.00)],AND[(cd1.cd_marital_status = 'S'),(cd1.cd_education_status = 'Secondary'),(web_sales.ws_sales_price <= 100.00)],AND[(cd1.cd_marital_status = 'W'),(cd1.cd_education_status = 'Advanced Degree'),(web_sales.ws_sales_price >= 150.00)]]) build RFs:RF4 wr_refunded_cdemo_sk->[cd_demo_sk] --------------------------------PhysicalProject ----------------------------------filter(OR[AND[(cd1.cd_marital_status = 'M'),(cd1.cd_education_status = '4 yr Degree')],AND[(cd1.cd_marital_status = 'S'),(cd1.cd_education_status = 'Secondary')],AND[(cd1.cd_marital_status = 'W'),(cd1.cd_education_status = 'Advanced Degree')]] and cd_education_status IN ('4 yr Degree', 'Advanced Degree', 'Secondary') and cd_marital_status IN ('M', 'S', 'W')) -------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF4 +------------------------------------PhysicalOlapScan[customer_demographics(cd1)] apply RFs: RF4 --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_address.ca_address_sk = web_returns.wr_refunded_addr_sk)) otherCondition=(OR[AND[ca_state IN ('DE', 'FL', 'TX'),(web_sales.ws_net_profit >= 100.00),(web_sales.ws_net_profit <= 200.00)],AND[ca_state IN ('ID', 'IN', 'ND'),(web_sales.ws_net_profit >= 150.00)],AND[ca_state IN ('IL', 'MT', 'OH'),(web_sales.ws_net_profit <= 250.00)]]) build RFs:RF3 ca_address_sk->[wr_refunded_addr_sk] ------------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query86.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query86.out index c68c8b30e9e929..d492bc02265816 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query86.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query86.out @@ -22,7 +22,7 @@ PhysicalResultSink --------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 ------------------------------------PhysicalProject --------------------------------------filter((d1.d_month_seq <= 1235) and (d1.d_month_seq >= 1224)) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query94.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query94.out index df854654271e34..286576e5545781 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query94.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query94.out @@ -11,7 +11,7 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF3 ws_order_number->[ws_order_number] --------------------PhysicalProject -----------------------PhysicalOlapScan[web_sales] apply RFs: RF3 +----------------------PhysicalOlapScan[web_sales(ws2)] apply RFs: RF3 --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_sk] ------------------------PhysicalProject @@ -20,9 +20,9 @@ PhysicalResultSink ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] --------------------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 +------------------------------------PhysicalOlapScan[web_sales(ws1)] apply RFs: RF0 RF1 RF2 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_returns] +------------------------------------PhysicalOlapScan[web_returns(wr1)] --------------------------------PhysicalProject ----------------------------------filter((customer_address.ca_state = 'OK')) ------------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query95.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query95.out index 623fe7152eccbb..b7248d6c87c811 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query95.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query95.out @@ -5,9 +5,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN shuffle] 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] --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF0 RF7 +----------PhysicalOlapScan[web_sales(ws1)] apply RFs: RF0 RF7 --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF7 +----------PhysicalOlapScan[web_sales(ws2)] apply RFs: RF7 --PhysicalResultSink ----PhysicalLimit[GLOBAL] ------PhysicalLimit[LOCAL] @@ -31,7 +31,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 +------------------------------------PhysicalOlapScan[web_sales(ws1)] apply RFs: RF1 RF2 RF3 ----------------------------------PhysicalProject ------------------------------------filter((customer_address.ca_state = 'NC')) --------------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query10.out b/regression-test/data/shape_check/tpcds_sf100/shape/query10.out index 4dfc2de4cf3fe5..d5e5d3e9ef04e7 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query10.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query10.out @@ -40,8 +40,8 @@ PhysicalResultSink ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] 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 +------------------------------------PhysicalOlapScan[customer(c)] apply RFs: RF0 ----------------------------------PhysicalProject ------------------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County')) ---------------------------------------PhysicalOlapScan[customer_address] +--------------------------------------PhysicalOlapScan[customer_address(ca)] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query14.out b/regression-test/data/shape_check/tpcds_sf100/shape/query14.out index e31e2e3063ac83..ba4b71c87bd8b2 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query14.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query14.out @@ -18,9 +18,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------PhysicalProject --------------------------filter((d1.d_year <= 2002) and (d1.d_year >= 2000)) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(d1)] --------------------PhysicalProject -----------------------PhysicalOlapScan[item] +----------------------PhysicalOlapScan[item(iss)] ----------hashAgg[GLOBAL] ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] @@ -32,9 +32,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 ------------------------PhysicalProject --------------------------filter((d2.d_year <= 2002) and (d2.d_year >= 2000)) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(d2)] --------------------PhysicalProject -----------------------PhysicalOlapScan[item] RFV2: RF19 +----------------------PhysicalOlapScan[item(ics)] RFV2: RF19 ----------hashAgg[GLOBAL] ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] @@ -46,9 +46,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 ------------------------PhysicalProject --------------------------filter((d3.d_year <= 2002) and (d3.d_year >= 2000)) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(d3)] --------------------PhysicalProject -----------------------PhysicalOlapScan[item] RFV2: RF20 +----------------------PhysicalOlapScan[item(iws)] RFV2: RF20 --PhysicalCteAnchor ( cteId=CTEId#1 ) ----PhysicalCteProducer ( cteId=CTEId#1 ) ------hashAgg[GLOBAL] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query16.out b/regression-test/data/shape_check/tpcds_sf100/shape/query16.out index b1b5037f23d714..4b3bbb95139e6e 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query16.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query16.out @@ -11,7 +11,7 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF3 cs_order_number->[cs_order_number] --------------------PhysicalProject -----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 +----------------------PhysicalOlapScan[catalog_sales(cs2)] apply RFs: RF3 --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cc_call_center_sk->[cs_call_center_sk] ------------------------PhysicalProject @@ -20,9 +20,9 @@ PhysicalResultSink ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cs_ship_addr_sk] --------------------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 +------------------------------------PhysicalOlapScan[catalog_sales(cs1)] apply RFs: RF0 RF1 RF2 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_returns] +------------------------------------PhysicalOlapScan[catalog_returns(cr1)] --------------------------------PhysicalProject ----------------------------------filter((customer_address.ca_state = 'WV')) ------------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query17.out b/regression-test/data/shape_check/tpcds_sf100/shape/query17.out index 7cc4a196c206c3..8500161113dfcc 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query17.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query17.out @@ -16,7 +16,7 @@ PhysicalResultSink --------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 RF8 RF9 ------------------------PhysicalProject --------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(d3)] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF6 s_store_sk->[ss_store_sk] ------------------------PhysicalProject @@ -29,14 +29,14 @@ PhysicalResultSink --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 RF5 RF6 ------------------------------------PhysicalProject --------------------------------------filter((d1.d_quarter_name = '2001Q1')) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] 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 RF5 ------------------------------------PhysicalProject --------------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalOlapScan[date_dim(d2)] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[item] ------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query18.out b/regression-test/data/shape_check/tpcds_sf100/shape/query18.out index cc7308bfd957b8..178c86ab50e025 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query18.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query18.out @@ -23,11 +23,11 @@ PhysicalResultSink ------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 RF4 ----------------------------------PhysicalProject ------------------------------------filter((cd1.cd_education_status = 'Advanced Degree') and (cd1.cd_gender = 'F')) ---------------------------------------PhysicalOlapScan[customer_demographics] +--------------------------------------PhysicalOlapScan[customer_demographics(cd1)] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() build RFs:RF1 c_current_cdemo_sk->[cd_demo_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF1 +------------------------------------PhysicalOlapScan[customer_demographics(cd2)] apply RFs: RF1 ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] --------------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query25.out b/regression-test/data/shape_check/tpcds_sf100/shape/query25.out index a9f0a2a72e7793..a6fa452b1806d7 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query25.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query25.out @@ -15,7 +15,7 @@ PhysicalResultSink ------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 RF8 RF9 ----------------------PhysicalProject ------------------------filter((d3.d_moy <= 10) and (d3.d_moy >= 4) and (d3.d_year = 2000)) ---------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalOlapScan[date_dim(d3)] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF6 s_store_sk->[ss_store_sk] ----------------------PhysicalProject @@ -28,14 +28,14 @@ PhysicalResultSink ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 RF5 RF6 ----------------------------------PhysicalProject ------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 2000)) ---------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------PhysicalOlapScan[date_dim(d1)] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] 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 RF5 ----------------------------------PhysicalProject ------------------------------------filter((d2.d_moy <= 10) and (d2.d_moy >= 4) and (d2.d_year = 2000)) ---------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------PhysicalOlapScan[date_dim(d2)] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[item] ----------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query29.out b/regression-test/data/shape_check/tpcds_sf100/shape/query29.out index 53995b4a88e7d9..3eb756f83deda3 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query29.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query29.out @@ -25,19 +25,19 @@ PhysicalResultSink ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 RF5 RF6 --------------------------------------PhysicalProject ----------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1999)) -------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------------PhysicalOlapScan[date_dim(d1)] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] 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 RF5 --------------------------------------PhysicalProject ----------------------------------------filter((d2.d_moy <= 7) and (d2.d_moy >= 4) and (d2.d_year = 1999)) -------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------------PhysicalOlapScan[date_dim(d2)] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[item] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store] ------------------PhysicalProject --------------------filter(d_year IN (1999, 2000, 2001)) -----------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[date_dim(d3)] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query36.out b/regression-test/data/shape_check/tpcds_sf100/shape/query36.out index 92f5563f1a38b5..ac423e3e6df849 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query36.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query36.out @@ -24,7 +24,7 @@ PhysicalResultSink ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ----------------------------------------PhysicalProject ------------------------------------------filter((d1.d_year = 2002)) ---------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------------PhysicalOlapScan[date_dim(d1)] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query41.out b/regression-test/data/shape_check/tpcds_sf100/shape/query41.out index 27f61565b67f12..1a37dd7da92355 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query41.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query41.out @@ -11,7 +11,7 @@ PhysicalResultSink ----------------hashJoin[INNER_JOIN broadcast] 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 +----------------------PhysicalOlapScan[item(i1)] apply RFs: RF0 ------------------PhysicalProject --------------------filter((item_cnt > 0)) ----------------------hashAgg[GLOBAL] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query44.out b/regression-test/data/shape_check/tpcds_sf100/shape/query44.out index 0bac032032ce42..5c55cff87e3832 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query44.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query44.out @@ -27,7 +27,7 @@ PhysicalResultSink --------------------------------------------hashAgg[LOCAL] ----------------------------------------------PhysicalProject ------------------------------------------------filter((ss1.ss_store_sk = 146)) ---------------------------------------------------PhysicalOlapScan[store_sales] +--------------------------------------------------PhysicalOlapScan[store_sales(ss1)] --------------------------------------PhysicalProject ----------------------------------------PhysicalAssertNumRows ------------------------------------------PhysicalDistribute[DistributionSpecGather] @@ -57,7 +57,7 @@ PhysicalResultSink --------------------------------------------hashAgg[LOCAL] ----------------------------------------------PhysicalProject ------------------------------------------------filter((ss1.ss_store_sk = 146)) ---------------------------------------------------PhysicalOlapScan[store_sales] +--------------------------------------------------PhysicalOlapScan[store_sales(ss1)] --------------------------------------PhysicalProject ----------------------------------------PhysicalAssertNumRows ------------------------------------------PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query46.out b/regression-test/data/shape_check/tpcds_sf100/shape/query46.out index 13bf6421c7ed3a..f97d7904f42cd6 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query46.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query46.out @@ -34,5 +34,5 @@ PhysicalResultSink ----------------PhysicalProject ------------------PhysicalOlapScan[customer] apply RFs: RF5 ------------PhysicalProject ---------------PhysicalOlapScan[customer_address] +--------------PhysicalOlapScan[customer_address(current_addr)] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query49.out b/regression-test/data/shape_check/tpcds_sf100/shape/query49.out index b13ecb58ccc887..423e1cf346f6dd 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query49.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query49.out @@ -31,12 +31,12 @@ PhysicalResultSink --------------------------------------------------------hashJoin[INNER_JOIN colocated] 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] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) ---------------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2 +--------------------------------------------------------------PhysicalOlapScan[web_returns(wr)] apply RFs: RF1 RF2 ----------------------------------------------------------PhysicalProject ------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] --------------------------------------------------------------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 +------------------------------------------------------------------PhysicalOlapScan[web_sales(ws)] apply RFs: RF0 --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) ------------------------------------------------------------------PhysicalOlapScan[date_dim] @@ -63,12 +63,12 @@ PhysicalResultSink --------------------------------------------------------hashJoin[INNER_JOIN colocated] 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] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) ---------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5 +--------------------------------------------------------------PhysicalOlapScan[catalog_returns(cr)] apply RFs: RF4 RF5 ----------------------------------------------------------PhysicalProject ------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] --------------------------------------------------------------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 +------------------------------------------------------------------PhysicalOlapScan[catalog_sales(cs)] apply RFs: RF3 --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) ------------------------------------------------------------------PhysicalOlapScan[date_dim] @@ -95,12 +95,12 @@ PhysicalResultSink --------------------------------------------------------hashJoin[INNER_JOIN colocated] 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] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) ---------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8 +--------------------------------------------------------------PhysicalOlapScan[store_returns(sr)] apply RFs: RF7 RF8 ----------------------------------------------------------PhysicalProject ------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] --------------------------------------------------------------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 +------------------------------------------------------------------PhysicalOlapScan[store_sales(sts)] apply RFs: RF6 --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) ------------------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query50.out b/regression-test/data/shape_check/tpcds_sf100/shape/query50.out index f5c3f38463d42c..18be632aaa5770 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query50.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query50.out @@ -21,9 +21,9 @@ PhysicalResultSink --------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 ------------------------------PhysicalProject --------------------------------filter((d2.d_moy = 8) and (d2.d_year = 2001)) -----------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[date_dim(d2)] ----------------------PhysicalProject -------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[date_dim(d1)] ------------------PhysicalProject --------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query59.out b/regression-test/data/shape_check/tpcds_sf100/shape/query59.out index 1596274288caf2..f5fc81e7ddb98c 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query59.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query59.out @@ -30,7 +30,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------PhysicalOlapScan[store] apply RFs: RF5 ------------------PhysicalProject --------------------filter((d.d_month_seq <= 1207) and (d.d_month_seq >= 1196)) -----------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[date_dim(d)] --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_week_seq = d_week_seq2)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq] ------------------PhysicalProject @@ -41,5 +41,5 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------PhysicalOlapScan[store] ------------------PhysicalProject --------------------filter((d.d_month_seq <= 1219) and (d.d_month_seq >= 1208)) -----------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[date_dim(d)] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query6.out b/regression-test/data/shape_check/tpcds_sf100/shape/query6.out index 94dfbee3c5e2b2..9eead41add48b7 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query6.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query6.out @@ -12,21 +12,21 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() build RFs:RF5 c_current_addr_sk->[ca_address_sk] ----------------------PhysicalProject -------------------------PhysicalOlapScan[customer_address] apply RFs: RF5 +------------------------PhysicalOlapScan[customer_address(a)] apply RFs: RF5 ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] apply RFs: RF4 +----------------------------PhysicalOlapScan[customer(c)] apply RFs: RF4 --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((s.ss_item_sk = i.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] 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 +------------------------------------PhysicalOlapScan[store_sales(s)] apply RFs: RF2 RF3 ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] 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 +----------------------------------------PhysicalOlapScan[date_dim(d)] apply RFs: RF1 --------------------------------------PhysicalAssertNumRows ----------------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------------hashAgg[GLOBAL] @@ -38,10 +38,10 @@ PhysicalResultSink ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((j.i_category = i.i_category)) otherCondition=((cast(i_current_price as DECIMALV3(38, 5)) > (1.2 * avg(j.i_current_price)))) build RFs:RF0 i_category->[i_category] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF0 +------------------------------------PhysicalOlapScan[item(i)] apply RFs: RF0 ----------------------------------hashAgg[GLOBAL] ------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------hashAgg[LOCAL] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[item] +------------------------------------------PhysicalOlapScan[item(j)] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query64.out b/regression-test/data/shape_check/tpcds_sf100/shape/query64.out index 3606d245263241..fa33c2e2a82f14 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query64.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query64.out @@ -23,13 +23,13 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN broadcast] 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 +------------------------------------------PhysicalOlapScan[household_demographics(hd2)] apply RFs: RF13 ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[income_band] +------------------------------------------PhysicalOlapScan[income_band(ib2)] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer_demographics] +----------------------------------PhysicalOlapScan[customer_demographics(cd2)] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer_address] +------------------------------PhysicalOlapScan[customer_address(ad2)] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN bucketShuffle] 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 @@ -37,11 +37,11 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_addr_sk = ad1.ca_address_sk)) otherCondition=() build RFs:RF10 ss_addr_sk->[ca_address_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer_address] apply RFs: RF10 +----------------------------------PhysicalOlapScan[customer_address(ad1)] apply RFs: RF10 --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF9 ss_cdemo_sk->[cd_demo_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF9 +--------------------------------------PhysicalOlapScan[customer_demographics(cd1)] apply RFs: RF9 ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF8 i_item_sk->[cr_item_sk,cs_item_sk,ss_item_sk] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF7 p_promo_sk->[ss_promo_sk] @@ -59,7 +59,7 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) ----------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 RF4 RF6 RF7 RF8 --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter(d_year IN (2001, 2002)) -------------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------------------------------------PhysicalOlapScan[date_dim(d1)] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((sale > (2 * refund))) --------------------------------------------------------------hashAgg[GLOBAL] @@ -72,9 +72,9 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) ------------------------------------------------------------------------PhysicalProject --------------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF8 ------------------------------------------------------PhysicalProject ---------------------------------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF5 +--------------------------------------------------------PhysicalOlapScan[household_demographics(hd1)] apply RFs: RF5 --------------------------------------------------PhysicalProject -----------------------------------------------------PhysicalOlapScan[income_band] +----------------------------------------------------PhysicalOlapScan[income_band(ib1)] ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[store] ------------------------------------------PhysicalProject @@ -83,9 +83,9 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) ----------------------------------------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] --------------------PhysicalProject -----------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[date_dim(d2)] ----------------PhysicalProject -------------------PhysicalOlapScan[date_dim] +------------------PhysicalOlapScan[date_dim(d3)] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query68.out b/regression-test/data/shape_check/tpcds_sf100/shape/query68.out index 8edc384cd49a83..04c6bb6e8b04b2 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query68.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query68.out @@ -9,7 +9,7 @@ PhysicalResultSink ------------PhysicalProject --------------hashJoin[INNER_JOIN shuffle] 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 +------------------PhysicalOlapScan[customer_address(current_addr)] apply RFs: RF5 ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] --------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query69.out b/regression-test/data/shape_check/tpcds_sf100/shape/query69.out index a68ff0c1138094..6e04a1e80acc91 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query69.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query69.out @@ -33,7 +33,7 @@ PhysicalResultSink ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] ------------------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer] apply RFs: RF1 +----------------------------------PhysicalOlapScan[customer(c)] apply RFs: RF1 --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject @@ -43,5 +43,5 @@ PhysicalResultSink ----------------------------------------PhysicalOlapScan[date_dim] ------------------------------PhysicalProject --------------------------------filter(ca_state IN ('MI', 'TX', 'VA')) -----------------------------------PhysicalOlapScan[customer_address] +----------------------------------PhysicalOlapScan[customer_address(ca)] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query70.out b/regression-test/data/shape_check/tpcds_sf100/shape/query70.out index e0ab3c9249ec9c..dc225d4b682d32 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query70.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query70.out @@ -22,7 +22,7 @@ PhysicalResultSink --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 ------------------------------------PhysicalProject --------------------------------------filter((d1.d_month_seq <= 1224) and (d1.d_month_seq >= 1213)) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((store.s_state = tmp1.s_state)) otherCondition=() build RFs:RF2 s_state->[s_state] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store] apply RFs: RF2 diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query72.out b/regression-test/data/shape_check/tpcds_sf100/shape/query72.out index 2e370f2716bfc2..a114811734015d 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query72.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query72.out @@ -35,16 +35,16 @@ PhysicalResultSink ----------------------------------------------------------PhysicalOlapScan[household_demographics] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((d1.d_year = 2002)) -------------------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 +------------------------------------------------------PhysicalOlapScan[date_dim(d1)] apply RFs: RF5 ----------------------------------------------PhysicalProject ------------------------------------------------filter((customer_demographics.cd_marital_status = 'W')) --------------------------------------------------PhysicalOlapScan[customer_demographics] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------------PhysicalOlapScan[date_dim(d3)] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[item] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalOlapScan[date_dim(d2)] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[warehouse] ----------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query85.out b/regression-test/data/shape_check/tpcds_sf100/shape/query85.out index afe29ebb5e4289..ec90a2a41d8546 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query85.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query85.out @@ -16,12 +16,12 @@ PhysicalResultSink --------------------------hashJoin[INNER_JOIN broadcast] 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 wr_returning_cdemo_sk->[cd_demo_sk];RF6 cd_marital_status->[cd_marital_status];RF7 cd_education_status->[cd_education_status] ----------------------------PhysicalProject ------------------------------filter(cd_education_status IN ('4 yr Degree', 'Advanced Degree', 'Secondary') and cd_marital_status IN ('M', 'S', 'W')) ---------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF5 RF6 RF7 +--------------------------------PhysicalOlapScan[customer_demographics(cd2)] apply RFs: RF5 RF6 RF7 ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk)) otherCondition=(OR[AND[(cd1.cd_marital_status = 'M'),(cd1.cd_education_status = '4 yr Degree'),(web_sales.ws_sales_price >= 100.00),(web_sales.ws_sales_price <= 150.00)],AND[(cd1.cd_marital_status = 'S'),(cd1.cd_education_status = 'Secondary'),(web_sales.ws_sales_price <= 100.00)],AND[(cd1.cd_marital_status = 'W'),(cd1.cd_education_status = 'Advanced Degree'),(web_sales.ws_sales_price >= 150.00)]]) build RFs:RF4 wr_refunded_cdemo_sk->[cd_demo_sk] --------------------------------PhysicalProject ----------------------------------filter(OR[AND[(cd1.cd_marital_status = 'M'),(cd1.cd_education_status = '4 yr Degree')],AND[(cd1.cd_marital_status = 'S'),(cd1.cd_education_status = 'Secondary')],AND[(cd1.cd_marital_status = 'W'),(cd1.cd_education_status = 'Advanced Degree')]] and cd_education_status IN ('4 yr Degree', 'Advanced Degree', 'Secondary') and cd_marital_status IN ('M', 'S', 'W')) -------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF4 +------------------------------------PhysicalOlapScan[customer_demographics(cd1)] apply RFs: RF4 --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_address.ca_address_sk = web_returns.wr_refunded_addr_sk)) otherCondition=(OR[AND[ca_state IN ('DE', 'FL', 'TX'),(web_sales.ws_net_profit >= 100.00),(web_sales.ws_net_profit <= 200.00)],AND[ca_state IN ('ID', 'IN', 'ND'),(web_sales.ws_net_profit >= 150.00)],AND[ca_state IN ('IL', 'MT', 'OH'),(web_sales.ws_net_profit <= 250.00)]]) build RFs:RF3 ca_address_sk->[wr_refunded_addr_sk] ------------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query86.out b/regression-test/data/shape_check/tpcds_sf100/shape/query86.out index ebfed4e4aa6c91..f5663dae2be9fb 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query86.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query86.out @@ -22,7 +22,7 @@ PhysicalResultSink --------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 ------------------------------------PhysicalProject --------------------------------------filter((d1.d_month_seq <= 1235) and (d1.d_month_seq >= 1224)) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query94.out b/regression-test/data/shape_check/tpcds_sf100/shape/query94.out index df854654271e34..286576e5545781 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query94.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query94.out @@ -11,7 +11,7 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF3 ws_order_number->[ws_order_number] --------------------PhysicalProject -----------------------PhysicalOlapScan[web_sales] apply RFs: RF3 +----------------------PhysicalOlapScan[web_sales(ws2)] apply RFs: RF3 --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_sk] ------------------------PhysicalProject @@ -20,9 +20,9 @@ PhysicalResultSink ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] --------------------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 +------------------------------------PhysicalOlapScan[web_sales(ws1)] apply RFs: RF0 RF1 RF2 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_returns] +------------------------------------PhysicalOlapScan[web_returns(wr1)] --------------------------------PhysicalProject ----------------------------------filter((customer_address.ca_state = 'OK')) ------------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query95.out b/regression-test/data/shape_check/tpcds_sf100/shape/query95.out index 2e4d4278eaaed8..fec0ed12ec894f 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query95.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query95.out @@ -5,9 +5,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN shuffle] 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];RF1 ws_order_number->[ws_order_number] --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF14 RF15 +----------PhysicalOlapScan[web_sales(ws1)] apply RFs: RF0 RF1 RF14 RF15 --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF14 RF15 +----------PhysicalOlapScan[web_sales(ws2)] apply RFs: RF14 RF15 --PhysicalResultSink ----PhysicalLimit[GLOBAL] ------PhysicalLimit[LOCAL] @@ -31,7 +31,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ws_ship_addr_sk];RF3 ca_address_sk->[ws_ship_addr_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 RF4 RF5 RF6 RF7 +------------------------------------PhysicalOlapScan[web_sales(ws1)] apply RFs: RF2 RF3 RF4 RF5 RF6 RF7 ----------------------------------PhysicalProject ------------------------------------filter((customer_address.ca_state = 'NC')) --------------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query44.out b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query44.out index 5d21002157fd9a..b733c203a720df 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query44.out +++ b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query44.out @@ -27,7 +27,7 @@ PhysicalResultSink --------------------------------------------hashAgg[LOCAL] ----------------------------------------------PhysicalProject ------------------------------------------------filter((ss1.ss_store_sk = 4)) ---------------------------------------------------PhysicalOlapScan[store_sales] +--------------------------------------------------PhysicalOlapScan[store_sales(ss1)] --------------------------------------PhysicalProject ----------------------------------------PhysicalAssertNumRows ------------------------------------------PhysicalDistribute[DistributionSpecGather] @@ -57,7 +57,7 @@ PhysicalResultSink --------------------------------------------hashAgg[LOCAL] ----------------------------------------------PhysicalProject ------------------------------------------------filter((ss1.ss_store_sk = 4)) ---------------------------------------------------PhysicalOlapScan[store_sales] +--------------------------------------------------PhysicalOlapScan[store_sales(ss1)] --------------------------------------PhysicalProject ----------------------------------------PhysicalAssertNumRows ------------------------------------------PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query6.out b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query6.out index 94dfbee3c5e2b2..9eead41add48b7 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query6.out +++ b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query6.out @@ -12,21 +12,21 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() build RFs:RF5 c_current_addr_sk->[ca_address_sk] ----------------------PhysicalProject -------------------------PhysicalOlapScan[customer_address] apply RFs: RF5 +------------------------PhysicalOlapScan[customer_address(a)] apply RFs: RF5 ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] apply RFs: RF4 +----------------------------PhysicalOlapScan[customer(c)] apply RFs: RF4 --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((s.ss_item_sk = i.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] 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 +------------------------------------PhysicalOlapScan[store_sales(s)] apply RFs: RF2 RF3 ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] 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 +----------------------------------------PhysicalOlapScan[date_dim(d)] apply RFs: RF1 --------------------------------------PhysicalAssertNumRows ----------------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------------hashAgg[GLOBAL] @@ -38,10 +38,10 @@ PhysicalResultSink ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((j.i_category = i.i_category)) otherCondition=((cast(i_current_price as DECIMALV3(38, 5)) > (1.2 * avg(j.i_current_price)))) build RFs:RF0 i_category->[i_category] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF0 +------------------------------------PhysicalOlapScan[item(i)] apply RFs: RF0 ----------------------------------hashAgg[GLOBAL] ------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------hashAgg[LOCAL] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[item] +------------------------------------------PhysicalOlapScan[item(j)] diff --git a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query68.out b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query68.out index 158dde8b936afe..e25d34e80cdd66 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query68.out +++ b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query68.out @@ -9,7 +9,7 @@ PhysicalResultSink ------------PhysicalProject --------------hashJoin[INNER_JOIN shuffle] 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 +------------------PhysicalOlapScan[customer_address(current_addr)] apply RFs: RF5 ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] --------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query95.out b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query95.out index 84bdd6cf3d8f4a..058b68aa677160 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query95.out +++ b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query95.out @@ -5,9 +5,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN shuffle] 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] --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF0 RF7 +----------PhysicalOlapScan[web_sales(ws1)] apply RFs: RF0 RF7 --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF7 +----------PhysicalOlapScan[web_sales(ws2)] apply RFs: RF7 --PhysicalResultSink ----PhysicalLimit[GLOBAL] ------PhysicalLimit[LOCAL] @@ -31,7 +31,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 +------------------------------------PhysicalOlapScan[web_sales(ws1)] apply RFs: RF1 RF2 RF3 ----------------------------------PhysicalProject ------------------------------------filter((customer_address.ca_state = 'VA')) --------------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf1000/eliminate_empty/query10_empty.out b/regression-test/data/shape_check/tpcds_sf1000/eliminate_empty/query10_empty.out index 78fd7c847c29ed..d740d8a47904bc 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/eliminate_empty/query10_empty.out +++ b/regression-test/data/shape_check/tpcds_sf1000/eliminate_empty/query10_empty.out @@ -40,8 +40,8 @@ PhysicalResultSink ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] 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 +------------------------------------PhysicalOlapScan[customer(c)] apply RFs: RF0 ----------------------------------PhysicalProject ------------------------------------filter(ca_county IN ('Campbell County', 'Cleburne County', 'Escambia County', 'Fairfield County', 'Washtenaw County')) ---------------------------------------PhysicalOlapScan[customer_address] +--------------------------------------PhysicalOlapScan[customer_address(ca)] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query10.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query10.out index f006e27f47de8b..51429c402fb55a 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query10.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query10.out @@ -19,10 +19,10 @@ PhysicalResultSink ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 RF5 +------------------------------------PhysicalOlapScan[customer(c)] apply RFs: RF3 RF5 ----------------------------------PhysicalProject ------------------------------------filter(ca_county IN ('Campbell County', 'Cleburne County', 'Escambia County', 'Fairfield County', 'Washtenaw County')) ---------------------------------------PhysicalOlapScan[customer_address] +--------------------------------------PhysicalOlapScan[customer_address(ca)] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query14.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query14.out index 9eb9b9efdd5406..b0ab8ea31fa3ae 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query14.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query14.out @@ -18,9 +18,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------PhysicalProject --------------------------filter((d1.d_year <= 2001) and (d1.d_year >= 1999)) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(d1)] --------------------PhysicalProject -----------------------PhysicalOlapScan[item] +----------------------PhysicalOlapScan[item(iss)] ----------hashAgg[GLOBAL] ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] @@ -32,9 +32,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 ------------------------PhysicalProject --------------------------filter((d2.d_year <= 2001) and (d2.d_year >= 1999)) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(d2)] --------------------PhysicalProject -----------------------PhysicalOlapScan[item] RFV2: RF19 +----------------------PhysicalOlapScan[item(ics)] RFV2: RF19 ----------hashAgg[GLOBAL] ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] @@ -46,9 +46,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 ------------------------PhysicalProject --------------------------filter((d3.d_year <= 2001) and (d3.d_year >= 1999)) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(d3)] --------------------PhysicalProject -----------------------PhysicalOlapScan[item] RFV2: RF20 +----------------------PhysicalOlapScan[item(iws)] RFV2: RF20 --PhysicalCteAnchor ( cteId=CTEId#1 ) ----PhysicalCteProducer ( cteId=CTEId#1 ) ------hashAgg[GLOBAL] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query16.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query16.out index 391b7d7cc41ba7..e32afc023352ba 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query16.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query16.out @@ -11,10 +11,10 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] 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] --------------------PhysicalProject -----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 +----------------------PhysicalOlapScan[catalog_sales(cs2)] apply RFs: RF4 --------------------hashJoin[RIGHT_ANTI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() build RFs:RF3 cs_order_number->[cr_order_number] ----------------------PhysicalProject -------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF3 +------------------------PhysicalOlapScan[catalog_returns(cr1)] apply RFs: RF3 ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cc_call_center_sk->[cs_call_center_sk] --------------------------PhysicalProject @@ -22,7 +22,7 @@ PhysicalResultSink ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cs_ship_addr_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 +------------------------------------PhysicalOlapScan[catalog_sales(cs1)] apply RFs: RF0 RF1 RF2 ----------------------------------PhysicalProject ------------------------------------filter((customer_address.ca_state = 'PA')) --------------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query17.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query17.out index 72003f9609ac64..02ab42f1f74e87 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query17.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query17.out @@ -16,7 +16,7 @@ PhysicalResultSink --------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 RF8 RF9 ------------------------PhysicalProject --------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(d3)] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[sr_item_sk,ss_item_sk] ------------------------PhysicalProject @@ -29,14 +29,14 @@ PhysicalResultSink --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 RF5 RF6 ------------------------------------PhysicalProject --------------------------------------filter((d1.d_quarter_name = '2001Q1')) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] 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 RF6 ------------------------------------PhysicalProject --------------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalOlapScan[date_dim(d2)] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[store] ------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query18.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query18.out index 83435bdb2f7c23..cebd84221d984b 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query18.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query18.out @@ -21,11 +21,11 @@ PhysicalResultSink ------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 RF4 RF5 ----------------------------------PhysicalProject ------------------------------------filter((cd1.cd_education_status = 'Primary') and (cd1.cd_gender = 'F')) ---------------------------------------PhysicalOlapScan[customer_demographics] +--------------------------------------PhysicalOlapScan[customer_demographics(cd1)] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() build RFs:RF1 c_current_cdemo_sk->[cd_demo_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF1 +------------------------------------PhysicalOlapScan[customer_demographics(cd2)] apply RFs: RF1 ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] --------------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query25.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query25.out index c8ed208401576b..9e41ac461884a9 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query25.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query25.out @@ -15,7 +15,7 @@ PhysicalResultSink ------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 RF8 RF9 ----------------------PhysicalProject ------------------------filter((d3.d_moy <= 10) and (d3.d_moy >= 4) and (d3.d_year = 1999)) ---------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalOlapScan[date_dim(d3)] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF6 s_store_sk->[ss_store_sk] ----------------------PhysicalProject @@ -28,14 +28,14 @@ PhysicalResultSink ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 RF5 RF6 ----------------------------------PhysicalProject ------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1999)) ---------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------PhysicalOlapScan[date_dim(d1)] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] 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 RF5 ----------------------------------PhysicalProject ------------------------------------filter((d2.d_moy <= 10) and (d2.d_moy >= 4) and (d2.d_year = 1999)) ---------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------PhysicalOlapScan[date_dim(d2)] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[item] ----------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query29.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query29.out index da1a421441457d..0e55603d42d516 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query29.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query29.out @@ -25,21 +25,21 @@ PhysicalResultSink ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 RF5 RF6 --------------------------------------PhysicalProject ----------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1998)) -------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------------PhysicalOlapScan[date_dim(d1)] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] 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 RF5 --------------------------------------PhysicalProject ----------------------------------------filter((d2.d_moy <= 7) and (d2.d_moy >= 4) and (d2.d_year = 1998)) -------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------------PhysicalOlapScan[date_dim(d2)] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[item] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store] ------------------PhysicalProject --------------------filter(d_year IN (1998, 1999, 2000)) -----------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[date_dim(d3)] Hint log: Used: leading(catalog_sales { { store_sales d1 { store_returns d2 } } item store } d3 ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query3.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query3.out index c055cd2b3e620b..70cf4b30590db4 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query3.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query3.out @@ -22,7 +22,7 @@ PhysicalResultSink ----------------------------PhysicalOlapScan[item] --------------------PhysicalProject ----------------------filter((dt.d_moy = 11)) -------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[date_dim(dt)] Hint log: Used: leading(store_sales broadcast item broadcast dt ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query36.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query36.out index 7d79fdc49e8244..2ab854cac1d492 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query36.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query36.out @@ -27,7 +27,7 @@ PhysicalResultSink --------------------------------------------PhysicalOlapScan[store] ------------------------------------PhysicalProject --------------------------------------filter((d1.d_year = 2000)) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query41.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query41.out index 27385ebe5c25ba..92045bb79faf37 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query41.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query41.out @@ -11,7 +11,7 @@ PhysicalResultSink ----------------hashJoin[INNER_JOIN broadcast] 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 +----------------------PhysicalOlapScan[item(i1)] apply RFs: RF0 ------------------PhysicalProject --------------------filter((item_cnt > 0)) ----------------------hashAgg[GLOBAL] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query44.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query44.out index 55c8164bef6a59..cf71eff66ce68d 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query44.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query44.out @@ -27,7 +27,7 @@ PhysicalResultSink --------------------------------------------hashAgg[LOCAL] ----------------------------------------------PhysicalProject ------------------------------------------------filter((ss1.ss_store_sk = 4)) ---------------------------------------------------PhysicalOlapScan[store_sales] +--------------------------------------------------PhysicalOlapScan[store_sales(ss1)] --------------------------------------PhysicalProject ----------------------------------------PhysicalAssertNumRows ------------------------------------------PhysicalDistribute[DistributionSpecGather] @@ -57,7 +57,7 @@ PhysicalResultSink --------------------------------------------hashAgg[LOCAL] ----------------------------------------------PhysicalProject ------------------------------------------------filter((ss1.ss_store_sk = 4)) ---------------------------------------------------PhysicalOlapScan[store_sales] +--------------------------------------------------PhysicalOlapScan[store_sales(ss1)] --------------------------------------PhysicalProject ----------------------------------------PhysicalAssertNumRows ------------------------------------------PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query46.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query46.out index 1b99c6d506b15e..e7deedf24452ee 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query46.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query46.out @@ -34,7 +34,7 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer_address] ------------PhysicalProject ---------------PhysicalOlapScan[customer_address] +--------------PhysicalOlapScan[customer_address(current_addr)] Hint log: Used: leading(store_sales store date_dim household_demographics customer_address ) leading(customer dn current_addr ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query49.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query49.out index dcf3a9418d3491..84bca335a1006b 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query49.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query49.out @@ -31,12 +31,12 @@ PhysicalResultSink --------------------------------------------------------hashJoin[INNER_JOIN colocated] 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] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) ---------------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2 +--------------------------------------------------------------PhysicalOlapScan[web_returns(wr)] apply RFs: RF1 RF2 ----------------------------------------------------------PhysicalProject ------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] --------------------------------------------------------------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 +------------------------------------------------------------------PhysicalOlapScan[web_sales(ws)] apply RFs: RF0 --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) ------------------------------------------------------------------PhysicalOlapScan[date_dim] @@ -63,12 +63,12 @@ PhysicalResultSink --------------------------------------------------------hashJoin[INNER_JOIN colocated] 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] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) ---------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5 +--------------------------------------------------------------PhysicalOlapScan[catalog_returns(cr)] apply RFs: RF4 RF5 ----------------------------------------------------------PhysicalProject ------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] --------------------------------------------------------------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 +------------------------------------------------------------------PhysicalOlapScan[catalog_sales(cs)] apply RFs: RF3 --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) ------------------------------------------------------------------PhysicalOlapScan[date_dim] @@ -95,12 +95,12 @@ PhysicalResultSink --------------------------------------------------------hashJoin[INNER_JOIN colocated] 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] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) ---------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8 +--------------------------------------------------------------PhysicalOlapScan[store_returns(sr)] apply RFs: RF7 RF8 ----------------------------------------------------------PhysicalProject ------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] --------------------------------------------------------------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 +------------------------------------------------------------------PhysicalOlapScan[store_sales(sts)] apply RFs: RF6 --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) ------------------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query50.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query50.out index 86f8e0f32c19d2..3af090a8b3adef 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query50.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query50.out @@ -21,9 +21,9 @@ PhysicalResultSink --------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 ------------------------------PhysicalProject --------------------------------filter((d2.d_moy = 8) and (d2.d_year = 2001)) -----------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[date_dim(d2)] ----------------------PhysicalProject -------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[date_dim(d1)] ------------------PhysicalProject --------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query59.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query59.out index 34b621ff7179bc..3f87d620090469 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query59.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query59.out @@ -28,7 +28,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 RF4 RF6 ----------------------PhysicalProject ------------------------filter((d.d_month_seq <= 1206) and (d.d_month_seq >= 1195)) ---------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalOlapScan[date_dim(d)] ------------------PhysicalProject --------------------PhysicalOlapScan[store] apply RFs: RF5 --------------PhysicalProject @@ -39,7 +39,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF1 RF2 ----------------------PhysicalProject ------------------------filter((d.d_month_seq <= 1218) and (d.d_month_seq >= 1207)) ---------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalOlapScan[date_dim(d)] ------------------PhysicalProject --------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query6.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query6.out index 94dfbee3c5e2b2..9eead41add48b7 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query6.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query6.out @@ -12,21 +12,21 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() build RFs:RF5 c_current_addr_sk->[ca_address_sk] ----------------------PhysicalProject -------------------------PhysicalOlapScan[customer_address] apply RFs: RF5 +------------------------PhysicalOlapScan[customer_address(a)] apply RFs: RF5 ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] apply RFs: RF4 +----------------------------PhysicalOlapScan[customer(c)] apply RFs: RF4 --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((s.ss_item_sk = i.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] 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 +------------------------------------PhysicalOlapScan[store_sales(s)] apply RFs: RF2 RF3 ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] 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 +----------------------------------------PhysicalOlapScan[date_dim(d)] apply RFs: RF1 --------------------------------------PhysicalAssertNumRows ----------------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------------hashAgg[GLOBAL] @@ -38,10 +38,10 @@ PhysicalResultSink ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((j.i_category = i.i_category)) otherCondition=((cast(i_current_price as DECIMALV3(38, 5)) > (1.2 * avg(j.i_current_price)))) build RFs:RF0 i_category->[i_category] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF0 +------------------------------------PhysicalOlapScan[item(i)] apply RFs: RF0 ----------------------------------hashAgg[GLOBAL] ------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------hashAgg[LOCAL] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[item] +------------------------------------------PhysicalOlapScan[item(j)] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query64.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query64.out index 6209e3919f733d..784e1659a15544 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query64.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query64.out @@ -42,35 +42,35 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) --------------------------------------------------------------------------PhysicalProject ----------------------------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 RF4 RF7 RF13 RF14 --------------------------------------------------------------------------PhysicalProject -----------------------------------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------------------------------PhysicalOlapScan[date_dim(d2)] ----------------------------------------------------------------------PhysicalProject -------------------------------------------------------------------------PhysicalOlapScan[customer_demographics] +------------------------------------------------------------------------PhysicalOlapScan[customer_demographics(cd2)] --------------------------------------------------------------PhysicalProject -----------------------------------------------------------------PhysicalOlapScan[customer_demographics] +----------------------------------------------------------------PhysicalOlapScan[customer_demographics(cd1)] ----------------------------------------------------------PhysicalProject -------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------------------------------PhysicalOlapScan[date_dim(d3)] ------------------------------------------------------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] apply RFs: RF10 RF19 ----------------------------------------------------PhysicalProject ------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((hd1.hd_income_band_sk = ib1.ib_income_band_sk)) otherCondition=() build RFs:RF2 ib_income_band_sk->[hd_income_band_sk] --------------------------------------------------------PhysicalProject -----------------------------------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF2 +----------------------------------------------------------PhysicalOlapScan[household_demographics(hd1)] apply RFs: RF2 --------------------------------------------------------PhysicalProject -----------------------------------------------------------PhysicalOlapScan[income_band] +----------------------------------------------------------PhysicalOlapScan[income_band(ib1)] ------------------------------------------------PhysicalProject --------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF19 --------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[customer_address] +----------------------------------------------PhysicalOlapScan[customer_address(ad1)] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF15 +------------------------------------------PhysicalOlapScan[household_demographics(hd2)] apply RFs: RF15 ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[customer_address] +--------------------------------------PhysicalOlapScan[customer_address(ad2)] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[income_band] +----------------------------------PhysicalOlapScan[income_band(ib2)] ----------------------------PhysicalProject ------------------------------filter(d_year IN (1999, 2000)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalOlapScan[date_dim(d1)] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store] --------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query68.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query68.out index c6e34441ff7600..0b747c4c037b93 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query68.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query68.out @@ -9,7 +9,7 @@ PhysicalResultSink ------------PhysicalProject --------------hashJoin[INNER_JOIN shuffle] 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 +------------------PhysicalOlapScan[customer_address(current_addr)] apply RFs: RF5 ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] --------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query70.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query70.out index 2ea5b9cfcfb91a..b22f9c69d7bbe2 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query70.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query70.out @@ -22,7 +22,7 @@ PhysicalResultSink --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 ------------------------------------PhysicalProject --------------------------------------filter((d1.d_month_seq <= 1231) and (d1.d_month_seq >= 1220)) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((store.s_state = tmp1.s_state)) otherCondition=() build RFs:RF2 s_state->[s_state] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store] apply RFs: RF2 diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query72.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query72.out index dea41e0210a786..33094a1fc4253e 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query72.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query72.out @@ -33,10 +33,10 @@ PhysicalResultSink --------------------------------------------------PhysicalProject ----------------------------------------------------NestedLoopJoin[INNER_JOIN](d3.d_date > days_add(d_date, INTERVAL 5 DAY)) ------------------------------------------------------PhysicalProject ---------------------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------------------------PhysicalOlapScan[date_dim(d3)] ------------------------------------------------------PhysicalProject --------------------------------------------------------filter((d1.d_year = 1998)) -----------------------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF7 +----------------------------------------------------------PhysicalOlapScan[date_dim(d1)] apply RFs: RF7 ----------------------------------------------PhysicalProject ------------------------------------------------filter((household_demographics.hd_buy_potential = '1001-5000')) --------------------------------------------------PhysicalOlapScan[household_demographics] @@ -48,7 +48,7 @@ PhysicalResultSink ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[item] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(d2)] ------------------PhysicalProject --------------------PhysicalOlapScan[warehouse] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query85.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query85.out index 2ff3123d285db8..75967c5f17ead8 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query85.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query85.out @@ -18,7 +18,7 @@ PhysicalResultSink --------------------------hashJoin[INNER_JOIN broadcast] 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 wr_returning_cdemo_sk->[cd_demo_sk];RF6 cd_marital_status->[cd_marital_status];RF7 cd_education_status->[cd_education_status] ----------------------------PhysicalProject ------------------------------filter(cd_education_status IN ('Advanced Degree', 'College', 'Primary') and cd_marital_status IN ('D', 'S', 'U')) ---------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF5 RF6 RF7 +--------------------------------PhysicalOlapScan[customer_demographics(cd2)] apply RFs: RF5 RF6 RF7 ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = web_returns.wr_refunded_addr_sk)) otherCondition=(OR[AND[ca_state IN ('IA', 'NC', 'TX'),(web_sales.ws_net_profit >= 100.00),(web_sales.ws_net_profit <= 200.00)],AND[ca_state IN ('GA', 'WI', 'WV'),(web_sales.ws_net_profit >= 150.00)],AND[ca_state IN ('KY', 'OK', 'VA'),(web_sales.ws_net_profit <= 250.00)]]) build RFs:RF4 wr_refunded_addr_sk->[ca_address_sk] --------------------------------PhysicalProject @@ -40,7 +40,7 @@ PhysicalResultSink ------------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalProject --------------------------------------filter(OR[AND[(cd1.cd_marital_status = 'D'),(cd1.cd_education_status = 'Primary')],AND[(cd1.cd_marital_status = 'S'),(cd1.cd_education_status = 'College')],AND[(cd1.cd_marital_status = 'U'),(cd1.cd_education_status = 'Advanced Degree')]] and cd_education_status IN ('Advanced Degree', 'College', 'Primary') and cd_marital_status IN ('D', 'S', 'U')) -----------------------------------------PhysicalOlapScan[customer_demographics] +----------------------------------------PhysicalOlapScan[customer_demographics(cd1)] ------------------------PhysicalProject --------------------------PhysicalOlapScan[reason] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query86.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query86.out index f91fbe25138194..e3d79993184a46 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query86.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query86.out @@ -22,7 +22,7 @@ PhysicalResultSink --------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 ------------------------------------PhysicalProject --------------------------------------filter((d1.d_month_seq <= 1197) and (d1.d_month_seq >= 1186)) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query94.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query94.out index bd89dd58effa9b..78bc76f63ea747 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query94.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query94.out @@ -11,10 +11,10 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] 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] --------------------PhysicalProject -----------------------PhysicalOlapScan[web_sales] apply RFs: RF4 +----------------------PhysicalOlapScan[web_sales(ws2)] apply RFs: RF4 --------------------hashJoin[RIGHT_ANTI_JOIN shuffle] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() build RFs:RF3 ws_order_number->[wr_order_number] ----------------------PhysicalProject -------------------------PhysicalOlapScan[web_returns] apply RFs: RF3 +------------------------PhysicalOlapScan[web_returns(wr1)] apply RFs: RF3 ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_sk] --------------------------PhysicalProject @@ -22,7 +22,7 @@ PhysicalResultSink ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 +------------------------------------PhysicalOlapScan[web_sales(ws1)] apply RFs: RF0 RF1 RF2 ----------------------------------PhysicalProject ------------------------------------filter((customer_address.ca_state = 'OK')) --------------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query95.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query95.out index 84bdd6cf3d8f4a..058b68aa677160 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query95.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query95.out @@ -5,9 +5,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN shuffle] 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] --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF0 RF7 +----------PhysicalOlapScan[web_sales(ws1)] apply RFs: RF0 RF7 --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF7 +----------PhysicalOlapScan[web_sales(ws2)] apply RFs: RF7 --PhysicalResultSink ----PhysicalLimit[GLOBAL] ------PhysicalLimit[LOCAL] @@ -31,7 +31,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 +------------------------------------PhysicalOlapScan[web_sales(ws1)] apply RFs: RF1 RF2 RF3 ----------------------------------PhysicalProject ------------------------------------filter((customer_address.ca_state = 'VA')) --------------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query10.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query10.out index 78fd7c847c29ed..d740d8a47904bc 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query10.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query10.out @@ -40,8 +40,8 @@ PhysicalResultSink ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] 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 +------------------------------------PhysicalOlapScan[customer(c)] apply RFs: RF0 ----------------------------------PhysicalProject ------------------------------------filter(ca_county IN ('Campbell County', 'Cleburne County', 'Escambia County', 'Fairfield County', 'Washtenaw County')) ---------------------------------------PhysicalOlapScan[customer_address] +--------------------------------------PhysicalOlapScan[customer_address(ca)] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query14.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query14.out index 3bfeac869ea191..36a45d7ee6e371 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query14.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query14.out @@ -18,9 +18,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------PhysicalProject --------------------------filter((d1.d_year <= 2001) and (d1.d_year >= 1999)) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(d1)] --------------------PhysicalProject -----------------------PhysicalOlapScan[item] +----------------------PhysicalOlapScan[item(iss)] ----------hashAgg[GLOBAL] ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] @@ -32,9 +32,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 ------------------------PhysicalProject --------------------------filter((d2.d_year <= 2001) and (d2.d_year >= 1999)) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(d2)] --------------------PhysicalProject -----------------------PhysicalOlapScan[item] RFV2: RF19 +----------------------PhysicalOlapScan[item(ics)] RFV2: RF19 ----------hashAgg[GLOBAL] ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] @@ -46,9 +46,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 ------------------------PhysicalProject --------------------------filter((d3.d_year <= 2001) and (d3.d_year >= 1999)) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(d3)] --------------------PhysicalProject -----------------------PhysicalOlapScan[item] RFV2: RF20 +----------------------PhysicalOlapScan[item(iws)] RFV2: RF20 --PhysicalCteAnchor ( cteId=CTEId#1 ) ----PhysicalCteProducer ( cteId=CTEId#1 ) ------hashAgg[GLOBAL] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query16.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query16.out index 21dcd5cf6df0ae..30da2ea81f8a2a 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query16.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query16.out @@ -11,10 +11,10 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] 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] --------------------PhysicalProject -----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 +----------------------PhysicalOlapScan[catalog_sales(cs2)] apply RFs: RF4 --------------------hashJoin[RIGHT_ANTI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() build RFs:RF3 cs_order_number->[cr_order_number] ----------------------PhysicalProject -------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF3 +------------------------PhysicalOlapScan[catalog_returns(cr1)] apply RFs: RF3 ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cc_call_center_sk->[cs_call_center_sk] --------------------------PhysicalProject @@ -22,7 +22,7 @@ PhysicalResultSink ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cs_ship_addr_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 +------------------------------------PhysicalOlapScan[catalog_sales(cs1)] apply RFs: RF0 RF1 RF2 ----------------------------------PhysicalProject ------------------------------------filter((customer_address.ca_state = 'PA')) --------------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query17.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query17.out index 12fa11701b619f..5c5b2c95f6af60 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query17.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query17.out @@ -16,7 +16,7 @@ PhysicalResultSink --------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 RF8 RF9 ------------------------PhysicalProject --------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(d3)] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[sr_item_sk,ss_item_sk] ------------------------PhysicalProject @@ -29,14 +29,14 @@ PhysicalResultSink --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 RF5 RF6 ------------------------------------PhysicalProject --------------------------------------filter((d1.d_quarter_name = '2001Q1')) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] 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 RF6 ------------------------------------PhysicalProject --------------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalOlapScan[date_dim(d2)] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[store] ------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query18.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query18.out index ea401d9c36dc08..0701882afd123e 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query18.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query18.out @@ -21,11 +21,11 @@ PhysicalResultSink ------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 RF4 RF5 ----------------------------------PhysicalProject ------------------------------------filter((cd1.cd_education_status = 'Primary') and (cd1.cd_gender = 'F')) ---------------------------------------PhysicalOlapScan[customer_demographics] +--------------------------------------PhysicalOlapScan[customer_demographics(cd1)] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() build RFs:RF1 c_current_cdemo_sk->[cd_demo_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF1 +------------------------------------PhysicalOlapScan[customer_demographics(cd2)] apply RFs: RF1 ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] --------------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query25.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query25.out index 8ccafdc60f8ba4..4d6eb90379d155 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query25.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query25.out @@ -15,7 +15,7 @@ PhysicalResultSink ------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 RF8 RF9 ----------------------PhysicalProject ------------------------filter((d3.d_moy <= 10) and (d3.d_moy >= 4) and (d3.d_year = 1999)) ---------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalOlapScan[date_dim(d3)] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[sr_item_sk,ss_item_sk] ----------------------PhysicalProject @@ -28,14 +28,14 @@ PhysicalResultSink ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 RF5 RF6 ----------------------------------PhysicalProject ------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1999)) ---------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------PhysicalOlapScan[date_dim(d1)] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] 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 RF6 ----------------------------------PhysicalProject ------------------------------------filter((d2.d_moy <= 10) and (d2.d_moy >= 4) and (d2.d_year = 1999)) ---------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------PhysicalOlapScan[date_dim(d2)] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store] ----------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query29.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query29.out index 649a6f83d9759a..b238e2d84e140a 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query29.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query29.out @@ -25,19 +25,19 @@ PhysicalResultSink ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 RF5 RF6 --------------------------------------PhysicalProject ----------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1998)) -------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------------PhysicalOlapScan[date_dim(d1)] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] 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 RF6 --------------------------------------PhysicalProject ----------------------------------------filter((d2.d_moy <= 7) and (d2.d_moy >= 4) and (d2.d_year = 1998)) -------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------------PhysicalOlapScan[date_dim(d2)] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[item] ------------------PhysicalProject --------------------filter(d_year IN (1998, 1999, 2000)) -----------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[date_dim(d3)] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query36.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query36.out index e31b175d47d2c5..f75ea80df28def 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query36.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query36.out @@ -27,7 +27,7 @@ PhysicalResultSink --------------------------------------------PhysicalOlapScan[store] ------------------------------------PhysicalProject --------------------------------------filter((d1.d_year = 2000)) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query41.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query41.out index 27385ebe5c25ba..92045bb79faf37 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query41.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query41.out @@ -11,7 +11,7 @@ PhysicalResultSink ----------------hashJoin[INNER_JOIN broadcast] 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 +----------------------PhysicalOlapScan[item(i1)] apply RFs: RF0 ------------------PhysicalProject --------------------filter((item_cnt > 0)) ----------------------hashAgg[GLOBAL] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query44.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query44.out index 5d21002157fd9a..b733c203a720df 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query44.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query44.out @@ -27,7 +27,7 @@ PhysicalResultSink --------------------------------------------hashAgg[LOCAL] ----------------------------------------------PhysicalProject ------------------------------------------------filter((ss1.ss_store_sk = 4)) ---------------------------------------------------PhysicalOlapScan[store_sales] +--------------------------------------------------PhysicalOlapScan[store_sales(ss1)] --------------------------------------PhysicalProject ----------------------------------------PhysicalAssertNumRows ------------------------------------------PhysicalDistribute[DistributionSpecGather] @@ -57,7 +57,7 @@ PhysicalResultSink --------------------------------------------hashAgg[LOCAL] ----------------------------------------------PhysicalProject ------------------------------------------------filter((ss1.ss_store_sk = 4)) ---------------------------------------------------PhysicalOlapScan[store_sales] +--------------------------------------------------PhysicalOlapScan[store_sales(ss1)] --------------------------------------PhysicalProject ----------------------------------------PhysicalAssertNumRows ------------------------------------------PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query46.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query46.out index 38585ee71d9963..b54a98e5dcb88b 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query46.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query46.out @@ -34,5 +34,5 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer_address] ------------PhysicalProject ---------------PhysicalOlapScan[customer_address] +--------------PhysicalOlapScan[customer_address(current_addr)] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query49.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query49.out index dcf3a9418d3491..84bca335a1006b 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query49.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query49.out @@ -31,12 +31,12 @@ PhysicalResultSink --------------------------------------------------------hashJoin[INNER_JOIN colocated] 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] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) ---------------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2 +--------------------------------------------------------------PhysicalOlapScan[web_returns(wr)] apply RFs: RF1 RF2 ----------------------------------------------------------PhysicalProject ------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] --------------------------------------------------------------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 +------------------------------------------------------------------PhysicalOlapScan[web_sales(ws)] apply RFs: RF0 --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) ------------------------------------------------------------------PhysicalOlapScan[date_dim] @@ -63,12 +63,12 @@ PhysicalResultSink --------------------------------------------------------hashJoin[INNER_JOIN colocated] 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] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) ---------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5 +--------------------------------------------------------------PhysicalOlapScan[catalog_returns(cr)] apply RFs: RF4 RF5 ----------------------------------------------------------PhysicalProject ------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] --------------------------------------------------------------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 +------------------------------------------------------------------PhysicalOlapScan[catalog_sales(cs)] apply RFs: RF3 --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) ------------------------------------------------------------------PhysicalOlapScan[date_dim] @@ -95,12 +95,12 @@ PhysicalResultSink --------------------------------------------------------hashJoin[INNER_JOIN colocated] 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] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) ---------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8 +--------------------------------------------------------------PhysicalOlapScan[store_returns(sr)] apply RFs: RF7 RF8 ----------------------------------------------------------PhysicalProject ------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] --------------------------------------------------------------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 +------------------------------------------------------------------PhysicalOlapScan[store_sales(sts)] apply RFs: RF6 --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) ------------------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query50.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query50.out index f5c3f38463d42c..18be632aaa5770 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query50.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query50.out @@ -21,9 +21,9 @@ PhysicalResultSink --------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 ------------------------------PhysicalProject --------------------------------filter((d2.d_moy = 8) and (d2.d_year = 2001)) -----------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[date_dim(d2)] ----------------------PhysicalProject -------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[date_dim(d1)] ------------------PhysicalProject --------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query59.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query59.out index 107a8eeca01f92..050957da0f0a7a 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query59.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query59.out @@ -30,7 +30,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------PhysicalOlapScan[store] apply RFs: RF5 ------------------PhysicalProject --------------------filter((d.d_month_seq <= 1206) and (d.d_month_seq >= 1195)) -----------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[date_dim(d)] --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_week_seq = d_week_seq2)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq] ------------------PhysicalProject @@ -41,5 +41,5 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------PhysicalOlapScan[store] ------------------PhysicalProject --------------------filter((d.d_month_seq <= 1218) and (d.d_month_seq >= 1207)) -----------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[date_dim(d)] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query6.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query6.out index 94dfbee3c5e2b2..9eead41add48b7 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query6.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query6.out @@ -12,21 +12,21 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() build RFs:RF5 c_current_addr_sk->[ca_address_sk] ----------------------PhysicalProject -------------------------PhysicalOlapScan[customer_address] apply RFs: RF5 +------------------------PhysicalOlapScan[customer_address(a)] apply RFs: RF5 ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] apply RFs: RF4 +----------------------------PhysicalOlapScan[customer(c)] apply RFs: RF4 --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((s.ss_item_sk = i.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] 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 +------------------------------------PhysicalOlapScan[store_sales(s)] apply RFs: RF2 RF3 ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] 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 +----------------------------------------PhysicalOlapScan[date_dim(d)] apply RFs: RF1 --------------------------------------PhysicalAssertNumRows ----------------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------------hashAgg[GLOBAL] @@ -38,10 +38,10 @@ PhysicalResultSink ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((j.i_category = i.i_category)) otherCondition=((cast(i_current_price as DECIMALV3(38, 5)) > (1.2 * avg(j.i_current_price)))) build RFs:RF0 i_category->[i_category] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF0 +------------------------------------PhysicalOlapScan[item(i)] apply RFs: RF0 ----------------------------------hashAgg[GLOBAL] ------------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------------hashAgg[LOCAL] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[item] +------------------------------------------PhysicalOlapScan[item(j)] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query64.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query64.out index 41bac290d08204..83080f1d504097 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query64.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query64.out @@ -23,15 +23,15 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN broadcast] 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 +------------------------------------------PhysicalOlapScan[household_demographics(hd2)] apply RFs: RF13 ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[income_band] +------------------------------------------PhysicalOlapScan[income_band(ib2)] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[date_dim(d2)] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer_demographics] +------------------------------PhysicalOlapScan[customer_demographics(cd2)] ------------------------PhysicalProject ---------------------------PhysicalOlapScan[customer_address] +--------------------------PhysicalOlapScan[customer_address(ad2)] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_addr_sk = ad1.ca_address_sk)) otherCondition=() build RFs:RF12 ca_address_sk->[ss_addr_sk] ------------------------PhysicalProject @@ -57,7 +57,7 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) ------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 RF4 RF6 RF7 RF8 RF9 RF12 ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter(d_year IN (1999, 2000)) ---------------------------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------------------------------PhysicalOlapScan[date_dim(d1)] ------------------------------------------------------PhysicalProject --------------------------------------------------------filter((sale > (2 * refund))) ----------------------------------------------------------hashAgg[GLOBAL] @@ -70,22 +70,22 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) --------------------------------------------------------------------PhysicalProject ----------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF7 --------------------------------------------------PhysicalProject -----------------------------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF5 +----------------------------------------------------PhysicalOlapScan[household_demographics(hd1)] apply RFs: RF5 ----------------------------------------------PhysicalProject -------------------------------------------------PhysicalOlapScan[income_band] +------------------------------------------------PhysicalOlapScan[income_band(ib1)] ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[store] --------------------------------------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] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[customer_demographics] +--------------------------------------PhysicalOlapScan[customer_demographics(cd1)] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[promotion] ------------------------PhysicalProject ---------------------------PhysicalOlapScan[customer_address] +--------------------------PhysicalOlapScan[customer_address(ad1)] ----------------PhysicalProject -------------------PhysicalOlapScan[date_dim] +------------------PhysicalOlapScan[date_dim(d3)] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query68.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query68.out index 158dde8b936afe..e25d34e80cdd66 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query68.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query68.out @@ -9,7 +9,7 @@ PhysicalResultSink ------------PhysicalProject --------------hashJoin[INNER_JOIN shuffle] 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 +------------------PhysicalOlapScan[customer_address(current_addr)] apply RFs: RF5 ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] --------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query70.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query70.out index 6c6d143bbd6828..35c904cca6e11a 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query70.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query70.out @@ -22,7 +22,7 @@ PhysicalResultSink --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 ------------------------------------PhysicalProject --------------------------------------filter((d1.d_month_seq <= 1231) and (d1.d_month_seq >= 1220)) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((store.s_state = tmp1.s_state)) otherCondition=() build RFs:RF2 s_state->[s_state] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store] apply RFs: RF2 diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query85.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query85.out index 02eea508279b3b..05a73d3e721ff9 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query85.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query85.out @@ -14,7 +14,7 @@ PhysicalResultSink ----------------------hashJoin[INNER_JOIN broadcast] 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:RF6 wr_returning_cdemo_sk->[cd_demo_sk];RF7 cd_marital_status->[cd_marital_status];RF8 cd_education_status->[cd_education_status] ------------------------PhysicalProject --------------------------filter(cd_education_status IN ('Advanced Degree', 'College', 'Primary') and cd_marital_status IN ('D', 'S', 'U')) -----------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF6 RF7 RF8 +----------------------------PhysicalOlapScan[customer_demographics(cd2)] apply RFs: RF6 RF7 RF8 ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF5 wp_web_page_sk->[ws_web_page_sk] ----------------------------PhysicalProject @@ -38,7 +38,7 @@ PhysicalResultSink ------------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalProject --------------------------------------filter(OR[AND[(cd1.cd_marital_status = 'D'),(cd1.cd_education_status = 'Primary')],AND[(cd1.cd_marital_status = 'S'),(cd1.cd_education_status = 'College')],AND[(cd1.cd_marital_status = 'U'),(cd1.cd_education_status = 'Advanced Degree')]] and cd_education_status IN ('Advanced Degree', 'College', 'Primary') and cd_marital_status IN ('D', 'S', 'U')) -----------------------------------------PhysicalOlapScan[customer_demographics] +----------------------------------------PhysicalOlapScan[customer_demographics(cd1)] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[web_page] --------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query86.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query86.out index 24ed7d94f66e63..1633f90b97fbc0 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query86.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query86.out @@ -22,7 +22,7 @@ PhysicalResultSink --------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 ------------------------------------PhysicalProject --------------------------------------filter((d1.d_month_seq <= 1197) and (d1.d_month_seq >= 1186)) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query94.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query94.out index bd89dd58effa9b..78bc76f63ea747 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query94.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query94.out @@ -11,10 +11,10 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] 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] --------------------PhysicalProject -----------------------PhysicalOlapScan[web_sales] apply RFs: RF4 +----------------------PhysicalOlapScan[web_sales(ws2)] apply RFs: RF4 --------------------hashJoin[RIGHT_ANTI_JOIN shuffle] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() build RFs:RF3 ws_order_number->[wr_order_number] ----------------------PhysicalProject -------------------------PhysicalOlapScan[web_returns] apply RFs: RF3 +------------------------PhysicalOlapScan[web_returns(wr1)] apply RFs: RF3 ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_sk] --------------------------PhysicalProject @@ -22,7 +22,7 @@ PhysicalResultSink ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 +------------------------------------PhysicalOlapScan[web_sales(ws1)] apply RFs: RF0 RF1 RF2 ----------------------------------PhysicalProject ------------------------------------filter((customer_address.ca_state = 'OK')) --------------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query95.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query95.out index 84bdd6cf3d8f4a..058b68aa677160 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query95.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query95.out @@ -5,9 +5,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN shuffle] 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] --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF0 RF7 +----------PhysicalOlapScan[web_sales(ws1)] apply RFs: RF0 RF7 --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF7 +----------PhysicalOlapScan[web_sales(ws2)] apply RFs: RF7 --PhysicalResultSink ----PhysicalLimit[GLOBAL] ------PhysicalLimit[LOCAL] @@ -31,7 +31,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 +------------------------------------PhysicalOlapScan[web_sales(ws1)] apply RFs: RF1 RF2 RF3 ----------------------------------PhysicalProject ------------------------------------filter((customer_address.ca_state = 'VA')) --------------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query10.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query10.out index 43aef07e0be2c0..2eef790fde578a 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query10.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query10.out @@ -25,10 +25,10 @@ PhysicalResultSink ----------------------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2000)) ------------------------------------------PhysicalOlapScan[date_dim] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5 +------------------------------------PhysicalOlapScan[customer(c)] apply RFs: RF4 RF5 --------------------------------PhysicalProject ----------------------------------filter(ca_county IN ('Bonneville County', 'Boone County', 'Brown County', 'Fillmore County', 'McPherson County')) -------------------------------------PhysicalOlapScan[customer_address] +------------------------------------PhysicalOlapScan[customer_address(ca)] ----------------------------PhysicalOlapScan[customer_demographics] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query16.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query16.out index ff30193149f0de..e57e8f46d50457 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query16.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query16.out @@ -18,11 +18,11 @@ PhysicalResultSink ------------------------------PhysicalProject --------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF0 cs_order_number->[cs_order_number] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +------------------------------------PhysicalOlapScan[catalog_sales(cs2)] apply RFs: RF0 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF2 RF3 +------------------------------------PhysicalOlapScan[catalog_sales(cs1)] apply RFs: RF1 RF2 RF3 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_returns] +--------------------------------PhysicalOlapScan[catalog_returns(cr1)] ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '1999-05-31') and (date_dim.d_date >= '1999-04-01')) --------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query17.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query17.out index e0b281146ad099..c8ea8ec54ae1d4 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query17.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query17.out @@ -32,13 +32,13 @@ PhysicalResultSink --------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject ----------------------------------filter((d1.d_quarter_name = '2000Q1')) -------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalOlapScan[date_dim(d1)] ----------------------------PhysicalProject ------------------------------filter(d_quarter_name IN ('2000Q1', '2000Q2', '2000Q3')) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalOlapScan[date_dim(d2)] ------------------------PhysicalProject --------------------------filter(d_quarter_name IN ('2000Q1', '2000Q2', '2000Q3')) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(d3)] --------------------PhysicalProject ----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query18.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query18.out index a3b95e5515ecde..ad0efe25e4f305 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query18.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query18.out @@ -27,10 +27,10 @@ PhysicalResultSink --------------------------------------------filter(c_birth_month IN (1, 4, 5, 7, 8, 9)) ----------------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 RF3 --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[customer_demographics] +----------------------------------------PhysicalOlapScan[customer_demographics(cd2)] ----------------------------------PhysicalProject ------------------------------------filter((cd1.cd_education_status = 'Unknown') and (cd1.cd_gender = 'M')) ---------------------------------------PhysicalOlapScan[customer_demographics] +--------------------------------------PhysicalOlapScan[customer_demographics(cd1)] ------------------------------PhysicalProject --------------------------------filter(ca_state IN ('AL', 'AR', 'GA', 'MS', 'NC', 'TX', 'WV')) ----------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query25.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query25.out index 768ad92e931b56..df7cdc965a686c 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query25.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query25.out @@ -31,13 +31,13 @@ PhysicalResultSink ------------------------------------PhysicalOlapScan[item] ------------------------------PhysicalProject --------------------------------filter((d1.d_moy = 4) and (d1.d_year = 2000)) -----------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------PhysicalProject ----------------------------filter((d2.d_moy <= 10) and (d2.d_moy >= 4) and (d2.d_year = 2000)) -------------------------------PhysicalOlapScan[date_dim] +------------------------------PhysicalOlapScan[date_dim(d2)] ----------------------PhysicalProject ------------------------filter((d3.d_moy <= 10) and (d3.d_moy >= 4) and (d3.d_year = 2000)) ---------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalOlapScan[date_dim(d3)] ------------------PhysicalProject --------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query29.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query29.out index 706d570662c86b..a0159a5ab470d5 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query29.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query29.out @@ -31,13 +31,13 @@ PhysicalResultSink ------------------------------------PhysicalOlapScan[item] ------------------------------PhysicalProject --------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1998)) -----------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------PhysicalProject ----------------------------filter((d2.d_moy <= 7) and (d2.d_moy >= 4) and (d2.d_year = 1998)) -------------------------------PhysicalOlapScan[date_dim] +------------------------------PhysicalOlapScan[date_dim(d2)] ----------------------PhysicalProject ------------------------filter(d_year IN (1998, 1999, 2000)) ---------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalOlapScan[date_dim(d3)] ------------------PhysicalProject --------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query3.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query3.out index 8beaf9b74953fb..59108cbbf44ac0 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query3.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query3.out @@ -16,7 +16,7 @@ PhysicalResultSink --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------PhysicalProject --------------------------filter((dt.d_moy = 11)) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(dt)] --------------------PhysicalProject ----------------------filter((item.i_manufact_id = 816)) ------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query35.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query35.out index beedc2a19350ab..c7d2518b193eea 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query35.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query35.out @@ -25,9 +25,9 @@ PhysicalResultSink ----------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ------------------------------------------PhysicalOlapScan[date_dim] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5 +------------------------------------PhysicalOlapScan[customer(c)] apply RFs: RF4 RF5 --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer_address] +----------------------------------PhysicalOlapScan[customer_address(ca)] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer_demographics] ------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query36.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query36.out index e2879bb57387ed..26dbca99c3da7f 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query36.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query36.out @@ -26,7 +26,7 @@ PhysicalResultSink ------------------------------------------PhysicalOlapScan[item] ------------------------------------PhysicalProject --------------------------------------filter((d1.d_year = 1999)) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------------PhysicalProject ----------------------------------filter(s_state IN ('AL', 'FL', 'IN', 'LA', 'MI', 'MN', 'NM', 'TN')) ------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query41.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query41.out index 7eb9a78cac7c56..4477e3ec813db5 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query41.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query41.out @@ -11,7 +11,7 @@ PhysicalResultSink ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_manufact = i1.i_manufact)) otherCondition=() build RFs:RF0 i_manufact->[i_manufact] ------------------PhysicalProject --------------------filter((i1.i_manufact_id <= 1010) and (i1.i_manufact_id >= 970)) -----------------------PhysicalOlapScan[item] apply RFs: RF0 +----------------------PhysicalOlapScan[item(i1)] apply RFs: RF0 ------------------PhysicalProject --------------------filter((item_cnt > 0)) ----------------------hashAgg[GLOBAL] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query42.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query42.out index 939f69be9170f5..de64df627629ef 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query42.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query42.out @@ -16,7 +16,7 @@ PhysicalResultSink --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------PhysicalProject --------------------------filter((dt.d_moy = 12) and (dt.d_year = 1998)) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(dt)] --------------------PhysicalProject ----------------------filter((item.i_manager_id = 1)) ------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query44.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query44.out index 450cb5f62c2a17..b1dbbfdff3cd09 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query44.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query44.out @@ -29,7 +29,7 @@ PhysicalResultSink ------------------------------------------------hashAgg[LOCAL] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((ss1.ss_store_sk = 366)) -------------------------------------------------------PhysicalOlapScan[store_sales] +------------------------------------------------------PhysicalOlapScan[store_sales(ss1)] ------------------------------------------PhysicalProject --------------------------------------------PhysicalAssertNumRows ----------------------------------------------PhysicalDistribute[DistributionSpecGather] @@ -55,7 +55,7 @@ PhysicalResultSink ------------------------------------------------hashAgg[LOCAL] --------------------------------------------------PhysicalProject ----------------------------------------------------filter((ss1.ss_store_sk = 366)) -------------------------------------------------------PhysicalOlapScan[store_sales] +------------------------------------------------------PhysicalOlapScan[store_sales(ss1)] ------------------------------------------PhysicalProject --------------------------------------------PhysicalAssertNumRows ----------------------------------------------PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query46.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query46.out index 3675020a5eb76c..1e855c8878af72 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query46.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query46.out @@ -34,5 +34,5 @@ PhysicalResultSink ----------------PhysicalProject ------------------PhysicalOlapScan[customer] apply RFs: RF5 ------------PhysicalProject ---------------PhysicalOlapScan[customer_address] +--------------PhysicalOlapScan[customer_address(current_addr)] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query49.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query49.out index a5885662602076..25b266645994e6 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query49.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query49.out @@ -33,10 +33,10 @@ PhysicalResultSink ------------------------------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF0 wr_order_number->[ws_order_number];RF1 wr_item_sk->[ws_item_sk] --------------------------------------------------------------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 RF1 RF2 +------------------------------------------------------------------PhysicalOlapScan[web_sales(ws)] apply RFs: RF0 RF1 RF2 --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) -------------------------------------------------------------------PhysicalOlapScan[web_returns] +------------------------------------------------------------------PhysicalOlapScan[web_returns(wr)] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) --------------------------------------------------------------PhysicalOlapScan[date_dim] @@ -65,10 +65,10 @@ PhysicalResultSink ------------------------------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF3 cr_order_number->[cs_order_number];RF4 cr_item_sk->[cs_item_sk] --------------------------------------------------------------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 RF4 RF5 +------------------------------------------------------------------PhysicalOlapScan[catalog_sales(cs)] apply RFs: RF3 RF4 RF5 --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) -------------------------------------------------------------------PhysicalOlapScan[catalog_returns] +------------------------------------------------------------------PhysicalOlapScan[catalog_returns(cr)] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) --------------------------------------------------------------PhysicalOlapScan[date_dim] @@ -97,10 +97,10 @@ PhysicalResultSink ------------------------------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF6 sr_ticket_number->[ss_ticket_number];RF7 sr_item_sk->[ss_item_sk] --------------------------------------------------------------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 RF7 RF8 +------------------------------------------------------------------PhysicalOlapScan[store_sales(sts)] apply RFs: RF6 RF7 RF8 --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) -------------------------------------------------------------------PhysicalOlapScan[store_returns] +------------------------------------------------------------------PhysicalOlapScan[store_returns(sr)] ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) --------------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query50.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query50.out index d2eda4d35debce..dc68d862505583 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query50.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query50.out @@ -22,8 +22,8 @@ PhysicalResultSink --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store] ----------------------PhysicalProject -------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[date_dim(d1)] ------------------PhysicalProject --------------------filter((d2.d_moy = 9) and (d2.d_year = 1998)) -----------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[date_dim(d2)] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query52.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query52.out index c4ca0099a7bf6c..006670115d845f 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query52.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query52.out @@ -16,7 +16,7 @@ PhysicalResultSink --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------PhysicalProject --------------------------filter((dt.d_moy = 12) and (dt.d_year = 2000)) -----------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[date_dim(dt)] --------------------PhysicalProject ----------------------filter((item.i_manager_id = 1)) ------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query59.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query59.out index 389edb688c12ef..50ffee494fac11 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query59.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query59.out @@ -35,8 +35,8 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------------PhysicalOlapScan[store] ----------------------PhysicalProject ------------------------filter((d.d_month_seq <= 1228) and (d.d_month_seq >= 1217)) ---------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalOlapScan[date_dim(d)] --------------PhysicalProject ----------------filter((d.d_month_seq <= 1216) and (d.d_month_seq >= 1205)) -------------------PhysicalOlapScan[date_dim] +------------------PhysicalOlapScan[date_dim(d)] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query6.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query6.out index 8ac3c94831968d..219e635c7e5703 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query6.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query6.out @@ -20,17 +20,17 @@ PhysicalResultSink ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 +----------------------------------------PhysicalOlapScan[store_sales(s)] apply RFs: RF1 RF2 RF3 --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 +--------------------------------------------PhysicalOlapScan[customer(c)] apply RFs: RF0 ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[customer_address] +--------------------------------------------PhysicalOlapScan[customer_address(a)] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 +------------------------------------PhysicalOlapScan[date_dim(d)] apply RFs: RF4 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[item] apply RFs: RF5 +--------------------------------PhysicalOlapScan[item(i)] apply RFs: RF5 --------------------------PhysicalAssertNumRows ----------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------hashAgg[GLOBAL] @@ -43,5 +43,5 @@ PhysicalResultSink ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[item] +------------------------------PhysicalOlapScan[item(j)] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query64.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query64.out index 8399143cb6a33e..cb7a1487613b9e 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query64.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query64.out @@ -57,33 +57,33 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) --------------------------------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF19 ------------------------------------------------------------------------PhysicalProject --------------------------------------------------------------------------filter(d_year IN (1999, 2000)) -----------------------------------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------------------------------------------------PhysicalProject ----------------------------------------------------------------------PhysicalOlapScan[store] ----------------------------------------------------------------PhysicalProject ------------------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF8 RF9 RF11 RF14 RF16 ------------------------------------------------------------PhysicalProject ---------------------------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------------------------------PhysicalOlapScan[date_dim(d2)] --------------------------------------------------------PhysicalProject -----------------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------------PhysicalOlapScan[date_dim(d3)] ----------------------------------------------------PhysicalProject -------------------------------------------------------PhysicalOlapScan[customer_demographics] +------------------------------------------------------PhysicalOlapScan[customer_demographics(cd1)] ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[customer_demographics] +--------------------------------------------------PhysicalOlapScan[customer_demographics(cd2)] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[promotion] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[customer_address] +------------------------------------------PhysicalOlapScan[customer_address(ad1)] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[customer_address] +--------------------------------------PhysicalOlapScan[customer_address(ad2)] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF17 +----------------------------------PhysicalOlapScan[household_demographics(hd1)] apply RFs: RF17 ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF18 +------------------------------PhysicalOlapScan[household_demographics(hd2)] apply RFs: RF18 ------------------------PhysicalProject ---------------------------PhysicalOlapScan[income_band] +--------------------------PhysicalOlapScan[income_band(ib1)] --------------------PhysicalProject -----------------------PhysicalOlapScan[income_band] +----------------------PhysicalOlapScan[income_band(ib2)] ----------------PhysicalProject ------------------filter((item.i_current_price <= 90.00) and (item.i_current_price >= 81.00) and i_color IN ('azure', 'blush', 'gainsboro', 'hot', 'lemon', 'misty')) --------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query68.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query68.out index 630126cf643027..d5ae8b8f16a681 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query68.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query68.out @@ -36,5 +36,5 @@ PhysicalResultSink --------------------PhysicalProject ----------------------PhysicalLazyMaterializeOlapScan[customer lazySlots:(customer.c_first_name)] apply RFs: RF5 ----------------PhysicalProject -------------------PhysicalOlapScan[customer_address] +------------------PhysicalOlapScan[customer_address(current_addr)] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query69.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query69.out index 115564d2edf45e..6b498b21a4fe99 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query69.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query69.out @@ -24,7 +24,7 @@ PhysicalResultSink --------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 2) and (date_dim.d_year = 2003)) ----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5 +----------------------------------PhysicalOlapScan[customer(c)] apply RFs: RF4 RF5 ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ----------------------------------PhysicalProject @@ -34,7 +34,7 @@ PhysicalResultSink --------------------------------------PhysicalOlapScan[date_dim] ----------------------------PhysicalProject ------------------------------filter(ca_state IN ('AZ', 'MN', 'MO')) ---------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalOlapScan[customer_address(ca)] ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer_demographics] --------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query70.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query70.out index 3038640513b88d..caa10792487bfa 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query70.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query70.out @@ -22,7 +22,7 @@ PhysicalResultSink --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 ------------------------------------PhysicalProject --------------------------------------filter((d1.d_month_seq <= 1229) and (d1.d_month_seq >= 1218)) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalOlapScan[date_dim(d1)] --------------------------------hashJoin[RIGHT_SEMI_JOIN bucketShuffle] hashCondition=((store.s_state = tmp1.s_state)) otherCondition=() build RFs:RF2 s_state->[s_state] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query85.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query85.out index 4496c97b3fd7a8..ba9883df9d24ed 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query85.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query85.out @@ -31,10 +31,10 @@ PhysicalResultSink ------------------------------------------PhysicalOlapScan[web_page] ------------------------------------PhysicalProject --------------------------------------filter(OR[AND[(cd1.cd_marital_status = 'M'),(cd1.cd_education_status = '4 yr Degree')],AND[(cd1.cd_marital_status = 'S'),(cd1.cd_education_status = 'College')],AND[(cd1.cd_marital_status = 'D'),(cd1.cd_education_status = 'Secondary')]] and cd_education_status IN ('4 yr Degree', 'College', 'Secondary') and cd_marital_status IN ('D', 'M', 'S')) -----------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF5 RF6 +----------------------------------------PhysicalOlapScan[customer_demographics(cd1)] apply RFs: RF5 RF6 --------------------------------PhysicalProject ----------------------------------filter(cd_education_status IN ('4 yr Degree', 'College', 'Secondary') and cd_marital_status IN ('D', 'M', 'S')) -------------------------------------PhysicalOlapScan[customer_demographics] +------------------------------------PhysicalOlapScan[customer_demographics(cd2)] ----------------------------PhysicalProject ------------------------------filter((customer_address.ca_country = 'United States') and ca_state IN ('AR', 'CA', 'IA', 'MO', 'MS', 'NE', 'TX', 'VA', 'WA')) --------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query86.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query86.out index 5173961b93d094..792d4feff5d4ad 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query86.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query86.out @@ -24,5 +24,5 @@ PhysicalResultSink --------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject ----------------------------------filter((d1.d_month_seq <= 1226) and (d1.d_month_seq >= 1215)) -------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalOlapScan[date_dim(d1)] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query94.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query94.out index 2f12dce9e26230..63c035440dd95b 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query94.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query94.out @@ -18,7 +18,7 @@ PhysicalResultSink ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] 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 RF2 RF3 +------------------------------------PhysicalOlapScan[web_sales(ws1)] apply RFs: RF0 RF1 RF2 RF3 ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_date <= '1999-05-31') and (date_dim.d_date >= '1999-04-01')) --------------------------------------PhysicalOlapScan[date_dim] @@ -29,7 +29,7 @@ PhysicalResultSink ----------------------------filter((web_site.web_company_name = 'pri')) ------------------------------PhysicalOlapScan[web_site] ----------------------PhysicalProject -------------------------PhysicalOlapScan[web_sales] +------------------------PhysicalOlapScan[web_sales(ws2)] ------------------PhysicalProject ---------------------PhysicalOlapScan[web_returns] +--------------------PhysicalOlapScan[web_returns(wr1)] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query95.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query95.out index 140ec5cb678d55..d81d319d21abb9 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query95.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query95.out @@ -5,9 +5,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalProject ------hashJoin[INNER_JOIN shuffle] 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] --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF0 RF7 +----------PhysicalOlapScan[web_sales(ws1)] apply RFs: RF0 RF7 --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF7 +----------PhysicalOlapScan[web_sales(ws2)] apply RFs: RF7 --PhysicalResultSink ----PhysicalLimit[GLOBAL] ------PhysicalLimit[LOCAL] @@ -25,7 +25,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_ship_date_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 RF4 RF5 RF6 +------------------------------------PhysicalOlapScan[web_sales(ws1)] apply RFs: RF2 RF3 RF4 RF5 RF6 ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) --------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpch_sf1000/hint/q7.out b/regression-test/data/shape_check/tpch_sf1000/hint/q7.out index 6e932cbc45682c..d546dd1883fde1 100644 --- a/regression-test/data/shape_check/tpch_sf1000/hint/q7.out +++ b/regression-test/data/shape_check/tpch_sf1000/hint/q7.out @@ -20,7 +20,7 @@ PhysicalResultSink ----------------------------PhysicalOlapScan[supplier] --------------------------PhysicalProject ----------------------------filter(n_name IN ('FRANCE', 'GERMANY')) -------------------------------PhysicalOlapScan[nation] +------------------------------PhysicalOlapScan[nation(n1)] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() ----------------------PhysicalProject @@ -31,7 +31,7 @@ PhysicalResultSink ----------------------------PhysicalOlapScan[customer] --------------------------PhysicalProject ----------------------------filter(n_name IN ('FRANCE', 'GERMANY')) -------------------------------PhysicalOlapScan[nation] +------------------------------PhysicalOlapScan[nation(n2)] Hint log: Used: leading(lineitem broadcast { supplier broadcast n1 } { orders shuffle { customer broadcast n2 } } ) diff --git a/regression-test/data/shape_check/tpch_sf1000/hint/q8.out b/regression-test/data/shape_check/tpch_sf1000/hint/q8.out index 31f98f976f45a2..50a6d5f89347f6 100644 --- a/regression-test/data/shape_check/tpch_sf1000/hint/q8.out +++ b/regression-test/data/shape_check/tpch_sf1000/hint/q8.out @@ -35,12 +35,12 @@ PhysicalResultSink --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((n1.n_regionkey = region.r_regionkey)) otherCondition=() ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[nation] +--------------------------------------PhysicalOlapScan[nation(n1)] ------------------------------------PhysicalProject --------------------------------------filter((region.r_name = 'AMERICA')) ----------------------------------------PhysicalOlapScan[region] --------------------PhysicalProject -----------------------PhysicalOlapScan[nation] +----------------------PhysicalOlapScan[nation(n2)] Hint log: Used: leading(supplier { orders { lineitem broadcast part } { customer broadcast { n1 broadcast region } } } broadcast n2 ) diff --git a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q21.out b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q21.out index c54a6b502f590d..1c7ee4d0192a6b 100644 --- a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q21.out +++ b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q21.out @@ -15,14 +15,14 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = l1.l_suppkey)) otherCondition=() build RFs:RF2 s_suppkey->[l_suppkey] --------------------------hashJoin[RIGHT_SEMI_JOIN colocated] hashCondition=((l2.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF1 l_orderkey->[l_orderkey] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 RF3 +------------------------------PhysicalOlapScan[lineitem(l2)] apply RFs: RF1 RF3 ----------------------------hashJoin[RIGHT_ANTI_JOIN colocated] hashCondition=((l3.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF0 l_orderkey->[l_orderkey] ------------------------------PhysicalProject --------------------------------filter((l3.l_receiptdate > l3.l_commitdate)) -----------------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 +----------------------------------PhysicalOlapScan[lineitem(l3)] apply RFs: RF0 ------------------------------PhysicalProject --------------------------------filter((l1.l_receiptdate > l1.l_commitdate)) -----------------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 RF3 +----------------------------------PhysicalOlapScan[lineitem(l1)] apply RFs: RF2 RF3 --------------------------PhysicalProject ----------------------------PhysicalOlapScan[supplier] apply RFs: RF4 ----------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q7.out b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q7.out index e953eb4cbcee33..549647cdfb5cb7 100644 --- a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q7.out +++ b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q7.out @@ -27,8 +27,8 @@ PhysicalResultSink ------------------NestedLoopJoin[INNER_JOIN]OR[AND[(n1.n_name = 'FRANCE'),(n2.n_name = 'GERMANY')],AND[(n1.n_name = 'GERMANY'),(n2.n_name = 'FRANCE')]] --------------------PhysicalProject ----------------------filter(n_name IN ('FRANCE', 'GERMANY')) -------------------------PhysicalOlapScan[nation] +------------------------PhysicalOlapScan[nation(n1)] --------------------PhysicalProject ----------------------filter(n_name IN ('FRANCE', 'GERMANY')) -------------------------PhysicalOlapScan[nation] +------------------------PhysicalOlapScan[nation(n2)] diff --git a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q8.out b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q8.out index eedc274096c789..b1b35c88941163 100644 --- a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q8.out +++ b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q8.out @@ -35,9 +35,9 @@ PhysicalResultSink --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer] apply RFs: RF4 ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[nation] apply RFs: RF6 +------------------------------PhysicalOlapScan[nation(n1)] apply RFs: RF6 ------------------------PhysicalProject ---------------------------PhysicalOlapScan[nation] +--------------------------PhysicalOlapScan[nation(n2)] --------------------PhysicalProject ----------------------filter((region.r_name = 'AMERICA')) ------------------------PhysicalOlapScan[region] diff --git a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q21.out b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q21.out index 0436a7b245b174..5a3a807e5beb63 100644 --- a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q21.out +++ b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q21.out @@ -10,11 +10,11 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[RIGHT_SEMI_JOIN colocated] hashCondition=((l2.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF4 l_orderkey->[l_orderkey] ------------------PhysicalProject ---------------------PhysicalOlapScan[lineitem] apply RFs: RF4 +--------------------PhysicalOlapScan[lineitem(l2)] apply RFs: RF4 ------------------hashJoin[RIGHT_ANTI_JOIN colocated] hashCondition=((l3.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF3 l_orderkey->[l_orderkey] --------------------PhysicalProject ----------------------filter((l3.l_receiptdate > l3.l_commitdate)) -------------------------PhysicalOlapScan[lineitem] apply RFs: RF3 +------------------------PhysicalOlapScan[lineitem(l3)] apply RFs: RF3 --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN colocated] hashCondition=((orders.o_orderkey = l1.l_orderkey)) otherCondition=() build RFs:RF2 l_orderkey->[o_orderkey] ------------------------PhysicalProject @@ -24,7 +24,7 @@ PhysicalResultSink --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = l1.l_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[l_suppkey] ----------------------------PhysicalProject ------------------------------filter((l1.l_receiptdate > l1.l_commitdate)) ---------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 +--------------------------------PhysicalOlapScan[lineitem(l1)] apply RFs: RF1 ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[s_nationkey] --------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q7.out b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q7.out index 957b17a7402749..6905aedddb1cf7 100644 --- a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q7.out +++ b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q7.out @@ -24,12 +24,12 @@ PhysicalResultSink --------------------------------PhysicalOlapScan[supplier] apply RFs: RF1 ------------------------------PhysicalProject --------------------------------filter(n_name IN ('FRANCE', 'GERMANY')) -----------------------------------PhysicalOlapScan[nation] +----------------------------------PhysicalOlapScan[nation(n1)] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_nationkey = n2.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[c_nationkey] ----------------------PhysicalProject ------------------------PhysicalOlapScan[customer] apply RFs: RF0 ----------------------PhysicalProject ------------------------filter(n_name IN ('FRANCE', 'GERMANY')) ---------------------------PhysicalOlapScan[nation] +--------------------------PhysicalOlapScan[nation(n2)] diff --git a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q8.out b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q8.out index 9d85d05421445f..3b2f68228f5b3c 100644 --- a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q8.out +++ b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q8.out @@ -23,7 +23,7 @@ PhysicalResultSink --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((n1.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF2 r_regionkey->[n_regionkey] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[nation] apply RFs: RF2 +--------------------------------------PhysicalOlapScan[nation(n1)] apply RFs: RF2 ------------------------------------PhysicalProject --------------------------------------filter((region.r_name = 'AMERICA')) ----------------------------------------PhysicalOlapScan[region] @@ -40,5 +40,5 @@ PhysicalResultSink --------------------------------------filter((part.p_type = 'ECONOMY ANODIZED STEEL')) ----------------------------------------PhysicalOlapScan[part] --------------------PhysicalProject -----------------------PhysicalOlapScan[nation] +----------------------PhysicalOlapScan[nation(n2)] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape/q21.out b/regression-test/data/shape_check/tpch_sf1000/shape/q21.out index 0436a7b245b174..5a3a807e5beb63 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape/q21.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape/q21.out @@ -10,11 +10,11 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[RIGHT_SEMI_JOIN colocated] hashCondition=((l2.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF4 l_orderkey->[l_orderkey] ------------------PhysicalProject ---------------------PhysicalOlapScan[lineitem] apply RFs: RF4 +--------------------PhysicalOlapScan[lineitem(l2)] apply RFs: RF4 ------------------hashJoin[RIGHT_ANTI_JOIN colocated] hashCondition=((l3.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF3 l_orderkey->[l_orderkey] --------------------PhysicalProject ----------------------filter((l3.l_receiptdate > l3.l_commitdate)) -------------------------PhysicalOlapScan[lineitem] apply RFs: RF3 +------------------------PhysicalOlapScan[lineitem(l3)] apply RFs: RF3 --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN colocated] hashCondition=((orders.o_orderkey = l1.l_orderkey)) otherCondition=() build RFs:RF2 l_orderkey->[o_orderkey] ------------------------PhysicalProject @@ -24,7 +24,7 @@ PhysicalResultSink --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = l1.l_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[l_suppkey] ----------------------------PhysicalProject ------------------------------filter((l1.l_receiptdate > l1.l_commitdate)) ---------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 +--------------------------------PhysicalOlapScan[lineitem(l1)] apply RFs: RF1 ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[s_nationkey] --------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpch_sf1000/shape/q7.out b/regression-test/data/shape_check/tpch_sf1000/shape/q7.out index 957b17a7402749..6905aedddb1cf7 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape/q7.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape/q7.out @@ -24,12 +24,12 @@ PhysicalResultSink --------------------------------PhysicalOlapScan[supplier] apply RFs: RF1 ------------------------------PhysicalProject --------------------------------filter(n_name IN ('FRANCE', 'GERMANY')) -----------------------------------PhysicalOlapScan[nation] +----------------------------------PhysicalOlapScan[nation(n1)] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_nationkey = n2.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[c_nationkey] ----------------------PhysicalProject ------------------------PhysicalOlapScan[customer] apply RFs: RF0 ----------------------PhysicalProject ------------------------filter(n_name IN ('FRANCE', 'GERMANY')) ---------------------------PhysicalOlapScan[nation] +--------------------------PhysicalOlapScan[nation(n2)] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape/q8.out b/regression-test/data/shape_check/tpch_sf1000/shape/q8.out index 04c25aa5b1223f..b93bba6af78c1d 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape/q8.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape/q8.out @@ -23,7 +23,7 @@ PhysicalResultSink --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((n1.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF2 r_regionkey->[n_regionkey] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[nation] apply RFs: RF2 +--------------------------------------PhysicalOlapScan[nation(n1)] apply RFs: RF2 ------------------------------------PhysicalProject --------------------------------------filter((region.r_name = 'AMERICA')) ----------------------------------------PhysicalOlapScan[region] @@ -40,5 +40,5 @@ PhysicalResultSink --------------------------------------filter((part.p_type = 'ECONOMY ANODIZED STEEL')) ----------------------------------------PhysicalOlapScan[part] --------------------PhysicalProject -----------------------PhysicalOlapScan[nation] +----------------------PhysicalOlapScan[nation(n2)] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q21.out b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q21.out index c54a6b502f590d..1c7ee4d0192a6b 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q21.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q21.out @@ -15,14 +15,14 @@ PhysicalResultSink ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = l1.l_suppkey)) otherCondition=() build RFs:RF2 s_suppkey->[l_suppkey] --------------------------hashJoin[RIGHT_SEMI_JOIN colocated] hashCondition=((l2.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF1 l_orderkey->[l_orderkey] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 RF3 +------------------------------PhysicalOlapScan[lineitem(l2)] apply RFs: RF1 RF3 ----------------------------hashJoin[RIGHT_ANTI_JOIN colocated] hashCondition=((l3.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF0 l_orderkey->[l_orderkey] ------------------------------PhysicalProject --------------------------------filter((l3.l_receiptdate > l3.l_commitdate)) -----------------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 +----------------------------------PhysicalOlapScan[lineitem(l3)] apply RFs: RF0 ------------------------------PhysicalProject --------------------------------filter((l1.l_receiptdate > l1.l_commitdate)) -----------------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 RF3 +----------------------------------PhysicalOlapScan[lineitem(l1)] apply RFs: RF2 RF3 --------------------------PhysicalProject ----------------------------PhysicalOlapScan[supplier] apply RFs: RF4 ----------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q7.out b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q7.out index e953eb4cbcee33..549647cdfb5cb7 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q7.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q7.out @@ -27,8 +27,8 @@ PhysicalResultSink ------------------NestedLoopJoin[INNER_JOIN]OR[AND[(n1.n_name = 'FRANCE'),(n2.n_name = 'GERMANY')],AND[(n1.n_name = 'GERMANY'),(n2.n_name = 'FRANCE')]] --------------------PhysicalProject ----------------------filter(n_name IN ('FRANCE', 'GERMANY')) -------------------------PhysicalOlapScan[nation] +------------------------PhysicalOlapScan[nation(n1)] --------------------PhysicalProject ----------------------filter(n_name IN ('FRANCE', 'GERMANY')) -------------------------PhysicalOlapScan[nation] +------------------------PhysicalOlapScan[nation(n2)] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q8.out b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q8.out index 7b034a6386f270..850801e1db8bba 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q8.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q8.out @@ -35,9 +35,9 @@ PhysicalResultSink --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer] apply RFs: RF4 ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[nation] apply RFs: RF6 +------------------------------PhysicalOlapScan[nation(n1)] apply RFs: RF6 ------------------------PhysicalProject ---------------------------PhysicalOlapScan[nation] +--------------------------PhysicalOlapScan[nation(n2)] --------------------PhysicalProject ----------------------filter((region.r_name = 'AMERICA')) ------------------------PhysicalOlapScan[region] From ed68c66ea29f5e94b0531bc5c81216c65af36ba6 Mon Sep 17 00:00:00 2001 From: englefly Date: Sat, 19 Sep 2026 00:44:46 +0800 Subject: [PATCH 2/2] branch-4.2 [fix](regression) Fix scan alias in shape_check expected outputs The 3-way merge of the upstream updated baselines missed the alias for a few suites; regenerate them from the actual output of branch-4.2 + #56802. --- .../tpcds_sf100/noStatsRfPrune/query14.out | 12 ++++++------ .../tpcds_sf100/no_stats_shape/query14.out | 12 ++++++------ .../data/shape_check/tpcds_sf100/rf_prune/query3.out | 2 +- .../shape_check/tpcds_sf100/rf_prune/query35.out | 4 ++-- .../shape_check/tpcds_sf100/rf_prune/query42.out | 2 +- .../shape_check/tpcds_sf100/rf_prune/query52.out | 2 +- .../data/shape_check/tpcds_sf100/shape/query3.out | 2 +- .../data/shape_check/tpcds_sf100/shape/query35.out | 4 ++-- .../data/shape_check/tpcds_sf100/shape/query42.out | 2 +- .../data/shape_check/tpcds_sf100/shape/query52.out | 2 +- .../data/shape_check/tpcds_sf1000/shape/query3.out | 2 +- .../data/shape_check/tpcds_sf1000/shape/query72.out | 6 +++--- 12 files changed, 26 insertions(+), 26 deletions(-) diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query14.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query14.out index a1074dc9a1ec63..7923d656019810 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query14.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query14.out @@ -13,10 +13,10 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------PhysicalProject ----------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 --------------------PhysicalProject -----------------------PhysicalOlapScan[item] +----------------------PhysicalOlapScan[item(iws)] ----------------PhysicalProject ------------------filter((d3.d_year <= 2002) and (d3.d_year >= 2000)) ---------------------PhysicalOlapScan[date_dim] +--------------------PhysicalOlapScan[date_dim(d3)] ----------PhysicalDistribute[DistributionSpecHash] ------------PhysicalProject --------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] @@ -25,10 +25,10 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------PhysicalProject ----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 --------------------PhysicalProject -----------------------PhysicalOlapScan[item] +----------------------PhysicalOlapScan[item(ics)] ----------------PhysicalProject ------------------filter((d2.d_year <= 2002) and (d2.d_year >= 2000)) ---------------------PhysicalOlapScan[date_dim] +--------------------PhysicalOlapScan[date_dim(d2)] ----------PhysicalDistribute[DistributionSpecHash] ------------PhysicalProject --------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] @@ -37,10 +37,10 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------PhysicalProject ----------------------PhysicalOlapScan[store_sales] apply RFs: RF5 --------------------PhysicalProject -----------------------PhysicalOlapScan[item] +----------------------PhysicalOlapScan[item(iss)] ----------------PhysicalProject ------------------filter((d1.d_year <= 2002) and (d1.d_year >= 2000)) ---------------------PhysicalOlapScan[date_dim] +--------------------PhysicalOlapScan[date_dim(d1)] --------PhysicalProject ----------PhysicalOlapScan[item] --PhysicalCteAnchor ( cteId=CTEId#1 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query14.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query14.out index 23754b856a777d..7d44b0e5ab3afc 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query14.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query14.out @@ -13,10 +13,10 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------PhysicalProject ----------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 --------------------PhysicalProject -----------------------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8 +----------------------PhysicalOlapScan[item(iws)] apply RFs: RF6 RF7 RF8 ----------------PhysicalProject ------------------filter((d3.d_year <= 2002) and (d3.d_year >= 2000)) ---------------------PhysicalOlapScan[date_dim] +--------------------PhysicalOlapScan[date_dim(d3)] ----------PhysicalDistribute[DistributionSpecHash] ------------PhysicalProject --------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] @@ -25,10 +25,10 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------PhysicalProject ----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 --------------------PhysicalProject -----------------------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8 +----------------------PhysicalOlapScan[item(ics)] apply RFs: RF6 RF7 RF8 ----------------PhysicalProject ------------------filter((d2.d_year <= 2002) and (d2.d_year >= 2000)) ---------------------PhysicalOlapScan[date_dim] +--------------------PhysicalOlapScan[date_dim(d2)] ----------PhysicalDistribute[DistributionSpecHash] ------------PhysicalProject --------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] @@ -37,10 +37,10 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------PhysicalProject ----------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 --------------------PhysicalProject -----------------------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8 +----------------------PhysicalOlapScan[item(iss)] apply RFs: RF6 RF7 RF8 ----------------PhysicalProject ------------------filter((d1.d_year <= 2002) and (d1.d_year >= 2000)) ---------------------PhysicalOlapScan[date_dim] +--------------------PhysicalOlapScan[date_dim(d1)] --------PhysicalProject ----------PhysicalOlapScan[item] --PhysicalCteAnchor ( cteId=CTEId#1 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query3.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query3.out index 7a834aeca891cb..91a1ee7ee932d0 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query3.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query3.out @@ -19,7 +19,7 @@ PhysicalResultSink --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------------PhysicalProject --------------------------------filter((dt.d_moy = 11)) -----------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[date_dim(dt)] --------------------PhysicalProject ----------------------filter((item.i_manufact_id = 816)) ------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query35.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query35.out index 243129c49d4681..990cd91fc37516 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query35.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query35.out @@ -32,9 +32,9 @@ PhysicalResultSink ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer] +------------------------------------PhysicalOlapScan[customer(c)] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer_address] +------------------------------------PhysicalOlapScan[customer_address(ca)] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer_demographics] ------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query42.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query42.out index 3684d3b534238a..0391a575411ec8 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query42.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query42.out @@ -19,7 +19,7 @@ PhysicalResultSink --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------------PhysicalProject --------------------------------filter((dt.d_moy = 11) and (dt.d_year = 2002)) -----------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[date_dim(dt)] --------------------PhysicalProject ----------------------filter((item.i_manager_id = 1)) ------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query52.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query52.out index 12024a1e4cbdc6..8ccc694b29dce4 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query52.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query52.out @@ -19,7 +19,7 @@ PhysicalResultSink --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------------PhysicalProject --------------------------------filter((dt.d_moy = 12) and (dt.d_year = 2002)) -----------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[date_dim(dt)] --------------------PhysicalProject ----------------------filter((item.i_manager_id = 1)) ------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query3.out b/regression-test/data/shape_check/tpcds_sf100/shape/query3.out index 7a834aeca891cb..91a1ee7ee932d0 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query3.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query3.out @@ -19,7 +19,7 @@ PhysicalResultSink --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------------PhysicalProject --------------------------------filter((dt.d_moy = 11)) -----------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[date_dim(dt)] --------------------PhysicalProject ----------------------filter((item.i_manufact_id = 816)) ------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query35.out b/regression-test/data/shape_check/tpcds_sf100/shape/query35.out index 1f9a0fc6a432ce..ad8d398c404198 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query35.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query35.out @@ -32,9 +32,9 @@ PhysicalResultSink ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 RF2 +------------------------------------PhysicalOlapScan[customer(c)] apply RFs: RF1 RF2 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer_address] +------------------------------------PhysicalOlapScan[customer_address(ca)] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer_demographics] ------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query42.out b/regression-test/data/shape_check/tpcds_sf100/shape/query42.out index 3684d3b534238a..0391a575411ec8 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query42.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query42.out @@ -19,7 +19,7 @@ PhysicalResultSink --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------------PhysicalProject --------------------------------filter((dt.d_moy = 11) and (dt.d_year = 2002)) -----------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[date_dim(dt)] --------------------PhysicalProject ----------------------filter((item.i_manager_id = 1)) ------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query52.out b/regression-test/data/shape_check/tpcds_sf100/shape/query52.out index 12024a1e4cbdc6..8ccc694b29dce4 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query52.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query52.out @@ -19,7 +19,7 @@ PhysicalResultSink --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------------PhysicalProject --------------------------------filter((dt.d_moy = 12) and (dt.d_year = 2002)) -----------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[date_dim(dt)] --------------------PhysicalProject ----------------------filter((item.i_manager_id = 1)) ------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query3.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query3.out index 7a834aeca891cb..91a1ee7ee932d0 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query3.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query3.out @@ -19,7 +19,7 @@ PhysicalResultSink --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------------PhysicalProject --------------------------------filter((dt.d_moy = 11)) -----------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[date_dim(dt)] --------------------PhysicalProject ----------------------filter((item.i_manufact_id = 816)) ------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query72.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query72.out index 4ee540bc146242..fb601be8894903 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query72.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query72.out @@ -33,10 +33,10 @@ PhysicalResultSink --------------------------------------------------PhysicalProject ----------------------------------------------------NestedLoopJoin[INNER_JOIN](d3.d_date > days_add(d_date, INTERVAL 5 DAY)) ------------------------------------------------------PhysicalProject ---------------------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------------------------PhysicalOlapScan[date_dim(d3)] ------------------------------------------------------PhysicalProject --------------------------------------------------------filter((d1.d_year = 1998)) -----------------------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 +----------------------------------------------------------PhysicalOlapScan[date_dim(d1)] apply RFs: RF5 ----------------------------------------------PhysicalProject ------------------------------------------------filter((household_demographics.hd_buy_potential = '1001-5000')) --------------------------------------------------PhysicalOlapScan[household_demographics] @@ -48,7 +48,7 @@ PhysicalResultSink ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[item] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalOlapScan[date_dim(d2)] ------------------PhysicalProject --------------------PhysicalOlapScan[warehouse]