diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/RequestPropertyDeriver.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/RequestPropertyDeriver.java index ef7d72b095..52b69399af 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/RequestPropertyDeriver.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/RequestPropertyDeriver.java @@ -22,6 +22,7 @@ import org.apache.doris.nereids.PlanContext; import org.apache.doris.nereids.jobs.JobContext; import org.apache.doris.nereids.memo.GroupExpression; import org.apache.doris.nereids.properties.DistributionSpecHash.ShuffleType; +import org.apache.doris.nereids.trees.expressions.Alias; import org.apache.doris.nereids.trees.expressions.ExprId; import org.apache.doris.nereids.trees.expressions.NamedExpression; import org.apache.doris.nereids.trees.expressions.SlotReference; @@ -33,11 +34,13 @@ import org.apache.doris.nereids.trees.plans.physical.PhysicalAssertNumRows; import org.apache.doris.nereids.trees.plans.physical.PhysicalCTEAnchor; import org.apache.doris.nereids.trees.plans.physical.PhysicalDeferMaterializeResultSink; import org.apache.doris.nereids.trees.plans.physical.PhysicalFileSink; +import org.apache.doris.nereids.trees.plans.physical.PhysicalFilter; import org.apache.doris.nereids.trees.plans.physical.PhysicalHashJoin; import org.apache.doris.nereids.trees.plans.physical.PhysicalLimit; import org.apache.doris.nereids.trees.plans.physical.PhysicalNestedLoopJoin; import org.apache.doris.nereids.trees.plans.physical.PhysicalOlapTableSink; import org.apache.doris.nereids.trees.plans.physical.PhysicalPartitionTopN; +import org.apache.doris.nereids.trees.plans.physical.PhysicalProject; import org.apache.doris.nereids.trees.plans.physical.PhysicalResultSink; import org.apache.doris.nereids.trees.plans.physical.PhysicalSetOperation; import org.apache.doris.nereids.trees.plans.physical.PhysicalUnion; @@ -47,9 +50,12 @@ import org.apache.doris.qe.ConnectContext; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; +import com.google.common.collect.Maps; import java.util.List; +import java.util.Map; import java.util.stream.Collectors; /** @@ -275,6 +281,50 @@ public class RequestPropertyDeriver extends PlanVisitor { return null; } + @Override + public Void visitPhysicalProject(PhysicalProject project, PlanContext context) { + DistributionSpec parentDist = requestPropertyFromParent.getDistributionSpec(); + if (!(parentDist instanceof DistributionSpecHash)) { + return super.visitPhysicalProject(project, context); + } + DistributionSpecHash hashDist = (DistributionSpecHash) parentDist; + Map exprIdToProjection = project.getProjects().stream() + .collect(Collectors.toMap(NamedExpression::getExprId, n -> n, (n1, n2) -> n1)); + Map exprIdMap = Maps.newHashMap(); + for (ExprId exprId : hashDist.getExprIdToEquivalenceSet().keySet()) { + if (!exprIdToProjection.containsKey(exprId)) { + return super.visitPhysicalProject(project, context); + } + NamedExpression projection = exprIdToProjection.get(exprId); + if (projection instanceof Alias) { + if (((Alias) projection).child() instanceof SlotReference) { + exprIdMap.put(exprId, ((SlotReference) ((Alias) projection).child()).getExprId()); + } else { + return super.visitPhysicalProject(project, context); + } + } else if (projection instanceof SlotReference) { + exprIdMap.put(exprId, exprId); + } else { + return super.visitPhysicalProject(project, context); + } + } + addRequestPropertyToChildren(PhysicalProperties.ANY); + addRequestPropertyToChildren(new PhysicalProperties( + hashDist.project(exprIdMap, ImmutableSet.of(), DistributionSpecAny.INSTANCE))); + return null; + } + + @Override + public Void visitPhysicalFilter(PhysicalFilter filter, PlanContext context) { + DistributionSpec parentDist = requestPropertyFromParent.getDistributionSpec(); + if (!(parentDist instanceof DistributionSpecHash)) { + return super.visitPhysicalFilter(filter, context); + } + addRequestPropertyToChildren(PhysicalProperties.ANY); + addRequestPropertyToChildren(new PhysicalProperties(parentDist)); + return null; + } + @Override public Void visitPhysicalFileSink(PhysicalFileSink fileSink, PlanContext context) { addRequestPropertyToChildren(PhysicalProperties.GATHER); diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query17.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query17.out index a9ca31b6e2..6fe2631fc2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query17.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query17.out @@ -19,8 +19,8 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) --------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute -----------------------PhysicalProject +--------------------PhysicalProject +----------------------PhysicalDistribute ------------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF6 s_store_sk->[ss_store_sk] --------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[ss_item_sk] ----------------------------PhysicalDistribute diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query24.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query24.out index 467ba7d635..f07e48b8f0 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query24.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query24.out @@ -8,9 +8,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF5 sr_item_sk->[ss_item_sk];RF6 sr_ticket_number->[ss_ticket_number] -----------------PhysicalDistribute -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] +----------------PhysicalProject +------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] +--------------------PhysicalDistribute ----------------------hashJoin[INNER_JOIN] hashCondition=((store.s_zip = customer_address.ca_zip) and (store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ca_zip->[s_zip];RF3 c_customer_sk->[ss_customer_sk] ------------------------PhysicalDistribute --------------------------PhysicalProject @@ -29,9 +29,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------------PhysicalDistribute ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer_address] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------PhysicalOlapScan[item] +--------------------PhysicalDistribute +----------------------PhysicalProject +------------------------PhysicalOlapScan[item] ----------------PhysicalDistribute ------------------PhysicalProject --------------------PhysicalOlapScan[store_returns] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query25.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query25.out index fca0fef64c..7422ef1f1b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query25.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query25.out @@ -18,8 +18,8 @@ PhysicalResultSink --------------------------PhysicalProject ----------------------------filter((d3.d_moy <= 10) and (d3.d_moy >= 4) and (d3.d_year = 1999)) ------------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute ---------------------PhysicalProject +------------------PhysicalProject +--------------------PhysicalDistribute ----------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF6 s_store_sk->[ss_store_sk] ------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[ss_item_sk] --------------------------PhysicalDistribute diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query33.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query33.out index 4b3ccd3fcf..5989257c15 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query33.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query33.out @@ -9,93 +9,93 @@ PhysicalResultSink ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalProject -------------------hashAgg[GLOBAL] +------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF3 i_manufact_id->[i_manufact_id] --------------------PhysicalDistribute -----------------------hashAgg[LOCAL] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ss_addr_sk] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 -----------------------------------------PhysicalDistribute -------------------------------------------PhysicalProject ---------------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2001)) -----------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) -----------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute -------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF0 i_manufact_id->[i_manufact_id] +----------------------PhysicalProject +------------------------filter((item.i_category = 'Books')) +--------------------------PhysicalOlapScan[item] apply RFs: RF3 +--------------------hashAgg[GLOBAL] +----------------------PhysicalDistribute +------------------------hashAgg[LOCAL] +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +------------------------------PhysicalDistribute --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] apply RFs: RF0 ---------------------------------PhysicalDistribute -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Books')) ---------------------------------------PhysicalOlapScan[item] +----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalProject +----------------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2001)) +------------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) +------------------------------------------PhysicalOlapScan[customer_address] +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject -------------------hashAgg[GLOBAL] +------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF7 i_manufact_id->[i_manufact_id] --------------------PhysicalDistribute -----------------------hashAgg[LOCAL] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[cs_bill_addr_sk] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 -----------------------------------------PhysicalDistribute -------------------------------------------PhysicalProject ---------------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2001)) -----------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) -----------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute -------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF4 i_manufact_id->[i_manufact_id] +----------------------PhysicalProject +------------------------filter((item.i_category = 'Books')) +--------------------------PhysicalOlapScan[item] apply RFs: RF7 +--------------------hashAgg[GLOBAL] +----------------------PhysicalDistribute +------------------------hashAgg[LOCAL] +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] +------------------------------PhysicalDistribute --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] apply RFs: RF4 ---------------------------------PhysicalDistribute -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Books')) ---------------------------------------PhysicalOlapScan[item] +----------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[cs_bill_addr_sk] +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 RF6 +------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalProject +----------------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2001)) +------------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) +------------------------------------------PhysicalOlapScan[customer_address] +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject -------------------hashAgg[GLOBAL] +------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF11 i_manufact_id->[i_manufact_id] --------------------PhysicalDistribute -----------------------hashAgg[LOCAL] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_bill_addr_sk] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 RF11 -----------------------------------------PhysicalDistribute -------------------------------------------PhysicalProject ---------------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2001)) -----------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) -----------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute -------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF8 i_manufact_id->[i_manufact_id] +----------------------PhysicalProject +------------------------filter((item.i_category = 'Books')) +--------------------------PhysicalOlapScan[item] apply RFs: RF11 +--------------------hashAgg[GLOBAL] +----------------------PhysicalDistribute +------------------------hashAgg[LOCAL] +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ws_item_sk] +------------------------------PhysicalDistribute --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] apply RFs: RF8 ---------------------------------PhysicalDistribute -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Books')) ---------------------------------------PhysicalOlapScan[item] +----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[ws_bill_addr_sk] +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 RF10 +------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalProject +----------------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2001)) +------------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) +------------------------------------------PhysicalOlapScan[customer_address] +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query47.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query47.out index b853af385b..13becca105 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query47.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query47.out @@ -7,8 +7,8 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute -----------------PhysicalProject +--------------PhysicalProject +----------------PhysicalDistribute ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute ----------------------hashAgg[LOCAL] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query57.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query57.out index df6ac1abdd..23f840ef0c 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query57.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query57.out @@ -7,8 +7,8 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute -----------------PhysicalProject +--------------PhysicalProject +----------------PhysicalDistribute ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute ----------------------hashAgg[LOCAL] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query89.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query89.out index 07b4889ada..f1b4e84536 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query89.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query89.out @@ -9,8 +9,8 @@ PhysicalResultSink ------------filter((if(( not (avg_monthly_sales = 0.0000)), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000)) --------------PhysicalWindow ----------------PhysicalQuickSort[LOCAL_SORT] -------------------PhysicalDistribute ---------------------PhysicalProject +------------------PhysicalProject +--------------------PhysicalDistribute ----------------------hashAgg[GLOBAL] ------------------------PhysicalDistribute --------------------------hashAgg[LOCAL] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query1.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query1.out index 8b0038cf33..400e67a5da 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query1.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query1.out @@ -19,9 +19,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = ctr1.ctr_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ctr_store_sk] +------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE))) --------------PhysicalProject -----------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE))) +----------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = ctr1.ctr_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ctr_store_sk] ------------------PhysicalDistribute --------------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ctr_customer_sk] ----------------------PhysicalDistribute @@ -29,14 +29,14 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------PhysicalDistribute ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer] -------------------hashAgg[GLOBAL] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------filter((store.s_state = 'SD')) +------------------------PhysicalOlapScan[store] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute +------------------hashAgg[LOCAL] --------------------PhysicalDistribute -----------------------hashAgg[LOCAL] -------------------------PhysicalDistribute ---------------------------PhysicalProject -----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalDistribute -----------------PhysicalProject -------------------filter((store.s_state = 'SD')) ---------------------PhysicalOlapScan[store] +----------------------PhysicalProject +------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query37.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query37.out index c385358a41..0c15104a50 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query37.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query37.out @@ -12,9 +12,9 @@ PhysicalResultSink ------------------PhysicalDistribute --------------------PhysicalProject ----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 -------------------PhysicalDistribute ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] +----------------------PhysicalDistribute ------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk] --------------------------PhysicalProject ----------------------------filter((inventory.inv_quantity_on_hand <= 500) and (inventory.inv_quantity_on_hand >= 100)) @@ -23,8 +23,8 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '1999-04-22') and (date_dim.d_date >= '1999-02-21')) --------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute ---------------------------PhysicalProject -----------------------------filter((item.i_current_price <= 75.00) and (item.i_current_price >= 45.00) and i_manufact_id IN (1000, 707, 747, 856)) -------------------------------PhysicalOlapScan[item] +----------------------PhysicalDistribute +------------------------PhysicalProject +--------------------------filter((item.i_current_price <= 75.00) and (item.i_current_price >= 45.00) and i_manufact_id IN (1000, 707, 747, 856)) +----------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query39.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query39.out index c96febe88c..ab47ceb335 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query39.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query39.out @@ -4,25 +4,24 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------filter((if((mean = 0), 0, (stdev / mean)) > 1)) ---------hashAgg[GLOBAL] -----------PhysicalDistribute -------------hashAgg[LOCAL] ---------------PhysicalProject -----------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() -------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() -------------------------PhysicalOlapScan[inventory] apply RFs: RF1 -------------------------PhysicalDistribute ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------filter((date_dim.d_year = 1998) and d_moy IN (1, 2)) ---------------------------PhysicalOlapScan[date_dim] +--------hashAgg[LOCAL] +----------PhysicalProject +------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() +--------------PhysicalDistribute +----------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() +----------------------PhysicalOlapScan[inventory] apply RFs: RF1 +----------------------PhysicalDistribute +------------------------PhysicalProject +--------------------------PhysicalOlapScan[item] ------------------PhysicalDistribute --------------------PhysicalProject -----------------------PhysicalOlapScan[warehouse] +----------------------filter((date_dim.d_year = 1998) and d_moy IN (1, 2)) +------------------------PhysicalOlapScan[date_dim] +--------------PhysicalDistribute +----------------PhysicalProject +------------------PhysicalOlapScan[warehouse] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] ------PhysicalDistribute diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query46.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query46.out index 04b461fb20..d80df89216 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query46.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query46.out @@ -11,33 +11,32 @@ PhysicalResultSink ----------------hashJoin[INNER_JOIN] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() ------------------PhysicalDistribute --------------------PhysicalProject -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] -------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] ---------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -------------------------------------------PhysicalDistribute ---------------------------------------------PhysicalProject -----------------------------------------------filter(d_dow IN (0, 6) and d_year IN (1999, 2000, 2001)) -------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------PhysicalDistribute +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +------------------------------------PhysicalProject +--------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject -------------------------------------------filter(((household_demographics.hd_dep_count = 6) OR (household_demographics.hd_vehicle_count = 0))) ---------------------------------------------PhysicalOlapScan[household_demographics] +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +----------------------------------------PhysicalDistribute +------------------------------------------PhysicalProject +--------------------------------------------filter(d_dow IN (0, 6) and d_year IN (1999, 2000, 2001)) +----------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalDistribute --------------------------------------PhysicalProject -----------------------------------------filter(s_city IN ('Centerville', 'Fairview', 'Five Points', 'Liberty', 'Oak Grove')) -------------------------------------------PhysicalOlapScan[store] ---------------------------------PhysicalDistribute -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer_address] +----------------------------------------filter(((household_demographics.hd_dep_count = 6) OR (household_demographics.hd_vehicle_count = 0))) +------------------------------------------PhysicalOlapScan[household_demographics] +----------------------------------PhysicalDistribute +------------------------------------PhysicalProject +--------------------------------------filter(s_city IN ('Centerville', 'Fairview', 'Five Points', 'Liberty', 'Oak Grove')) +----------------------------------------PhysicalOlapScan[store] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[customer_address] ------------------PhysicalDistribute --------------------PhysicalProject ----------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query65.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query65.out index 1c31961c47..2ccd3a7b64 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query65.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query65.out @@ -5,9 +5,9 @@ PhysicalResultSink ----PhysicalDistribute ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=() +----------hashJoin[INNER_JOIN] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DOUBLE) <= cast((0.1 * ave) as DOUBLE))) build RFs:RF4 ss_store_sk->[ss_store_sk] ------------PhysicalProject ---------------hashJoin[INNER_JOIN] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DOUBLE) <= cast((0.1 * ave) as DOUBLE))) build RFs:RF3 ss_store_sk->[ss_store_sk] +--------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=() ----------------PhysicalDistribute ------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=() --------------------hashAgg[GLOBAL] @@ -16,7 +16,7 @@ PhysicalResultSink --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF3 +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF4 ------------------------------PhysicalDistribute --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) @@ -24,22 +24,22 @@ PhysicalResultSink --------------------PhysicalDistribute ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashAgg[GLOBAL] ---------------------------PhysicalDistribute -----------------------------hashAgg[LOCAL] +----------------PhysicalDistribute +------------------PhysicalProject +--------------------PhysicalOlapScan[store] +------------hashAgg[GLOBAL] +--------------PhysicalDistribute +----------------hashAgg[LOCAL] +------------------PhysicalProject +--------------------hashAgg[GLOBAL] +----------------------PhysicalDistribute +------------------------hashAgg[LOCAL] +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) -----------------------------------------PhysicalOlapScan[date_dim] -------------PhysicalDistribute ---------------PhysicalProject -----------------PhysicalOlapScan[store] +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) +------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query68.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query68.out index b9d8e6d3a3..becdba20be 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query68.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query68.out @@ -11,33 +11,32 @@ PhysicalResultSink ----------------hashJoin[INNER_JOIN] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() ------------------PhysicalDistribute --------------------PhysicalProject -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] -------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] ---------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -------------------------------------------PhysicalDistribute ---------------------------------------------PhysicalProject -----------------------------------------------filter((date_dim.d_dom <= 2) and (date_dim.d_dom >= 1) and d_year IN (1998, 1999, 2000)) -------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------PhysicalDistribute +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +------------------------------------PhysicalProject +--------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject -------------------------------------------filter(((household_demographics.hd_dep_count = 8) OR (household_demographics.hd_vehicle_count = -1))) ---------------------------------------------PhysicalOlapScan[household_demographics] +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +----------------------------------------PhysicalDistribute +------------------------------------------PhysicalProject +--------------------------------------------filter((date_dim.d_dom <= 2) and (date_dim.d_dom >= 1) and d_year IN (1998, 1999, 2000)) +----------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalDistribute --------------------------------------PhysicalProject -----------------------------------------filter(s_city IN ('Five Points', 'Pleasant Hill')) -------------------------------------------PhysicalOlapScan[store] ---------------------------------PhysicalDistribute -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer_address] +----------------------------------------filter(((household_demographics.hd_dep_count = 8) OR (household_demographics.hd_vehicle_count = -1))) +------------------------------------------PhysicalOlapScan[household_demographics] +----------------------------------PhysicalDistribute +------------------------------------PhysicalProject +--------------------------------------filter(s_city IN ('Five Points', 'Pleasant Hill')) +----------------------------------------PhysicalOlapScan[store] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[customer_address] ------------------PhysicalDistribute --------------------PhysicalProject ----------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query77.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query77.out index a25d7bcded..13fd3a801e 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query77.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query77.out @@ -13,28 +13,27 @@ PhysicalResultSink --------------------PhysicalProject ----------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((ss.s_store_sk = sr.s_store_sk)) otherCondition=() ------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 -----------------------------------------PhysicalDistribute -------------------------------------------PhysicalProject ---------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) -----------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +--------------------------hashAgg[LOCAL] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store] -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_store_sk = store.s_store_sk)) otherCondition=() +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 +--------------------------------------PhysicalDistribute +----------------------------------------PhysicalProject +------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) +--------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------hashAgg[LOCAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_store_sk = store.s_store_sk)) otherCondition=() +----------------------------------PhysicalDistribute ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] ----------------------------------------PhysicalProject @@ -43,9 +42,9 @@ PhysicalResultSink ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ----------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store] +----------------------------------PhysicalDistribute +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[store] --------------------PhysicalProject ----------------------NestedLoopJoin[CROSS_JOIN] ------------------------PhysicalProject @@ -76,28 +75,27 @@ PhysicalResultSink --------------------PhysicalProject ----------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((ws.wp_web_page_sk = wr.wp_web_page_sk)) otherCondition=() ------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF9 wp_web_page_sk->[ws_web_page_sk] -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 -----------------------------------------PhysicalDistribute -------------------------------------------PhysicalProject ---------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) -----------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +--------------------------hashAgg[LOCAL] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF9 wp_web_page_sk->[ws_web_page_sk] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[web_page] -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF7 wp_web_page_sk->[wr_web_page_sk] +----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 +--------------------------------------PhysicalDistribute +----------------------------------------PhysicalProject +------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) +--------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[web_page] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------hashAgg[LOCAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF7 wp_web_page_sk->[wr_web_page_sk] +----------------------------------PhysicalDistribute ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[wr_returned_date_sk] ----------------------------------------PhysicalProject @@ -106,7 +104,7 @@ PhysicalResultSink ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ----------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[web_page] +----------------------------------PhysicalDistribute +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[web_page] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query82.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query82.out index a9891820a3..e5b1ee4038 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query82.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query82.out @@ -12,9 +12,9 @@ PhysicalResultSink ------------------PhysicalDistribute --------------------PhysicalProject ----------------------PhysicalOlapScan[store_sales] apply RFs: RF2 -------------------PhysicalDistribute ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] +----------------------PhysicalDistribute ------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk] --------------------------PhysicalProject ----------------------------filter((inventory.inv_quantity_on_hand <= 500) and (inventory.inv_quantity_on_hand >= 100)) @@ -23,8 +23,8 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '1999-09-07') and (date_dim.d_date >= '1999-07-09')) --------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute ---------------------------PhysicalProject -----------------------------filter((item.i_current_price <= 47.00) and (item.i_current_price >= 17.00) and i_manufact_id IN (138, 169, 339, 639)) -------------------------------PhysicalOlapScan[item] +----------------------PhysicalDistribute +------------------------PhysicalProject +--------------------------filter((item.i_current_price <= 47.00) and (item.i_current_price >= 17.00) and i_manufact_id IN (138, 169, 339, 639)) +----------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query1.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query1.out index 8b0038cf33..400e67a5da 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query1.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query1.out @@ -19,9 +19,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = ctr1.ctr_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ctr_store_sk] +------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE))) --------------PhysicalProject -----------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE))) +----------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = ctr1.ctr_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ctr_store_sk] ------------------PhysicalDistribute --------------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ctr_customer_sk] ----------------------PhysicalDistribute @@ -29,14 +29,14 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------PhysicalDistribute ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer] -------------------hashAgg[GLOBAL] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------filter((store.s_state = 'SD')) +------------------------PhysicalOlapScan[store] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute +------------------hashAgg[LOCAL] --------------------PhysicalDistribute -----------------------hashAgg[LOCAL] -------------------------PhysicalDistribute ---------------------------PhysicalProject -----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalDistribute -----------------PhysicalProject -------------------filter((store.s_state = 'SD')) ---------------------PhysicalOlapScan[store] +----------------------PhysicalProject +------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query37.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query37.out index c385358a41..0c15104a50 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query37.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query37.out @@ -12,9 +12,9 @@ PhysicalResultSink ------------------PhysicalDistribute --------------------PhysicalProject ----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 -------------------PhysicalDistribute ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] +----------------------PhysicalDistribute ------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk] --------------------------PhysicalProject ----------------------------filter((inventory.inv_quantity_on_hand <= 500) and (inventory.inv_quantity_on_hand >= 100)) @@ -23,8 +23,8 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '1999-04-22') and (date_dim.d_date >= '1999-02-21')) --------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute ---------------------------PhysicalProject -----------------------------filter((item.i_current_price <= 75.00) and (item.i_current_price >= 45.00) and i_manufact_id IN (1000, 707, 747, 856)) -------------------------------PhysicalOlapScan[item] +----------------------PhysicalDistribute +------------------------PhysicalProject +--------------------------filter((item.i_current_price <= 75.00) and (item.i_current_price >= 45.00) and i_manufact_id IN (1000, 707, 747, 856)) +----------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query39.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query39.out index cdd758313a..5822f2b3c2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query39.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query39.out @@ -4,25 +4,24 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------filter((if((mean = 0), 0, (stdev / mean)) > 1)) ---------hashAgg[GLOBAL] -----------PhysicalDistribute -------------hashAgg[LOCAL] ---------------PhysicalProject -----------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF2 w_warehouse_sk->[inv_warehouse_sk] -------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] -------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2 -------------------------PhysicalDistribute ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] ---------------------PhysicalDistribute -----------------------PhysicalProject -------------------------filter((date_dim.d_year = 1998) and d_moy IN (1, 2)) ---------------------------PhysicalOlapScan[date_dim] +--------hashAgg[LOCAL] +----------PhysicalProject +------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF2 w_warehouse_sk->[inv_warehouse_sk] +--------------PhysicalDistribute +----------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] +----------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2 +----------------------PhysicalDistribute +------------------------PhysicalProject +--------------------------PhysicalOlapScan[item] ------------------PhysicalDistribute --------------------PhysicalProject -----------------------PhysicalOlapScan[warehouse] +----------------------filter((date_dim.d_year = 1998) and d_moy IN (1, 2)) +------------------------PhysicalOlapScan[date_dim] +--------------PhysicalDistribute +----------------PhysicalProject +------------------PhysicalOlapScan[warehouse] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] ------PhysicalDistribute diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query46.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query46.out index dd973723ac..478db9b52a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query46.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query46.out @@ -11,33 +11,32 @@ PhysicalResultSink ----------------hashJoin[INNER_JOIN] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] ------------------PhysicalDistribute --------------------PhysicalProject -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ss_addr_sk] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] -------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] ---------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 -------------------------------------------PhysicalDistribute ---------------------------------------------PhysicalProject -----------------------------------------------filter(d_dow IN (0, 6) and d_year IN (1999, 2000, 2001)) -------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------PhysicalDistribute +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ss_addr_sk] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +------------------------------------PhysicalProject +--------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject -------------------------------------------filter(((household_demographics.hd_dep_count = 6) OR (household_demographics.hd_vehicle_count = 0))) ---------------------------------------------PhysicalOlapScan[household_demographics] +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 +----------------------------------------PhysicalDistribute +------------------------------------------PhysicalProject +--------------------------------------------filter(d_dow IN (0, 6) and d_year IN (1999, 2000, 2001)) +----------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalDistribute --------------------------------------PhysicalProject -----------------------------------------filter(s_city IN ('Centerville', 'Fairview', 'Five Points', 'Liberty', 'Oak Grove')) -------------------------------------------PhysicalOlapScan[store] ---------------------------------PhysicalDistribute -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer_address] +----------------------------------------filter(((household_demographics.hd_dep_count = 6) OR (household_demographics.hd_vehicle_count = 0))) +------------------------------------------PhysicalOlapScan[household_demographics] +----------------------------------PhysicalDistribute +------------------------------------PhysicalProject +--------------------------------------filter(s_city IN ('Centerville', 'Fairview', 'Five Points', 'Liberty', 'Oak Grove')) +----------------------------------------PhysicalOlapScan[store] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[customer_address] ------------------PhysicalDistribute --------------------PhysicalProject ----------------------PhysicalOlapScan[customer] apply RFs: RF5 diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query65.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query65.out index 8ee05d0a26..ab0f422a10 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query65.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query65.out @@ -5,9 +5,9 @@ PhysicalResultSink ----PhysicalDistribute ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=() build RFs:RF4 s_store_sk->[ss_store_sk] +----------hashJoin[INNER_JOIN] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DOUBLE) <= cast((0.1 * ave) as DOUBLE))) build RFs:RF4 ss_store_sk->[ss_store_sk] ------------PhysicalProject ---------------hashJoin[INNER_JOIN] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DOUBLE) <= cast((0.1 * ave) as DOUBLE))) build RFs:RF3 ss_store_sk->[ss_store_sk] +--------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] ----------------PhysicalDistribute ------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] --------------------hashAgg[GLOBAL] @@ -24,22 +24,22 @@ PhysicalResultSink --------------------PhysicalDistribute ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashAgg[GLOBAL] ---------------------------PhysicalDistribute -----------------------------hashAgg[LOCAL] +----------------PhysicalDistribute +------------------PhysicalProject +--------------------PhysicalOlapScan[store] +------------hashAgg[GLOBAL] +--------------PhysicalDistribute +----------------hashAgg[LOCAL] +------------------PhysicalProject +--------------------hashAgg[GLOBAL] +----------------------PhysicalDistribute +------------------------hashAgg[LOCAL] +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) -----------------------------------------PhysicalOlapScan[date_dim] -------------PhysicalDistribute ---------------PhysicalProject -----------------PhysicalOlapScan[store] +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) +------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query68.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query68.out index a9067c6eb5..6e468ca21d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query68.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query68.out @@ -11,33 +11,32 @@ PhysicalResultSink ----------------hashJoin[INNER_JOIN] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] ------------------PhysicalDistribute --------------------PhysicalProject -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ss_addr_sk] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] -------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] ---------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 -------------------------------------------PhysicalDistribute ---------------------------------------------PhysicalProject -----------------------------------------------filter((date_dim.d_dom <= 2) and (date_dim.d_dom >= 1) and d_year IN (1998, 1999, 2000)) -------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------PhysicalDistribute +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ss_addr_sk] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +------------------------------------PhysicalProject +--------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject -------------------------------------------filter(((household_demographics.hd_dep_count = 8) OR (household_demographics.hd_vehicle_count = -1))) ---------------------------------------------PhysicalOlapScan[household_demographics] +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 +----------------------------------------PhysicalDistribute +------------------------------------------PhysicalProject +--------------------------------------------filter((date_dim.d_dom <= 2) and (date_dim.d_dom >= 1) and d_year IN (1998, 1999, 2000)) +----------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalDistribute --------------------------------------PhysicalProject -----------------------------------------filter(s_city IN ('Five Points', 'Pleasant Hill')) -------------------------------------------PhysicalOlapScan[store] ---------------------------------PhysicalDistribute -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer_address] +----------------------------------------filter(((household_demographics.hd_dep_count = 8) OR (household_demographics.hd_vehicle_count = -1))) +------------------------------------------PhysicalOlapScan[household_demographics] +----------------------------------PhysicalDistribute +------------------------------------PhysicalProject +--------------------------------------filter(s_city IN ('Five Points', 'Pleasant Hill')) +----------------------------------------PhysicalOlapScan[store] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[customer_address] ------------------PhysicalDistribute --------------------PhysicalProject ----------------------PhysicalOlapScan[customer] apply RFs: RF5 diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query77.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query77.out index 49dbb5aeab..b3c8305593 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query77.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query77.out @@ -13,28 +13,27 @@ PhysicalResultSink --------------------PhysicalProject ----------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((ss.s_store_sk = sr.s_store_sk)) otherCondition=() ------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 -----------------------------------------PhysicalDistribute -------------------------------------------PhysicalProject ---------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) -----------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +--------------------------hashAgg[LOCAL] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store] -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[sr_store_sk] +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 +--------------------------------------PhysicalDistribute +----------------------------------------PhysicalProject +------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) +--------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------hashAgg[LOCAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[sr_store_sk] +----------------------------------PhysicalDistribute ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] ----------------------------------------PhysicalProject @@ -43,9 +42,9 @@ PhysicalResultSink ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ----------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store] +----------------------------------PhysicalDistribute +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[store] --------------------PhysicalProject ----------------------NestedLoopJoin[CROSS_JOIN] ------------------------PhysicalProject @@ -76,28 +75,27 @@ PhysicalResultSink --------------------PhysicalProject ----------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((ws.wp_web_page_sk = wr.wp_web_page_sk)) otherCondition=() ------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF9 wp_web_page_sk->[ws_web_page_sk] -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 -----------------------------------------PhysicalDistribute -------------------------------------------PhysicalProject ---------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) -----------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +--------------------------hashAgg[LOCAL] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF9 wp_web_page_sk->[ws_web_page_sk] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[web_page] -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF7 wp_web_page_sk->[wr_web_page_sk] +----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 +--------------------------------------PhysicalDistribute +----------------------------------------PhysicalProject +------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) +--------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[web_page] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------hashAgg[LOCAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF7 wp_web_page_sk->[wr_web_page_sk] +----------------------------------PhysicalDistribute ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[wr_returned_date_sk] ----------------------------------------PhysicalProject @@ -106,7 +104,7 @@ PhysicalResultSink ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ----------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[web_page] +----------------------------------PhysicalDistribute +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[web_page] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query82.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query82.out index a9891820a3..e5b1ee4038 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query82.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query82.out @@ -12,9 +12,9 @@ PhysicalResultSink ------------------PhysicalDistribute --------------------PhysicalProject ----------------------PhysicalOlapScan[store_sales] apply RFs: RF2 -------------------PhysicalDistribute ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] +----------------------PhysicalDistribute ------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk] --------------------------PhysicalProject ----------------------------filter((inventory.inv_quantity_on_hand <= 500) and (inventory.inv_quantity_on_hand >= 100)) @@ -23,8 +23,8 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------filter((date_dim.d_date <= '1999-09-07') and (date_dim.d_date >= '1999-07-09')) --------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute ---------------------------PhysicalProject -----------------------------filter((item.i_current_price <= 47.00) and (item.i_current_price >= 17.00) and i_manufact_id IN (138, 169, 339, 639)) -------------------------------PhysicalOlapScan[item] +----------------------PhysicalDistribute +------------------------PhysicalProject +--------------------------filter((item.i_current_price <= 47.00) and (item.i_current_price >= 17.00) and i_manufact_id IN (138, 169, 339, 639)) +----------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query17.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query17.out index 050c26304b..8f0b805f6e 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query17.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query17.out @@ -19,8 +19,8 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) --------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute -----------------------PhysicalProject +--------------------PhysicalProject +----------------------PhysicalDistribute ------------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() --------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() ----------------------------PhysicalDistribute diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query24.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query24.out index c15f6c92a3..e8ad4ab923 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query24.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query24.out @@ -8,9 +8,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() -----------------PhysicalDistribute -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() +----------------PhysicalProject +------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() +--------------------PhysicalDistribute ----------------------hashJoin[INNER_JOIN] hashCondition=((store.s_zip = customer_address.ca_zip) and (store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() ------------------------PhysicalDistribute --------------------------PhysicalProject @@ -29,9 +29,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------------PhysicalDistribute ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer_address] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------PhysicalOlapScan[item] +--------------------PhysicalDistribute +----------------------PhysicalProject +------------------------PhysicalOlapScan[item] ----------------PhysicalDistribute ------------------PhysicalProject --------------------PhysicalOlapScan[store_returns] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query25.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query25.out index 7e87daacbc..610a113c74 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query25.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query25.out @@ -18,8 +18,8 @@ PhysicalResultSink --------------------------PhysicalProject ----------------------------filter((d3.d_moy <= 10) and (d3.d_moy >= 4) and (d3.d_year = 2000)) ------------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute ---------------------PhysicalProject +------------------PhysicalProject +--------------------PhysicalDistribute ----------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() ------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() --------------------------PhysicalDistribute diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query33.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query33.out index 1b3dccd334..7ed55c113a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query33.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query33.out @@ -9,74 +9,78 @@ PhysicalResultSink ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalProject -------------------hashAgg[GLOBAL] +------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF3 i_manufact_id->[i_manufact_id] --------------------PhysicalDistribute -----------------------hashAgg[LOCAL] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ss_addr_sk] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 -----------------------------------------PhysicalDistribute -------------------------------------------PhysicalProject ---------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) -----------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) -----------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute -------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF0 i_manufact_id->[i_manufact_id] +----------------------PhysicalProject +------------------------filter((item.i_category = 'Home')) +--------------------------PhysicalOlapScan[item] apply RFs: RF3 +--------------------hashAgg[GLOBAL] +----------------------PhysicalDistribute +------------------------hashAgg[LOCAL] +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() +------------------------------PhysicalDistribute --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] apply RFs: RF0 ---------------------------------PhysicalDistribute -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Home')) ---------------------------------------PhysicalOlapScan[item] -----------------PhysicalProject -------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute -----------------------hashAgg[LOCAL] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[cs_bill_addr_sk] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 -----------------------------------------PhysicalDistribute +----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------------------PhysicalProject ---------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) -----------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) -----------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute -------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF4 i_manufact_id->[i_manufact_id] +--------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalProject +----------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) +------------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) +------------------------------------------PhysicalOlapScan[customer_address] +------------------------------PhysicalDistribute --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] apply RFs: RF4 ---------------------------------PhysicalDistribute -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Home')) ---------------------------------------PhysicalOlapScan[item] +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject -------------------hashAgg[GLOBAL] +------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF7 i_manufact_id->[i_manufact_id] --------------------PhysicalDistribute -----------------------hashAgg[LOCAL] -------------------------PhysicalProject ---------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF11 i_manufact_id->[i_manufact_id] +----------------------PhysicalProject +------------------------filter((item.i_category = 'Home')) +--------------------------PhysicalOlapScan[item] apply RFs: RF7 +--------------------hashAgg[GLOBAL] +----------------------PhysicalDistribute +------------------------hashAgg[LOCAL] +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[cs_bill_addr_sk] +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 RF6 +------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalProject +----------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) +------------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) +------------------------------------------PhysicalOlapScan[customer_address] +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[item] +----------------PhysicalProject +------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF11 i_manufact_id->[i_manufact_id] +--------------------PhysicalDistribute +----------------------PhysicalProject +------------------------filter((item.i_category = 'Home')) +--------------------------PhysicalOlapScan[item] apply RFs: RF11 +--------------------hashAgg[GLOBAL] +----------------------PhysicalDistribute +------------------------hashAgg[LOCAL] +--------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 ws_item_sk->[i_item_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[item] apply RFs: RF10 RF11 +--------------------------------PhysicalOlapScan[item] apply RFs: RF10 ------------------------------PhysicalDistribute --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[ws_bill_addr_sk] @@ -93,8 +97,4 @@ PhysicalResultSink --------------------------------------PhysicalProject ----------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ------------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------filter((item.i_category = 'Home')) -----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query39.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query39.out index 414bf43582..a105c7bec9 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query39.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query39.out @@ -4,25 +4,24 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------filter((if((mean = 0), 0, (stdev / mean)) > 1)) ---------hashAgg[GLOBAL] -----------PhysicalDistribute -------------hashAgg[LOCAL] ---------------PhysicalProject -----------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() -----------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk] -------------------------PhysicalOlapScan[inventory] apply RFs: RF0 -------------------------PhysicalDistribute ---------------------------PhysicalProject -----------------------------filter((date_dim.d_year = 1998) and d_moy IN (1, 2)) -------------------------------PhysicalOlapScan[date_dim] +--------hashAgg[LOCAL] +----------PhysicalProject +------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() +--------------PhysicalDistribute +----------------PhysicalProject +------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() +--------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk] +----------------------PhysicalOlapScan[inventory] apply RFs: RF0 ----------------------PhysicalDistribute ------------------------PhysicalProject ---------------------------PhysicalOlapScan[item] -------------------PhysicalDistribute ---------------------PhysicalProject -----------------------PhysicalOlapScan[warehouse] +--------------------------filter((date_dim.d_year = 1998) and d_moy IN (1, 2)) +----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalDistribute +----------------------PhysicalProject +------------------------PhysicalOlapScan[item] +--------------PhysicalDistribute +----------------PhysicalProject +------------------PhysicalOlapScan[warehouse] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] ------PhysicalDistribute diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query57.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query57.out index 229cf1936a..c53df8f4e6 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query57.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query57.out @@ -7,8 +7,8 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute -----------------PhysicalProject +--------------PhysicalProject +----------------PhysicalDistribute ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute ----------------------hashAgg[LOCAL] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query72.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query72.out index cb73cf0233..9f007e62aa 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query72.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query72.out @@ -19,40 +19,39 @@ PhysicalResultSink ----------------------------PhysicalDistribute ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_week_seq = d2.d_week_seq)) otherCondition=() -----------------------------------PhysicalProject -------------------------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() ---------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() -------------------------------------------PhysicalDistribute ---------------------------------------------PhysicalProject -----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_ship_date_sk = d3.d_date_sk)) otherCondition=((d3.d_date > days_add(d_date, INTERVAL 5 DAY))) -------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF2 cd_demo_sk->[cs_bill_cdemo_sk] ---------------------------------------------------PhysicalDistribute -----------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] -------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF0 hd_demo_sk->[cs_bill_hdemo_sk] ---------------------------------------------------------PhysicalProject -----------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 ---------------------------------------------------------PhysicalDistribute -----------------------------------------------------------PhysicalProject -------------------------------------------------------------filter((household_demographics.hd_buy_potential = '501-1000')) ---------------------------------------------------------------PhysicalOlapScan[household_demographics] +----------------------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() +------------------------------------PhysicalProject +--------------------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() +----------------------------------------PhysicalDistribute +------------------------------------------PhysicalProject +--------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_ship_date_sk = d3.d_date_sk)) otherCondition=((d3.d_date > days_add(d_date, INTERVAL 5 DAY))) +----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF2 cd_demo_sk->[cs_bill_cdemo_sk] +------------------------------------------------PhysicalDistribute +--------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] +----------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF0 hd_demo_sk->[cs_bill_hdemo_sk] +------------------------------------------------------PhysicalProject +--------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 ------------------------------------------------------PhysicalDistribute --------------------------------------------------------PhysicalProject -----------------------------------------------------------filter((d1.d_year = 2002)) -------------------------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 ---------------------------------------------------PhysicalDistribute -----------------------------------------------------PhysicalProject -------------------------------------------------------filter((customer_demographics.cd_marital_status = 'W')) ---------------------------------------------------------PhysicalOlapScan[customer_demographics] +----------------------------------------------------------filter((household_demographics.hd_buy_potential = '501-1000')) +------------------------------------------------------------PhysicalOlapScan[household_demographics] +----------------------------------------------------PhysicalDistribute +------------------------------------------------------PhysicalProject +--------------------------------------------------------filter((d1.d_year = 2002)) +----------------------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 ------------------------------------------------PhysicalDistribute --------------------------------------------------PhysicalProject -----------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------------PhysicalDistribute ---------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[item] ---------------------------------------PhysicalDistribute -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[promotion] +----------------------------------------------------filter((customer_demographics.cd_marital_status = 'W')) +------------------------------------------------------PhysicalOlapScan[customer_demographics] +----------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalProject +--------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalDistribute +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[item] +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[promotion] ----------------------------------PhysicalDistribute ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query77.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query77.out index a25d7bcded..abe938dcd8 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query77.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query77.out @@ -93,20 +93,19 @@ PhysicalResultSink --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_page] ------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF7 wp_web_page_sk->[wr_web_page_sk] -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[wr_returned_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 RF7 -----------------------------------------PhysicalDistribute -------------------------------------------PhysicalProject ---------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) -----------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +--------------------------hashAgg[LOCAL] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF7 wp_web_page_sk->[wr_web_page_sk] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[wr_returned_date_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[web_page] +----------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 RF7 +--------------------------------------PhysicalDistribute +----------------------------------------PhysicalProject +------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) +--------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[web_page] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query17.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query17.out index a9ca31b6e2..6fe2631fc2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query17.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query17.out @@ -19,8 +19,8 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) --------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute -----------------------PhysicalProject +--------------------PhysicalProject +----------------------PhysicalDistribute ------------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF6 s_store_sk->[ss_store_sk] --------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[ss_item_sk] ----------------------------PhysicalDistribute diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query24.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query24.out index 893c2c0b7e..485880ab7e 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query24.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query24.out @@ -8,9 +8,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------hashAgg[LOCAL] ------------PhysicalProject --------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF5 sr_item_sk->[ss_item_sk];RF6 sr_ticket_number->[ss_ticket_number] -----------------PhysicalDistribute -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] +----------------PhysicalProject +------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] +--------------------PhysicalDistribute ----------------------hashJoin[INNER_JOIN] hashCondition=((store.s_zip = customer_address.ca_zip) and (store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ca_zip->[s_zip];RF3 c_customer_sk->[ss_customer_sk] ------------------------PhysicalDistribute --------------------------PhysicalProject @@ -29,9 +29,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------------PhysicalDistribute ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer_address] -----------------------PhysicalDistribute -------------------------PhysicalProject ---------------------------PhysicalOlapScan[item] +--------------------PhysicalDistribute +----------------------PhysicalProject +------------------------PhysicalOlapScan[item] ----------------PhysicalDistribute ------------------PhysicalProject --------------------PhysicalOlapScan[store_returns] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query25.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query25.out index d1188acc23..0f3f59ab4e 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query25.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query25.out @@ -18,8 +18,8 @@ PhysicalResultSink --------------------------PhysicalProject ----------------------------filter((d3.d_moy <= 10) and (d3.d_moy >= 4) and (d3.d_year = 2000)) ------------------------------PhysicalOlapScan[date_dim] -------------------PhysicalDistribute ---------------------PhysicalProject +------------------PhysicalProject +--------------------PhysicalDistribute ----------------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF6 s_store_sk->[ss_store_sk] ------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[ss_item_sk] --------------------------PhysicalDistribute diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query33.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query33.out index 1b3dccd334..a8cc78c96d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query33.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query33.out @@ -9,74 +9,78 @@ PhysicalResultSink ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalProject -------------------hashAgg[GLOBAL] +------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF3 i_manufact_id->[i_manufact_id] --------------------PhysicalDistribute -----------------------hashAgg[LOCAL] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ss_addr_sk] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 -----------------------------------------PhysicalDistribute -------------------------------------------PhysicalProject ---------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) -----------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) -----------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute -------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF0 i_manufact_id->[i_manufact_id] +----------------------PhysicalProject +------------------------filter((item.i_category = 'Home')) +--------------------------PhysicalOlapScan[item] apply RFs: RF3 +--------------------hashAgg[GLOBAL] +----------------------PhysicalDistribute +------------------------hashAgg[LOCAL] +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +------------------------------PhysicalDistribute --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] apply RFs: RF0 ---------------------------------PhysicalDistribute -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Home')) ---------------------------------------PhysicalOlapScan[item] -----------------PhysicalProject -------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute -----------------------hashAgg[LOCAL] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[cs_bill_addr_sk] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 -----------------------------------------PhysicalDistribute +----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------------------PhysicalProject ---------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) -----------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalDistribute -------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) -----------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute -------------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF4 i_manufact_id->[i_manufact_id] +--------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalProject +----------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) +------------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) +------------------------------------------PhysicalOlapScan[customer_address] +------------------------------PhysicalDistribute --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] apply RFs: RF4 ---------------------------------PhysicalDistribute -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Home')) ---------------------------------------PhysicalOlapScan[item] +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject -------------------hashAgg[GLOBAL] +------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF7 i_manufact_id->[i_manufact_id] --------------------PhysicalDistribute -----------------------hashAgg[LOCAL] -------------------------PhysicalProject ---------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF11 i_manufact_id->[i_manufact_id] +----------------------PhysicalProject +------------------------filter((item.i_category = 'Home')) +--------------------------PhysicalOlapScan[item] apply RFs: RF7 +--------------------hashAgg[GLOBAL] +----------------------PhysicalDistribute +------------------------hashAgg[LOCAL] +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[cs_bill_addr_sk] +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 RF6 +------------------------------------------PhysicalDistribute +--------------------------------------------PhysicalProject +----------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) +------------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) +------------------------------------------PhysicalOlapScan[customer_address] +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[item] +----------------PhysicalProject +------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF11 i_manufact_id->[i_manufact_id] +--------------------PhysicalDistribute +----------------------PhysicalProject +------------------------filter((item.i_category = 'Home')) +--------------------------PhysicalOlapScan[item] apply RFs: RF11 +--------------------hashAgg[GLOBAL] +----------------------PhysicalDistribute +------------------------hashAgg[LOCAL] +--------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 ws_item_sk->[i_item_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[item] apply RFs: RF10 RF11 +--------------------------------PhysicalOlapScan[item] apply RFs: RF10 ------------------------------PhysicalDistribute --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[ws_bill_addr_sk] @@ -93,8 +97,4 @@ PhysicalResultSink --------------------------------------PhysicalProject ----------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ------------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalDistribute -------------------------------PhysicalProject ---------------------------------filter((item.i_category = 'Home')) -----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query39.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query39.out index 7e25a27c4d..3743c5863b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query39.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query39.out @@ -4,25 +4,24 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject ------filter((if((mean = 0), 0, (stdev / mean)) > 1)) ---------hashAgg[GLOBAL] -----------PhysicalDistribute -------------hashAgg[LOCAL] ---------------PhysicalProject -----------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF2 w_warehouse_sk->[inv_warehouse_sk] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] -----------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk] -------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2 -------------------------PhysicalDistribute ---------------------------PhysicalProject -----------------------------filter((date_dim.d_year = 1998) and d_moy IN (1, 2)) -------------------------------PhysicalOlapScan[date_dim] +--------hashAgg[LOCAL] +----------PhysicalProject +------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF2 w_warehouse_sk->[inv_warehouse_sk] +--------------PhysicalDistribute +----------------PhysicalProject +------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] +--------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk] +----------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2 ----------------------PhysicalDistribute ------------------------PhysicalProject ---------------------------PhysicalOlapScan[item] -------------------PhysicalDistribute ---------------------PhysicalProject -----------------------PhysicalOlapScan[warehouse] +--------------------------filter((date_dim.d_year = 1998) and d_moy IN (1, 2)) +----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalDistribute +----------------------PhysicalProject +------------------------PhysicalOlapScan[item] +--------------PhysicalDistribute +----------------PhysicalProject +------------------PhysicalOlapScan[warehouse] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] ------PhysicalDistribute diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query57.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query57.out index da1132baa9..fc6a269407 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query57.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query57.out @@ -7,8 +7,8 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute -----------------PhysicalProject +--------------PhysicalProject +----------------PhysicalDistribute ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute ----------------------hashAgg[LOCAL] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query72.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query72.out index e9370fe109..a034f3f4fb 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query72.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query72.out @@ -19,40 +19,39 @@ PhysicalResultSink ----------------------------PhysicalDistribute ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((d1.d_week_seq = d2.d_week_seq)) otherCondition=() build RFs:RF5 d_week_seq->[d_week_seq] -----------------------------------PhysicalProject -------------------------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() ---------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[cs_item_sk] -------------------------------------------PhysicalDistribute ---------------------------------------------PhysicalProject -----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_ship_date_sk = d3.d_date_sk)) otherCondition=((d3.d_date > days_add(d_date, INTERVAL 5 DAY))) build RFs:RF3 d_date_sk->[cs_ship_date_sk] -------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF2 cd_demo_sk->[cs_bill_cdemo_sk] ---------------------------------------------------PhysicalDistribute -----------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] -------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF0 hd_demo_sk->[cs_bill_hdemo_sk] ---------------------------------------------------------PhysicalProject -----------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 ---------------------------------------------------------PhysicalDistribute -----------------------------------------------------------PhysicalProject -------------------------------------------------------------filter((household_demographics.hd_buy_potential = '501-1000')) ---------------------------------------------------------------PhysicalOlapScan[household_demographics] +----------------------------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() +------------------------------------PhysicalProject +--------------------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[cs_item_sk] +----------------------------------------PhysicalDistribute +------------------------------------------PhysicalProject +--------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_ship_date_sk = d3.d_date_sk)) otherCondition=((d3.d_date > days_add(d_date, INTERVAL 5 DAY))) build RFs:RF3 d_date_sk->[cs_ship_date_sk] +----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF2 cd_demo_sk->[cs_bill_cdemo_sk] +------------------------------------------------PhysicalDistribute +--------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] +----------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_bill_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF0 hd_demo_sk->[cs_bill_hdemo_sk] +------------------------------------------------------PhysicalProject +--------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 ------------------------------------------------------PhysicalDistribute --------------------------------------------------------PhysicalProject -----------------------------------------------------------filter((d1.d_year = 2002)) -------------------------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 ---------------------------------------------------PhysicalDistribute -----------------------------------------------------PhysicalProject -------------------------------------------------------filter((customer_demographics.cd_marital_status = 'W')) ---------------------------------------------------------PhysicalOlapScan[customer_demographics] +----------------------------------------------------------filter((household_demographics.hd_buy_potential = '501-1000')) +------------------------------------------------------------PhysicalOlapScan[household_demographics] +----------------------------------------------------PhysicalDistribute +------------------------------------------------------PhysicalProject +--------------------------------------------------------filter((d1.d_year = 2002)) +----------------------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 ------------------------------------------------PhysicalDistribute --------------------------------------------------PhysicalProject -----------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------------PhysicalDistribute ---------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[item] ---------------------------------------PhysicalDistribute -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[promotion] +----------------------------------------------------filter((customer_demographics.cd_marital_status = 'W')) +------------------------------------------------------PhysicalOlapScan[customer_demographics] +----------------------------------------------PhysicalDistribute +------------------------------------------------PhysicalProject +--------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------PhysicalDistribute +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[item] +------------------------------------PhysicalDistribute +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[promotion] ----------------------------------PhysicalDistribute ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query77.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query77.out index 49dbb5aeab..5a5a9c657a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query77.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query77.out @@ -93,20 +93,19 @@ PhysicalResultSink --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_page] ------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF7 wp_web_page_sk->[wr_web_page_sk] -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[wr_returned_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 RF7 -----------------------------------------PhysicalDistribute -------------------------------------------PhysicalProject ---------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) -----------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalDistribute +--------------------------hashAgg[LOCAL] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF7 wp_web_page_sk->[wr_web_page_sk] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[wr_returned_date_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[web_page] +----------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 RF7 +--------------------------------------PhysicalDistribute +----------------------------------------PhysicalProject +------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) +--------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[web_page]