diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/ChildrenPropertiesRegulator.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/ChildrenPropertiesRegulator.java index 41a1bfc37a97e1..d6e0a4c8787f8c 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/ChildrenPropertiesRegulator.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/ChildrenPropertiesRegulator.java @@ -386,6 +386,9 @@ public List> visitPhysicalHashJoin( Optional updatedForLeft = Optional.empty(); Optional updatedForRight = Optional.empty(); + boolean shouldCheckLeftBucketDownGrade = false; + boolean shouldCheckrightBucketDownGrade = false; + if (JoinUtils.couldColocateJoin(leftHashSpec, rightHashSpec, hashJoin.getHashJoinConjuncts())) { // check colocate join with scan return ImmutableList.of(originChildrenProperties); @@ -400,33 +403,16 @@ public List> visitPhysicalHashJoin( ShuffleType.EXECUTION_BUCKETED, leftHashSpec, rightHashSpec, (DistributionSpecHash) requiredProperties.get(0).getDistributionSpec(), (DistributionSpecHash) requiredProperties.get(1).getDistributionSpec())); - } else if (isBucketShuffleDownGrade(leftChild)) { - updatedForLeft = Optional.of(calAnotherSideRequired( - ShuffleType.EXECUTION_BUCKETED, leftHashSpec, leftHashSpec, - (DistributionSpecHash) requiredProperties.get(0).getDistributionSpec(), - (DistributionSpecHash) requiredProperties.get(0).getDistributionSpec())); - updatedForRight = Optional.of(calAnotherSideRequired( - ShuffleType.EXECUTION_BUCKETED, leftHashSpec, rightHashSpec, - (DistributionSpecHash) requiredProperties.get(0).getDistributionSpec(), - (DistributionSpecHash) requiredProperties.get(1).getDistributionSpec())); - } else if (isBucketShuffleDownGrade(rightChild)) { - updatedForLeft = Optional.of(calAnotherSideRequired( - ShuffleType.EXECUTION_BUCKETED, rightHashSpec, leftHashSpec, - (DistributionSpecHash) requiredProperties.get(1).getDistributionSpec(), - (DistributionSpecHash) requiredProperties.get(0).getDistributionSpec())); - updatedForRight = Optional.of(calAnotherSideRequired( - ShuffleType.EXECUTION_BUCKETED, rightHashSpec, rightHashSpec, - (DistributionSpecHash) requiredProperties.get(1).getDistributionSpec(), - (DistributionSpecHash) requiredProperties.get(1).getDistributionSpec())); } else if ((leftHashSpec.getShuffleType() == ShuffleType.NATURAL && rightHashSpec.getShuffleType() == ShuffleType.NATURAL)) { + shouldCheckLeftBucketDownGrade = true; updatedForRight = Optional.of(calAnotherSideRequired( ShuffleType.STORAGE_BUCKETED, leftHashSpec, rightHashSpec, (DistributionSpecHash) requiredProperties.get(0).getDistributionSpec(), (DistributionSpecHash) requiredProperties.get(1).getDistributionSpec())); } else if (leftHashSpec.getShuffleType() == ShuffleType.NATURAL && rightHashSpec.getShuffleType() == ShuffleType.EXECUTION_BUCKETED) { - if (SessionVariable.canUseNereidsDistributePlanner()) { + if (SessionVariable.canUseNereidsDistributePlanner() && !isBucketShuffleDownGrade(leftChild)) { List shuffleToLeft = Lists.newArrayList(originChildrenProperties); PhysicalProperties enforceShuffleRight = calAnotherSideRequired( ShuffleType.STORAGE_BUCKETED, leftHashSpec, rightHashSpec, @@ -443,7 +429,7 @@ public List> visitPhysicalHashJoin( updateChildEnforceAndCost(0, enforceShuffleLeft, shuffleToRight); return ImmutableList.of(shuffleToLeft, shuffleToRight); } - + shouldCheckLeftBucketDownGrade = true; // must add enforce because shuffle algorithm is not same between NATURAL and BUCKETED updatedForRight = Optional.of(calAnotherSideRequired( ShuffleType.STORAGE_BUCKETED, leftHashSpec, rightHashSpec, @@ -451,18 +437,18 @@ public List> visitPhysicalHashJoin( (DistributionSpecHash) requiredProperties.get(1).getDistributionSpec())); } else if (leftHashSpec.getShuffleType() == ShuffleType.NATURAL && rightHashSpec.getShuffleType() == ShuffleType.STORAGE_BUCKETED) { - if (bothSideShuffleKeysAreSameOrder(leftHashSpec, rightHashSpec, + shouldCheckLeftBucketDownGrade = true; + if (!bothSideShuffleKeysAreSameOrder(leftHashSpec, rightHashSpec, (DistributionSpecHash) requiredProperties.get(0).getDistributionSpec(), (DistributionSpecHash) requiredProperties.get(1).getDistributionSpec())) { - return ImmutableList.of(originChildrenProperties); + updatedForRight = Optional.of(calAnotherSideRequired( + ShuffleType.STORAGE_BUCKETED, leftHashSpec, rightHashSpec, + (DistributionSpecHash) requiredProperties.get(0).getDistributionSpec(), + (DistributionSpecHash) requiredProperties.get(1).getDistributionSpec())); } - updatedForRight = Optional.of(calAnotherSideRequired( - ShuffleType.STORAGE_BUCKETED, leftHashSpec, rightHashSpec, - (DistributionSpecHash) requiredProperties.get(0).getDistributionSpec(), - (DistributionSpecHash) requiredProperties.get(1).getDistributionSpec())); } else if (leftHashSpec.getShuffleType() == ShuffleType.EXECUTION_BUCKETED && rightHashSpec.getShuffleType() == ShuffleType.NATURAL) { - if (SessionVariable.canUseNereidsDistributePlanner()) { + if (SessionVariable.canUseNereidsDistributePlanner() && !isBucketShuffleDownGrade(rightChild)) { // nereids coordinator can exchange left side to right side to do bucket shuffle join // TODO: maybe we should check if left child is PhysicalDistribute. // If so add storage bucketed shuffle on left side. Other wise, @@ -497,23 +483,26 @@ public List> visitPhysicalHashJoin( } } else if (leftHashSpec.getShuffleType() == ShuffleType.EXECUTION_BUCKETED && rightHashSpec.getShuffleType() == ShuffleType.EXECUTION_BUCKETED) { - if (bothSideShuffleKeysAreSameOrder(rightHashSpec, leftHashSpec, + + if (!bothSideShuffleKeysAreSameOrder(rightHashSpec, leftHashSpec, (DistributionSpecHash) requiredProperties.get(1).getDistributionSpec(), (DistributionSpecHash) requiredProperties.get(0).getDistributionSpec())) { - return ImmutableList.of(originChildrenProperties); + shouldCheckLeftBucketDownGrade = true; + updatedForRight = Optional.of(calAnotherSideRequired( + ShuffleType.EXECUTION_BUCKETED, leftHashSpec, rightHashSpec, + (DistributionSpecHash) requiredProperties.get(0).getDistributionSpec(), + (DistributionSpecHash) requiredProperties.get(1).getDistributionSpec())); } - updatedForRight = Optional.of(calAnotherSideRequired( - ShuffleType.EXECUTION_BUCKETED, leftHashSpec, rightHashSpec, - (DistributionSpecHash) requiredProperties.get(0).getDistributionSpec(), - (DistributionSpecHash) requiredProperties.get(1).getDistributionSpec())); } else if ((leftHashSpec.getShuffleType() == ShuffleType.EXECUTION_BUCKETED && rightHashSpec.getShuffleType() == ShuffleType.STORAGE_BUCKETED)) { if (children.get(0).getPlan() instanceof PhysicalDistribute) { + shouldCheckrightBucketDownGrade = true; updatedForLeft = Optional.of(calAnotherSideRequired( ShuffleType.STORAGE_BUCKETED, rightHashSpec, leftHashSpec, (DistributionSpecHash) requiredProperties.get(1).getDistributionSpec(), (DistributionSpecHash) requiredProperties.get(0).getDistributionSpec())); } else { + shouldCheckLeftBucketDownGrade = true; updatedForRight = Optional.of(calAnotherSideRequired( ShuffleType.EXECUTION_BUCKETED, leftHashSpec, rightHashSpec, (DistributionSpecHash) requiredProperties.get(0).getDistributionSpec(), @@ -521,9 +510,7 @@ public List> visitPhysicalHashJoin( } } else if ((leftHashSpec.getShuffleType() == ShuffleType.STORAGE_BUCKETED && rightHashSpec.getShuffleType() == ShuffleType.NATURAL)) { - // TODO: we must do shuffle on right because coordinator could not do right be selection in this case, - // since it always to check the left most node whether olap scan node. - // after we fix coordinator problem, we could do right to left bucket shuffle + shouldCheckLeftBucketDownGrade = true; updatedForRight = Optional.of(calAnotherSideRequired( ShuffleType.STORAGE_BUCKETED, leftHashSpec, rightHashSpec, (DistributionSpecHash) requiredProperties.get(0).getDistributionSpec(), @@ -531,11 +518,13 @@ public List> visitPhysicalHashJoin( } else if ((leftHashSpec.getShuffleType() == ShuffleType.STORAGE_BUCKETED && rightHashSpec.getShuffleType() == ShuffleType.EXECUTION_BUCKETED)) { if (children.get(0).getPlan() instanceof PhysicalDistribute) { + shouldCheckrightBucketDownGrade = true; updatedForLeft = Optional.of(calAnotherSideRequired( ShuffleType.EXECUTION_BUCKETED, rightHashSpec, leftHashSpec, (DistributionSpecHash) requiredProperties.get(1).getDistributionSpec(), (DistributionSpecHash) requiredProperties.get(0).getDistributionSpec())); } else { + shouldCheckLeftBucketDownGrade = true; updatedForRight = Optional.of(calAnotherSideRequired( ShuffleType.STORAGE_BUCKETED, leftHashSpec, rightHashSpec, (DistributionSpecHash) requiredProperties.get(0).getDistributionSpec(), @@ -544,24 +533,46 @@ public List> visitPhysicalHashJoin( } else if ((leftHashSpec.getShuffleType() == ShuffleType.STORAGE_BUCKETED && rightHashSpec.getShuffleType() == ShuffleType.STORAGE_BUCKETED)) { - if (bothSideShuffleKeysAreSameOrder(rightHashSpec, leftHashSpec, + if (!bothSideShuffleKeysAreSameOrder(rightHashSpec, leftHashSpec, (DistributionSpecHash) requiredProperties.get(1).getDistributionSpec(), (DistributionSpecHash) requiredProperties.get(0).getDistributionSpec())) { - return ImmutableList.of(originChildrenProperties); - } - if (children.get(0).getPlan() instanceof PhysicalDistribute) { - updatedForLeft = Optional.of(calAnotherSideRequired( - ShuffleType.STORAGE_BUCKETED, rightHashSpec, leftHashSpec, - (DistributionSpecHash) requiredProperties.get(1).getDistributionSpec(), - (DistributionSpecHash) requiredProperties.get(0).getDistributionSpec())); - } else { - updatedForRight = Optional.of(calAnotherSideRequired( - ShuffleType.STORAGE_BUCKETED, leftHashSpec, rightHashSpec, - (DistributionSpecHash) requiredProperties.get(0).getDistributionSpec(), - (DistributionSpecHash) requiredProperties.get(1).getDistributionSpec())); + if (children.get(0).getPlan() instanceof PhysicalDistribute) { + shouldCheckrightBucketDownGrade = true; + updatedForLeft = Optional.of(calAnotherSideRequired( + ShuffleType.STORAGE_BUCKETED, rightHashSpec, leftHashSpec, + (DistributionSpecHash) requiredProperties.get(1).getDistributionSpec(), + (DistributionSpecHash) requiredProperties.get(0).getDistributionSpec())); + } else { + shouldCheckLeftBucketDownGrade = true; + updatedForRight = Optional.of(calAnotherSideRequired( + ShuffleType.STORAGE_BUCKETED, leftHashSpec, rightHashSpec, + (DistributionSpecHash) requiredProperties.get(0).getDistributionSpec(), + (DistributionSpecHash) requiredProperties.get(1).getDistributionSpec())); + } } } + if (shouldCheckLeftBucketDownGrade && isBucketShuffleDownGrade(leftChild)) { + updatedForLeft = Optional.of(calAnotherSideRequired( + ShuffleType.EXECUTION_BUCKETED, leftHashSpec, leftHashSpec, + (DistributionSpecHash) requiredProperties.get(0).getDistributionSpec(), + (DistributionSpecHash) requiredProperties.get(0).getDistributionSpec())); + updatedForRight = Optional.of(calAnotherSideRequired( + ShuffleType.EXECUTION_BUCKETED, leftHashSpec, rightHashSpec, + (DistributionSpecHash) requiredProperties.get(0).getDistributionSpec(), + (DistributionSpecHash) requiredProperties.get(1).getDistributionSpec())); + } + if (shouldCheckrightBucketDownGrade && isBucketShuffleDownGrade(rightChild)) { + updatedForLeft = Optional.of(calAnotherSideRequired( + ShuffleType.EXECUTION_BUCKETED, rightHashSpec, leftHashSpec, + (DistributionSpecHash) requiredProperties.get(1).getDistributionSpec(), + (DistributionSpecHash) requiredProperties.get(0).getDistributionSpec())); + updatedForRight = Optional.of(calAnotherSideRequired( + ShuffleType.EXECUTION_BUCKETED, rightHashSpec, rightHashSpec, + (DistributionSpecHash) requiredProperties.get(1).getDistributionSpec(), + (DistributionSpecHash) requiredProperties.get(1).getDistributionSpec())); + } + updatedForLeft.ifPresent(physicalProperties -> updateChildEnforceAndCost(0, physicalProperties)); updatedForRight.ifPresent(physicalProperties -> updateChildEnforceAndCost(1, physicalProperties)); 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 3bd3679ea5a1ad..5da954162810c5 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query49.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query49.out @@ -30,7 +30,7 @@ PhysicalResultSink ------------------------------------------------------PhysicalProject --------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ----------------------------------------------------------PhysicalProject -------------------------------------------------------------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] +------------------------------------------------------------hashJoin[INNER_JOIN bucketShuffle] 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(ws)] apply RFs: RF0 RF1 RF2 diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query5.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query5.out index 695b99eef35811..0c246b76154a45 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query5.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query5.out @@ -62,12 +62,13 @@ PhysicalResultSink --------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 ---------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 wr_item_sk->[ws_item_sk];RF5 wr_order_number->[ws_order_number] -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 +--------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 wr_item_sk->[ws_item_sk];RF5 wr_order_number->[ws_order_number] +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) ----------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query75.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query75.out index 9ae74d42171aec..b103db39bfed30 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query75.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query75.out @@ -54,7 +54,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ws_item_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[LEFT_OUTER_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() +--------------------------------hashJoin[LEFT_OUTER_JOIN bucketShuffle] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 ----------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query78.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query78.out index 8904e8119f74cb..36b357f1dde123 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query78.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query78.out @@ -31,7 +31,7 @@ PhysicalResultSink --------------------------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 ---------------------------------hashJoin[LEFT_ANTI_JOIN shuffle] hashCondition=((web_returns.wr_order_number = web_sales.ws_order_number) and (web_sales.ws_item_sk = web_returns.wr_item_sk)) otherCondition=() +--------------------------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((web_returns.wr_order_number = web_sales.ws_order_number) and (web_sales.ws_item_sk = web_returns.wr_item_sk)) otherCondition=() ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 ----------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query80.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query80.out index e7517330625f89..df2d89d1b56b87 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query80.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query80.out @@ -81,7 +81,7 @@ PhysicalResultSink ----------------------------------------PhysicalProject ------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] --------------------------------------------PhysicalProject -----------------------------------------------hashJoin[LEFT_OUTER_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() +----------------------------------------------hashJoin[LEFT_OUTER_JOIN bucketShuffle] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() ------------------------------------------------PhysicalProject --------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF10 RF11 ------------------------------------------------PhysicalProject 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 3bd3679ea5a1ad..5da954162810c5 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 @@ -30,7 +30,7 @@ PhysicalResultSink ------------------------------------------------------PhysicalProject --------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ----------------------------------------------------------PhysicalProject -------------------------------------------------------------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] +------------------------------------------------------------hashJoin[INNER_JOIN bucketShuffle] 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(ws)] apply RFs: RF0 RF1 RF2 diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query5.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query5.out index 06f53170859331..93778ae4bf7401 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query5.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query5.out @@ -62,12 +62,13 @@ PhysicalResultSink --------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 ---------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 wr_item_sk->[ws_item_sk];RF5 wr_order_number->[ws_order_number] -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 RF7 -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 +--------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 wr_item_sk->[ws_item_sk];RF5 wr_order_number->[ws_order_number] +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 RF7 +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) ----------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query75.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query75.out index 9ae74d42171aec..b103db39bfed30 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query75.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query75.out @@ -54,7 +54,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ws_item_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[LEFT_OUTER_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() +--------------------------------hashJoin[LEFT_OUTER_JOIN bucketShuffle] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 ----------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query78.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query78.out index 8904e8119f74cb..36b357f1dde123 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query78.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query78.out @@ -31,7 +31,7 @@ PhysicalResultSink --------------------------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 ---------------------------------hashJoin[LEFT_ANTI_JOIN shuffle] hashCondition=((web_returns.wr_order_number = web_sales.ws_order_number) and (web_sales.ws_item_sk = web_returns.wr_item_sk)) otherCondition=() +--------------------------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((web_returns.wr_order_number = web_sales.ws_order_number) and (web_sales.ws_item_sk = web_returns.wr_item_sk)) otherCondition=() ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 ----------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query80.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query80.out index 50a83dfe4d7fb0..a556b33d443624 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query80.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query80.out @@ -81,7 +81,7 @@ PhysicalResultSink ----------------------------------------PhysicalProject ------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] --------------------------------------------PhysicalProject -----------------------------------------------hashJoin[LEFT_OUTER_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() +----------------------------------------------hashJoin[LEFT_OUTER_JOIN bucketShuffle] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() ------------------------------------------------PhysicalProject --------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 RF10 RF11 ------------------------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query21.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query21.out index 6c42c4a588a411..ac5bc11e9c1e99 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query21.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query21.out @@ -13,7 +13,7 @@ PhysicalResultSink --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] +--------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] ----------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 ----------------------------PhysicalProject ------------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query22.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query22.out index 7f10ebd7894ce7..5c1ea04c5136de 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query22.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query22.out @@ -12,7 +12,7 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() +------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() --------------------------PhysicalProject ----------------------------PhysicalOlapScan[inventory] apply RFs: RF1 --------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query37.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query37.out index cc63716e4ba212..222831f5333ef6 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query37.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query37.out @@ -14,7 +14,7 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] +------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] --------------------------PhysicalProject ----------------------------filter((inventory.inv_quantity_on_hand <= 500) and (inventory.inv_quantity_on_hand >= 100)) ------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query5.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query5.out index b3caf7592cdbab..42e0a51e4a28c4 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query5.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query5.out @@ -64,7 +64,7 @@ PhysicalResultSink ------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 --------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 wr_item_sk->[ws_item_sk];RF5 wr_order_number->[ws_order_number] +------------------------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 wr_item_sk->[ws_item_sk];RF5 wr_order_number->[ws_order_number] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 --------------------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query78.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query78.out index 4e8eee0aa8ffed..36b357f1dde123 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query78.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query78.out @@ -31,7 +31,7 @@ PhysicalResultSink --------------------------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 ---------------------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((web_returns.wr_order_number = web_sales.ws_order_number) and (web_sales.ws_item_sk = web_returns.wr_item_sk)) otherCondition=() +--------------------------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((web_returns.wr_order_number = web_sales.ws_order_number) and (web_sales.ws_item_sk = web_returns.wr_item_sk)) otherCondition=() ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 ----------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query82.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query82.out index 5142d25b09e8a3..aa01a8a275e52a 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query82.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query82.out @@ -14,7 +14,7 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] +------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] --------------------------PhysicalProject ----------------------------filter((inventory.inv_quantity_on_hand <= 500) and (inventory.inv_quantity_on_hand >= 100)) ------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query21.out b/regression-test/data/shape_check/tpcds_sf100/shape/query21.out index 187958e5af2ee4..63424e7c0b3879 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query21.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query21.out @@ -13,7 +13,7 @@ PhysicalResultSink --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] +--------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] ----------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2 ----------------------------PhysicalProject ------------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query22.out b/regression-test/data/shape_check/tpcds_sf100/shape/query22.out index a96dc0686f150d..c0a61edde05574 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query22.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query22.out @@ -12,7 +12,7 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] +------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 --------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query37.out b/regression-test/data/shape_check/tpcds_sf100/shape/query37.out index cc63716e4ba212..222831f5333ef6 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query37.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query37.out @@ -14,7 +14,7 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] +------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] --------------------------PhysicalProject ----------------------------filter((inventory.inv_quantity_on_hand <= 500) and (inventory.inv_quantity_on_hand >= 100)) ------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query5.out b/regression-test/data/shape_check/tpcds_sf100/shape/query5.out index 333a44b8d65efa..c74e0d87496087 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query5.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query5.out @@ -64,7 +64,7 @@ PhysicalResultSink ------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 --------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 wr_item_sk->[ws_item_sk];RF5 wr_order_number->[ws_order_number] +------------------------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 wr_item_sk->[ws_item_sk];RF5 wr_order_number->[ws_order_number] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 RF7 --------------------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query78.out b/regression-test/data/shape_check/tpcds_sf100/shape/query78.out index 4e8eee0aa8ffed..36b357f1dde123 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query78.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query78.out @@ -31,7 +31,7 @@ PhysicalResultSink --------------------------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 ---------------------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((web_returns.wr_order_number = web_sales.ws_order_number) and (web_sales.ws_item_sk = web_returns.wr_item_sk)) otherCondition=() +--------------------------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((web_returns.wr_order_number = web_sales.ws_order_number) and (web_sales.ws_item_sk = web_returns.wr_item_sk)) otherCondition=() ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 ----------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query82.out b/regression-test/data/shape_check/tpcds_sf100/shape/query82.out index 5142d25b09e8a3..aa01a8a275e52a 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query82.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query82.out @@ -14,7 +14,7 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] +------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] --------------------------PhysicalProject ----------------------------filter((inventory.inv_quantity_on_hand <= 500) and (inventory.inv_quantity_on_hand >= 100)) ------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query21.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query21.out index cce40a238b383a..0531ca1eec5624 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query21.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query21.out @@ -13,7 +13,7 @@ PhysicalResultSink --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] +--------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] ----------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2 ----------------------------PhysicalProject ------------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query22.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query22.out index 6870d374138c0c..30c8430e7053b2 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query22.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query22.out @@ -10,7 +10,7 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] +--------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk] --------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query37.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query37.out index 9792640c11e7bd..ca1678bcbad690 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query37.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query37.out @@ -14,7 +14,7 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] +------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] --------------------------PhysicalProject ----------------------------filter((inventory.inv_quantity_on_hand <= 500) and (inventory.inv_quantity_on_hand >= 100)) ------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query39.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query39.out index a5b3b0534cdaa8..93594112c8c01a 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query39.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query39.out @@ -6,7 +6,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------filter(( not (mean = 0.0)) and ((foo.stdev / foo.mean) > 1.0)) --------hashAgg[GLOBAL] ----------PhysicalProject -------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[inv_item_sk] +------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[inv_item_sk] --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF1 w_warehouse_sk->[inv_warehouse_sk] ------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query5.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query5.out index 3b1ff1209f9f10..5b9501fe0a3bec 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query5.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query5.out @@ -62,12 +62,13 @@ PhysicalResultSink --------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 ---------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 wr_item_sk->[ws_item_sk];RF5 wr_order_number->[ws_order_number] -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 RF7 -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 +--------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 wr_item_sk->[ws_item_sk];RF5 wr_order_number->[ws_order_number] +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 RF7 +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) ----------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query78.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query78.out index d72bf6a7c0efda..99d6302bbcf9d5 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query78.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query78.out @@ -29,7 +29,7 @@ PhysicalResultSink ----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject -----------------------------hashJoin[LEFT_ANTI_JOIN shuffle] hashCondition=((web_returns.wr_order_number = web_sales.ws_order_number) and (web_sales.ws_item_sk = web_returns.wr_item_sk)) otherCondition=() +----------------------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((web_returns.wr_order_number = web_sales.ws_order_number) and (web_sales.ws_item_sk = web_returns.wr_item_sk)) otherCondition=() ------------------------------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 diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query82.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query82.out index b7f85f6047f67a..55fdb67ad89c27 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query82.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query82.out @@ -14,7 +14,7 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] +------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] --------------------------PhysicalProject ----------------------------filter((inventory.inv_quantity_on_hand <= 500) and (inventory.inv_quantity_on_hand >= 100)) ------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query21.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query21.out index 7aaa027dd961ca..ea9e85c3155cdd 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query21.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query21.out @@ -13,7 +13,7 @@ PhysicalResultSink --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] +--------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] ----------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2 ----------------------------PhysicalProject ------------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query22.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query22.out index 09dedb98772f96..93c02aab1654c3 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query22.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query22.out @@ -10,7 +10,7 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] +--------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk] --------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query37.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query37.out index 149a61f7b37054..99e27bee90be73 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query37.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query37.out @@ -14,7 +14,7 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] +------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] --------------------------PhysicalProject ----------------------------filter((inventory.inv_quantity_on_hand <= 500) and (inventory.inv_quantity_on_hand >= 100)) ------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query39.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query39.out index b826c2ac59911a..936364b59ddc11 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query39.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query39.out @@ -6,7 +6,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------filter(( not (mean = 0.0)) and ((foo.stdev / foo.mean) > 1.0)) --------hashAgg[GLOBAL] ----------PhysicalProject -------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[inv_item_sk] +------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[inv_item_sk] --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF1 w_warehouse_sk->[inv_warehouse_sk] ------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query5.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query5.out index f4faa729b2052d..c74e0d87496087 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query5.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query5.out @@ -62,12 +62,13 @@ PhysicalResultSink --------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 ---------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 wr_item_sk->[ws_item_sk];RF5 wr_order_number->[ws_order_number] -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 RF7 -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 +--------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 wr_item_sk->[ws_item_sk];RF5 wr_order_number->[ws_order_number] +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 RF7 +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) ----------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query78.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query78.out index a3b55973d303c7..5affa616f83ae3 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query78.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query78.out @@ -29,16 +29,16 @@ PhysicalResultSink ----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject -----------------------------hashJoin[LEFT_ANTI_JOIN shuffle] hashCondition=((web_returns.wr_order_number = web_sales.ws_order_number) and (web_sales.ws_item_sk = web_returns.wr_item_sk)) otherCondition=() +----------------------------hashJoin[INNER_JOIN 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 ---------------------------------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] +--------------------------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((web_returns.wr_order_number = web_sales.ws_order_number) and (web_sales.ws_item_sk = web_returns.wr_item_sk)) otherCondition=() ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 ----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_year = 1998)) ---------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalOlapScan[web_returns] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_returns] +--------------------------------filter((date_dim.d_year = 1998)) +----------------------------------PhysicalOlapScan[date_dim] --------------PhysicalProject ----------------hashAgg[GLOBAL] ------------------PhysicalDistribute[DistributionSpecHash] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query82.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query82.out index a1bb3a33e1d0ff..336d4fd5175339 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query82.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query82.out @@ -14,7 +14,7 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] +------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] --------------------------PhysicalProject ----------------------------filter((inventory.inv_quantity_on_hand <= 500) and (inventory.inv_quantity_on_hand >= 100)) ------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query54.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query54.out index 6d88dce347de99..1a47463dfde84e 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query54.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query54.out @@ -19,7 +19,7 @@ PhysicalResultSink --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((my_customers.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((my_customers.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] +--------------------------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((my_customers.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF7 ----------------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query72.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query72.out index 6252c75e6ee1c8..f1d3d99831ecc3 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query72.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query72.out @@ -12,15 +12,15 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF6 hd_demo_sk->[cs_bill_hdemo_sk] ----------------------PhysicalProject -------------------------hashJoin[LEFT_OUTER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() +------------------------hashJoin[LEFT_OUTER_JOIN bucketShuffle] hashCondition=((catalog_returns.cr_item_sk = catalog_sales.cs_item_sk) and (catalog_returns.cr_order_number = catalog_sales.cs_order_number)) otherCondition=() --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_ship_date_sk] +----------------------------hashJoin[LEFT_OUTER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[inv_date_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_ship_date_sk] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF3 cd_demo_sk->[cs_bill_cdemo_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[inv_date_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[LEFT_OUTER_JOIN shuffle] hashCondition=((catalog_returns.cr_item_sk = catalog_sales.cs_item_sk) and (catalog_returns.cr_order_number = catalog_sales.cs_order_number)) otherCondition=() +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF3 cd_demo_sk->[cs_bill_cdemo_sk] ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk,inv_item_sk] ----------------------------------------------PhysicalProject @@ -35,16 +35,16 @@ PhysicalResultSink ----------------------------------------------PhysicalProject ------------------------------------------------PhysicalOlapScan[item] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[catalog_returns] +--------------------------------------------filter((customer_demographics.cd_marital_status = 'D')) +----------------------------------------------PhysicalOlapScan[customer_demographics] --------------------------------------PhysicalProject -----------------------------------------filter((customer_demographics.cd_marital_status = 'D')) -------------------------------------------PhysicalOlapScan[customer_demographics] +----------------------------------------PhysicalOlapScan[date_dim(d2)] apply RFs: RF7 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[date_dim(d2)] apply RFs: RF7 +------------------------------------PhysicalOlapScan[date_dim(d3)] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[date_dim(d3)] +--------------------------------PhysicalOlapScan[promotion] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[promotion] +----------------------------PhysicalOlapScan[catalog_returns] ----------------------PhysicalProject ------------------------filter((household_demographics.hd_buy_potential = '1001-5000')) --------------------------PhysicalOlapScan[household_demographics]