[minor](Nereids): enable PushDownTopNDistinctThroughJoin (#30275)

This commit is contained in:
jakevin
2024-01-24 22:19:28 +08:00
committed by yiguolei
parent 15728756e2
commit bee6ae73c7
11 changed files with 573 additions and 408 deletions

View File

@ -109,6 +109,7 @@ import org.apache.doris.nereids.rules.rewrite.PushDownMinMaxThroughJoin;
import org.apache.doris.nereids.rules.rewrite.PushDownSumThroughJoin;
import org.apache.doris.nereids.rules.rewrite.PushDownSumThroughJoinOneSide;
import org.apache.doris.nereids.rules.rewrite.PushDownTopNDistinctThroughJoin;
import org.apache.doris.nereids.rules.rewrite.PushDownTopNDistinctThroughUnion;
import org.apache.doris.nereids.rules.rewrite.PushDownTopNThroughJoin;
import org.apache.doris.nereids.rules.rewrite.PushDownTopNThroughUnion;
import org.apache.doris.nereids.rules.rewrite.PushDownTopNThroughWindow;
@ -334,7 +335,7 @@ public class Rewriter extends AbstractBatchJobExecutor {
new PushDownLimitDistinctThroughJoin(),
new PushDownLimitDistinctThroughUnion(),
new PushDownTopNDistinctThroughJoin(),
// new PushDownTopNDistinctThroughUnion(),
new PushDownTopNDistinctThroughUnion(),
new PushDownTopNThroughJoin(),
new PushDownTopNThroughWindow(),
new PushDownTopNThroughUnion()

View File

@ -271,8 +271,7 @@ public enum RuleType {
PUSH_DOWN_TOP_N_THROUGH_PROJECT_WINDOW(RuleTypeClass.REWRITE),
PUSH_DOWN_TOP_N_THROUGH_WINDOW(RuleTypeClass.REWRITE),
PUSH_DOWN_TOP_N_THROUGH_UNION(RuleTypeClass.REWRITE),
PUSH_DOWN_TOP_N_LIMIT_THROUGH_UNION(RuleTypeClass.REWRITE),
// limit distinct push down
PUSH_DOWN_TOP_N_DISTINCT_THROUGH_UNION(RuleTypeClass.REWRITE),
PUSH_DOWN_LIMIT_DISTINCT_THROUGH_JOIN(RuleTypeClass.REWRITE),
PUSH_DOWN_LIMIT_DISTINCT_THROUGH_PROJECT_JOIN(RuleTypeClass.REWRITE),
PUSH_DOWN_LIMIT_DISTINCT_THROUGH_UNION(RuleTypeClass.REWRITE),

View File

@ -28,6 +28,7 @@ import org.apache.doris.nereids.trees.plans.logical.LogicalAggregate;
import org.apache.doris.nereids.trees.plans.logical.LogicalTopN;
import org.apache.doris.nereids.trees.plans.logical.LogicalUnion;
import org.apache.doris.nereids.util.ExpressionUtils;
import org.apache.doris.nereids.util.PlanUtils;
import com.google.common.collect.ImmutableList;
@ -73,20 +74,19 @@ public class PushDownTopNDistinctThroughUnion implements RewriteRuleFactory {
NamedExpression output = union.getOutputs().get(i);
replaceMap.put(output, child.getOutput().get(i));
}
List<OrderKey> orderKeys = topN.getOrderKeys().stream()
.map(orderKey -> orderKey.withExpression(
ExpressionUtils.replace(orderKey.getExpr(), replaceMap)))
.collect(ImmutableList.toImmutableList());
newChildren.add(
new LogicalTopN<>(orderKeys, topN.getLimit() + topN.getOffset(), 0, child));
newChildren.add(new LogicalTopN<>(orderKeys, topN.getLimit() + topN.getOffset(), 0,
PlanUtils.distinct(child)));
}
if (union.children().equals(newChildren)) {
return null;
}
return topN.withChildren(agg.withChildren(union.withChildren(newChildren)));
})
.toRule(RuleType.PUSH_DOWN_TOP_N_THROUGH_UNION)
.toRule(RuleType.PUSH_DOWN_TOP_N_DISTINCT_THROUGH_UNION)
);
}
}

View File

@ -73,7 +73,11 @@ public class PlanUtils {
}
public static LogicalAggregate<Plan> distinct(Plan plan) {
return new LogicalAggregate<>(ImmutableList.copyOf(plan.getOutput()), false, plan);
if (plan instanceof LogicalAggregate && ((LogicalAggregate<?>) plan).isDistinct()) {
return (LogicalAggregate<Plan>) plan;
} else {
return new LogicalAggregate<>(ImmutableList.copyOf(plan.getOutput()), false, plan);
}
}
/**

View File

@ -6,8 +6,14 @@ PhysicalResultSink
------hashAgg[GLOBAL]
--------hashAgg[LOCAL]
----------PhysicalUnion
------------PhysicalOlapScan[table2]
------------PhysicalOlapScan[table2]
------------PhysicalTopN[MERGE_SORT]
--------------PhysicalTopN[LOCAL_SORT]
----------------hashAgg[LOCAL]
------------------PhysicalOlapScan[table2]
------------PhysicalTopN[MERGE_SORT]
--------------PhysicalTopN[LOCAL_SORT]
----------------hashAgg[LOCAL]
------------------PhysicalOlapScan[table2]
-- !push_down_topn_union_with_conditions --
PhysicalResultSink
@ -16,12 +22,21 @@ PhysicalResultSink
------hashAgg[GLOBAL]
--------hashAgg[LOCAL]
----------PhysicalUnion
------------filter((t1.score > 10))
--------------PhysicalOlapScan[table2]
------------filter((t2.name = 'Test'))
--------------PhysicalOlapScan[table2]
------------filter((t3.id < 5))
--------------PhysicalOlapScan[table2]
------------PhysicalTopN[MERGE_SORT]
--------------PhysicalTopN[LOCAL_SORT]
----------------hashAgg[LOCAL]
------------------filter((t1.score > 10))
--------------------PhysicalOlapScan[table2]
------------PhysicalTopN[MERGE_SORT]
--------------PhysicalTopN[LOCAL_SORT]
----------------hashAgg[LOCAL]
------------------filter((t2.name = 'Test'))
--------------------PhysicalOlapScan[table2]
------------PhysicalTopN[MERGE_SORT]
--------------PhysicalTopN[LOCAL_SORT]
----------------hashAgg[LOCAL]
------------------filter((t3.id < 5))
--------------------PhysicalOlapScan[table2]
-- !push_down_topn_union_with_order_by --
PhysicalResultSink
@ -30,9 +45,18 @@ PhysicalResultSink
------hashAgg[GLOBAL]
--------hashAgg[LOCAL]
----------PhysicalUnion
------------PhysicalOlapScan[table2]
------------PhysicalOlapScan[table2]
------------PhysicalOlapScan[table2]
------------PhysicalTopN[MERGE_SORT]
--------------PhysicalTopN[LOCAL_SORT]
----------------hashAgg[LOCAL]
------------------PhysicalOlapScan[table2]
------------PhysicalTopN[MERGE_SORT]
--------------PhysicalTopN[LOCAL_SORT]
----------------hashAgg[LOCAL]
------------------PhysicalOlapScan[table2]
------------PhysicalTopN[MERGE_SORT]
--------------PhysicalTopN[LOCAL_SORT]
----------------hashAgg[LOCAL]
------------------PhysicalOlapScan[table2]
-- !push_down_topn_nested_union --
PhysicalResultSink
@ -41,10 +65,22 @@ PhysicalResultSink
------hashAgg[GLOBAL]
--------hashAgg[LOCAL]
----------PhysicalUnion
------------PhysicalOlapScan[table2]
------------PhysicalOlapScan[table2]
------------PhysicalOlapScan[table2]
------------PhysicalOlapScan[table2]
------------PhysicalTopN[MERGE_SORT]
--------------PhysicalTopN[LOCAL_SORT]
----------------hashAgg[LOCAL]
------------------PhysicalOlapScan[table2]
------------PhysicalTopN[MERGE_SORT]
--------------PhysicalTopN[LOCAL_SORT]
----------------hashAgg[LOCAL]
------------------PhysicalOlapScan[table2]
------------PhysicalTopN[MERGE_SORT]
--------------PhysicalTopN[LOCAL_SORT]
----------------hashAgg[LOCAL]
------------------PhysicalOlapScan[table2]
------------PhysicalTopN[MERGE_SORT]
--------------PhysicalTopN[LOCAL_SORT]
----------------hashAgg[LOCAL]
------------------PhysicalOlapScan[table2]
-- !push_down_topn_union_after_join --
PhysicalResultSink
@ -53,10 +89,16 @@ PhysicalResultSink
------hashAgg[GLOBAL]
--------hashAgg[LOCAL]
----------PhysicalUnion
------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
--------------PhysicalOlapScan[table2]
--------------PhysicalOlapScan[table2]
------------PhysicalOlapScan[table2]
------------PhysicalTopN[MERGE_SORT]
--------------PhysicalTopN[LOCAL_SORT]
----------------hashAgg[LOCAL]
------------------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
--------------------PhysicalOlapScan[table2]
--------------------PhysicalOlapScan[table2]
------------PhysicalTopN[MERGE_SORT]
--------------PhysicalTopN[LOCAL_SORT]
----------------hashAgg[LOCAL]
------------------PhysicalOlapScan[table2]
-- !push_down_topn_union_different_projections --
PhysicalResultSink
@ -65,8 +107,16 @@ PhysicalResultSink
------hashAgg[GLOBAL]
--------hashAgg[LOCAL]
----------PhysicalUnion
------------PhysicalOlapScan[table2]
------------PhysicalOlapScan[table2]
------------PhysicalTopN[MERGE_SORT]
--------------PhysicalTopN[LOCAL_SORT]
----------------hashAgg[GLOBAL]
------------------hashAgg[LOCAL]
--------------------PhysicalOlapScan[table2]
------------PhysicalTopN[MERGE_SORT]
--------------PhysicalTopN[LOCAL_SORT]
----------------hashAgg[GLOBAL]
------------------hashAgg[LOCAL]
--------------------PhysicalOlapScan[table2]
-- !push_down_topn_union_with_subquery --
PhysicalResultSink
@ -75,9 +125,15 @@ PhysicalResultSink
------hashAgg[GLOBAL]
--------hashAgg[LOCAL]
----------PhysicalUnion
------------filter((table2.score > 20))
--------------PhysicalOlapScan[table2]
------------PhysicalOlapScan[table2]
------------PhysicalTopN[MERGE_SORT]
--------------PhysicalTopN[LOCAL_SORT]
----------------hashAgg[LOCAL]
------------------filter((table2.score > 20))
--------------------PhysicalOlapScan[table2]
------------PhysicalTopN[MERGE_SORT]
--------------PhysicalTopN[LOCAL_SORT]
----------------hashAgg[LOCAL]
------------------PhysicalOlapScan[table2]
-- !push_down_topn_union_with_limit --
PhysicalResultSink
@ -86,12 +142,20 @@ PhysicalResultSink
------hashAgg[GLOBAL]
--------hashAgg[LOCAL]
----------PhysicalUnion
------------PhysicalLimit[GLOBAL]
--------------PhysicalLimit[LOCAL]
----------------PhysicalOlapScan[table2]
------------PhysicalLimit[GLOBAL]
--------------PhysicalLimit[LOCAL]
----------------PhysicalOlapScan[table2]
------------PhysicalTopN[MERGE_SORT]
--------------PhysicalTopN[LOCAL_SORT]
----------------hashAgg[GLOBAL]
------------------hashAgg[LOCAL]
--------------------PhysicalLimit[GLOBAL]
----------------------PhysicalLimit[LOCAL]
------------------------PhysicalOlapScan[table2]
------------PhysicalTopN[MERGE_SORT]
--------------PhysicalTopN[LOCAL_SORT]
----------------hashAgg[GLOBAL]
------------------hashAgg[LOCAL]
--------------------PhysicalLimit[GLOBAL]
----------------------PhysicalLimit[LOCAL]
------------------------PhysicalOlapScan[table2]
-- !push_down_topn_union_complex_conditions --
PhysicalResultSink
@ -100,8 +164,14 @@ PhysicalResultSink
------hashAgg[GLOBAL]
--------hashAgg[LOCAL]
----------PhysicalUnion
------------filter((t1.name = 'Test') and (t1.score > 10))
--------------PhysicalOlapScan[table2]
------------filter((t2.id < 5) and (t2.score < 20))
--------------PhysicalOlapScan[table2]
------------PhysicalTopN[MERGE_SORT]
--------------PhysicalTopN[LOCAL_SORT]
----------------hashAgg[LOCAL]
------------------filter((t1.name = 'Test') and (t1.score > 10))
--------------------PhysicalOlapScan[table2]
------------PhysicalTopN[MERGE_SORT]
--------------PhysicalTopN[LOCAL_SORT]
----------------hashAgg[LOCAL]
------------------filter((t2.id < 5) and (t2.score < 20))
--------------------PhysicalOlapScan[table2]

View File

@ -9,81 +9,99 @@ PhysicalResultSink
------------hashAgg[LOCAL]
--------------PhysicalUnion
----------------PhysicalDistribute[DistributionSpecExecutionAny]
------------------PhysicalProject
--------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------PhysicalWindow
------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------PhysicalWindow
----------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------PhysicalProject
------------------------------------hashAgg[GLOBAL]
--------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------hashAgg[LOCAL]
------------------------------------------PhysicalProject
--------------------------------------------hashJoin[INNER_JOIN] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number];RF2 ws_item_sk->[wr_item_sk]
------------------PhysicalTopN[MERGE_SORT]
--------------------PhysicalDistribute[DistributionSpecGather]
----------------------PhysicalTopN[LOCAL_SORT]
------------------------hashAgg[GLOBAL]
--------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------hashAgg[LOCAL]
------------------------------PhysicalProject
--------------------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------------------PhysicalWindow
------------------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------------------PhysicalWindow
----------------------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------------------PhysicalProject
------------------------------------------------filter((wr.wr_return_amt > 10000.00))
--------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2
----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk]
------------------------------------------------PhysicalProject
--------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0))
----------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0
------------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
--------------------------------------------------PhysicalProject
----------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998))
------------------------------------------------------PhysicalOlapScan[date_dim]
------------------------------------------------hashAgg[GLOBAL]
--------------------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------------------hashAgg[LOCAL]
------------------------------------------------------PhysicalProject
--------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number];RF2 ws_item_sk->[wr_item_sk]
----------------------------------------------------------PhysicalProject
------------------------------------------------------------filter((wr.wr_return_amt > 10000.00))
--------------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2
----------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk]
------------------------------------------------------------PhysicalProject
--------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0))
----------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0
------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
--------------------------------------------------------------PhysicalProject
----------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998))
------------------------------------------------------------------PhysicalOlapScan[date_dim]
----------------PhysicalDistribute[DistributionSpecExecutionAny]
------------------PhysicalProject
--------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------PhysicalWindow
------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------PhysicalWindow
----------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------PhysicalProject
------------------------------------hashAgg[GLOBAL]
--------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------hashAgg[LOCAL]
------------------------------------------PhysicalProject
--------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF4 cs_order_number->[cr_order_number];RF5 cs_item_sk->[cr_item_sk]
------------------PhysicalTopN[MERGE_SORT]
--------------------PhysicalDistribute[DistributionSpecGather]
----------------------PhysicalTopN[LOCAL_SORT]
------------------------hashAgg[GLOBAL]
--------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------hashAgg[LOCAL]
------------------------------PhysicalProject
--------------------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------------------PhysicalWindow
------------------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------------------PhysicalWindow
----------------------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------------------PhysicalProject
------------------------------------------------filter((cr.cr_return_amount > 10000.00))
--------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5
----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
------------------------------------------------PhysicalProject
--------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0))
----------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3
------------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
--------------------------------------------------PhysicalProject
----------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998))
------------------------------------------------------PhysicalOlapScan[date_dim]
------------------------------------------------hashAgg[GLOBAL]
--------------------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------------------hashAgg[LOCAL]
------------------------------------------------------PhysicalProject
--------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF4 cs_order_number->[cr_order_number];RF5 cs_item_sk->[cr_item_sk]
----------------------------------------------------------PhysicalProject
------------------------------------------------------------filter((cr.cr_return_amount > 10000.00))
--------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5
----------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
------------------------------------------------------------PhysicalProject
--------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0))
----------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3
------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
--------------------------------------------------------------PhysicalProject
----------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998))
------------------------------------------------------------------PhysicalOlapScan[date_dim]
----------------PhysicalDistribute[DistributionSpecExecutionAny]
------------------PhysicalProject
--------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------PhysicalWindow
------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------PhysicalWindow
----------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------PhysicalProject
------------------------------------hashAgg[GLOBAL]
--------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------hashAgg[LOCAL]
------------------------------------------PhysicalProject
--------------------------------------------hashJoin[INNER_JOIN] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF7 ss_ticket_number->[sr_ticket_number];RF8 ss_item_sk->[sr_item_sk]
------------------PhysicalTopN[MERGE_SORT]
--------------------PhysicalDistribute[DistributionSpecGather]
----------------------PhysicalTopN[LOCAL_SORT]
------------------------hashAgg[GLOBAL]
--------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------hashAgg[LOCAL]
------------------------------PhysicalProject
--------------------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------------------PhysicalWindow
------------------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------------------PhysicalWindow
----------------------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------------------PhysicalProject
------------------------------------------------filter((sr.sr_return_amt > 10000.00))
--------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8
----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk]
------------------------------------------------PhysicalProject
--------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0))
----------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6
------------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
--------------------------------------------------PhysicalProject
----------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998))
------------------------------------------------------PhysicalOlapScan[date_dim]
------------------------------------------------hashAgg[GLOBAL]
--------------------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------------------hashAgg[LOCAL]
------------------------------------------------------PhysicalProject
--------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF7 ss_ticket_number->[sr_ticket_number];RF8 ss_item_sk->[sr_item_sk]
----------------------------------------------------------PhysicalProject
------------------------------------------------------------filter((sr.sr_return_amt > 10000.00))
--------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8
----------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk]
------------------------------------------------------------PhysicalProject
--------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0))
----------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6
------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
--------------------------------------------------------------PhysicalProject
----------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998))
------------------------------------------------------------------PhysicalOlapScan[date_dim]

View File

@ -9,84 +9,102 @@ PhysicalResultSink
------------hashAgg[LOCAL]
--------------PhysicalUnion
----------------PhysicalDistribute[DistributionSpecExecutionAny]
------------------PhysicalProject
--------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------PhysicalWindow
------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------PhysicalWindow
----------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------PhysicalProject
------------------------------------hashAgg[GLOBAL]
--------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------hashAgg[LOCAL]
------------------------------------------PhysicalProject
--------------------------------------------hashJoin[INNER_JOIN] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk]
------------------PhysicalTopN[MERGE_SORT]
--------------------PhysicalDistribute[DistributionSpecGather]
----------------------PhysicalTopN[LOCAL_SORT]
------------------------hashAgg[GLOBAL]
--------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------hashAgg[LOCAL]
------------------------------PhysicalProject
--------------------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------------------PhysicalWindow
------------------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------------------PhysicalWindow
----------------------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------------------PhysicalProject
------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF0 wr_order_number->[ws_order_number];RF1 wr_item_sk->[ws_item_sk]
--------------------------------------------------PhysicalProject
----------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0))
------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2
--------------------------------------------------PhysicalProject
----------------------------------------------------filter((wr.wr_return_amt > 10000.00))
------------------------------------------------------PhysicalOlapScan[web_returns]
----------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
------------------------------------------------PhysicalProject
--------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999))
----------------------------------------------------PhysicalOlapScan[date_dim]
------------------------------------------------hashAgg[GLOBAL]
--------------------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------------------hashAgg[LOCAL]
------------------------------------------------------PhysicalProject
--------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk]
----------------------------------------------------------PhysicalProject
------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF0 wr_order_number->[ws_order_number];RF1 wr_item_sk->[ws_item_sk]
--------------------------------------------------------------PhysicalProject
----------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0))
------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2
--------------------------------------------------------------PhysicalProject
----------------------------------------------------------------filter((wr.wr_return_amt > 10000.00))
------------------------------------------------------------------PhysicalOlapScan[web_returns]
----------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
------------------------------------------------------------PhysicalProject
--------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999))
----------------------------------------------------------------PhysicalOlapScan[date_dim]
----------------PhysicalDistribute[DistributionSpecExecutionAny]
------------------PhysicalProject
--------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------PhysicalWindow
------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------PhysicalWindow
----------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------PhysicalProject
------------------------------------hashAgg[GLOBAL]
--------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------hashAgg[LOCAL]
------------------------------------------PhysicalProject
--------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk]
------------------PhysicalTopN[MERGE_SORT]
--------------------PhysicalDistribute[DistributionSpecGather]
----------------------PhysicalTopN[LOCAL_SORT]
------------------------hashAgg[GLOBAL]
--------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------hashAgg[LOCAL]
------------------------------PhysicalProject
--------------------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------------------PhysicalWindow
------------------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------------------PhysicalWindow
----------------------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------------------PhysicalProject
------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF3 cr_order_number->[cs_order_number];RF4 cr_item_sk->[cs_item_sk]
--------------------------------------------------PhysicalProject
----------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0))
------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF5
--------------------------------------------------PhysicalProject
----------------------------------------------------filter((cr.cr_return_amount > 10000.00))
------------------------------------------------------PhysicalOlapScan[catalog_returns]
----------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
------------------------------------------------PhysicalProject
--------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999))
----------------------------------------------------PhysicalOlapScan[date_dim]
------------------------------------------------hashAgg[GLOBAL]
--------------------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------------------hashAgg[LOCAL]
------------------------------------------------------PhysicalProject
--------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk]
----------------------------------------------------------PhysicalProject
------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF3 cr_order_number->[cs_order_number];RF4 cr_item_sk->[cs_item_sk]
--------------------------------------------------------------PhysicalProject
----------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0))
------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF5
--------------------------------------------------------------PhysicalProject
----------------------------------------------------------------filter((cr.cr_return_amount > 10000.00))
------------------------------------------------------------------PhysicalOlapScan[catalog_returns]
----------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
------------------------------------------------------------PhysicalProject
--------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999))
----------------------------------------------------------------PhysicalOlapScan[date_dim]
----------------PhysicalDistribute[DistributionSpecExecutionAny]
------------------PhysicalProject
--------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------PhysicalWindow
------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------PhysicalWindow
----------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------PhysicalProject
------------------------------------hashAgg[GLOBAL]
--------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------hashAgg[LOCAL]
------------------------------------------PhysicalProject
--------------------------------------------hashJoin[INNER_JOIN] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk]
------------------PhysicalTopN[MERGE_SORT]
--------------------PhysicalDistribute[DistributionSpecGather]
----------------------PhysicalTopN[LOCAL_SORT]
------------------------hashAgg[GLOBAL]
--------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------hashAgg[LOCAL]
------------------------------PhysicalProject
--------------------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------------------PhysicalWindow
------------------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------------------PhysicalWindow
----------------------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------------------PhysicalProject
------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF6 sr_ticket_number->[ss_ticket_number];RF7 sr_item_sk->[ss_item_sk]
--------------------------------------------------PhysicalProject
----------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0))
------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8
--------------------------------------------------PhysicalProject
----------------------------------------------------filter((sr.sr_return_amt > 10000.00))
------------------------------------------------------PhysicalOlapScan[store_returns]
----------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
------------------------------------------------PhysicalProject
--------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999))
----------------------------------------------------PhysicalOlapScan[date_dim]
------------------------------------------------hashAgg[GLOBAL]
--------------------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------------------hashAgg[LOCAL]
------------------------------------------------------PhysicalProject
--------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk]
----------------------------------------------------------PhysicalProject
------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF6 sr_ticket_number->[ss_ticket_number];RF7 sr_item_sk->[ss_item_sk]
--------------------------------------------------------------PhysicalProject
----------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0))
------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8
--------------------------------------------------------------PhysicalProject
----------------------------------------------------------------filter((sr.sr_return_amt > 10000.00))
------------------------------------------------------------------PhysicalOlapScan[store_returns]
----------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
------------------------------------------------------------PhysicalProject
--------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999))
----------------------------------------------------------------PhysicalOlapScan[date_dim]

View File

@ -9,84 +9,102 @@ PhysicalResultSink
------------hashAgg[LOCAL]
--------------PhysicalUnion
----------------PhysicalDistribute[DistributionSpecExecutionAny]
------------------PhysicalProject
--------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------PhysicalWindow
------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------PhysicalWindow
----------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------PhysicalProject
------------------------------------hashAgg[GLOBAL]
--------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------hashAgg[LOCAL]
------------------------------------------PhysicalProject
--------------------------------------------hashJoin[INNER_JOIN] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk]
------------------PhysicalTopN[MERGE_SORT]
--------------------PhysicalDistribute[DistributionSpecGather]
----------------------PhysicalTopN[LOCAL_SORT]
------------------------hashAgg[GLOBAL]
--------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------hashAgg[LOCAL]
------------------------------PhysicalProject
--------------------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------------------PhysicalWindow
------------------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------------------PhysicalWindow
----------------------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------------------PhysicalProject
------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF0 wr_order_number->[ws_order_number];RF1 wr_item_sk->[ws_item_sk]
--------------------------------------------------PhysicalProject
----------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0))
------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2
--------------------------------------------------PhysicalProject
----------------------------------------------------filter((wr.wr_return_amt > 10000.00))
------------------------------------------------------PhysicalOlapScan[web_returns]
----------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
------------------------------------------------PhysicalProject
--------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999))
----------------------------------------------------PhysicalOlapScan[date_dim]
------------------------------------------------hashAgg[GLOBAL]
--------------------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------------------hashAgg[LOCAL]
------------------------------------------------------PhysicalProject
--------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk]
----------------------------------------------------------PhysicalProject
------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF0 wr_order_number->[ws_order_number];RF1 wr_item_sk->[ws_item_sk]
--------------------------------------------------------------PhysicalProject
----------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0))
------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2
--------------------------------------------------------------PhysicalProject
----------------------------------------------------------------filter((wr.wr_return_amt > 10000.00))
------------------------------------------------------------------PhysicalOlapScan[web_returns]
----------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
------------------------------------------------------------PhysicalProject
--------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999))
----------------------------------------------------------------PhysicalOlapScan[date_dim]
----------------PhysicalDistribute[DistributionSpecExecutionAny]
------------------PhysicalProject
--------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------PhysicalWindow
------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------PhysicalWindow
----------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------PhysicalProject
------------------------------------hashAgg[GLOBAL]
--------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------hashAgg[LOCAL]
------------------------------------------PhysicalProject
--------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk]
------------------PhysicalTopN[MERGE_SORT]
--------------------PhysicalDistribute[DistributionSpecGather]
----------------------PhysicalTopN[LOCAL_SORT]
------------------------hashAgg[GLOBAL]
--------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------hashAgg[LOCAL]
------------------------------PhysicalProject
--------------------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------------------PhysicalWindow
------------------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------------------PhysicalWindow
----------------------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------------------PhysicalProject
------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF3 cr_order_number->[cs_order_number];RF4 cr_item_sk->[cs_item_sk]
--------------------------------------------------PhysicalProject
----------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0))
------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF5
--------------------------------------------------PhysicalProject
----------------------------------------------------filter((cr.cr_return_amount > 10000.00))
------------------------------------------------------PhysicalOlapScan[catalog_returns]
----------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
------------------------------------------------PhysicalProject
--------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999))
----------------------------------------------------PhysicalOlapScan[date_dim]
------------------------------------------------hashAgg[GLOBAL]
--------------------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------------------hashAgg[LOCAL]
------------------------------------------------------PhysicalProject
--------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk]
----------------------------------------------------------PhysicalProject
------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF3 cr_order_number->[cs_order_number];RF4 cr_item_sk->[cs_item_sk]
--------------------------------------------------------------PhysicalProject
----------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0))
------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF5
--------------------------------------------------------------PhysicalProject
----------------------------------------------------------------filter((cr.cr_return_amount > 10000.00))
------------------------------------------------------------------PhysicalOlapScan[catalog_returns]
----------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
------------------------------------------------------------PhysicalProject
--------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999))
----------------------------------------------------------------PhysicalOlapScan[date_dim]
----------------PhysicalDistribute[DistributionSpecExecutionAny]
------------------PhysicalProject
--------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------PhysicalWindow
------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------PhysicalWindow
----------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------PhysicalProject
------------------------------------hashAgg[GLOBAL]
--------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------hashAgg[LOCAL]
------------------------------------------PhysicalProject
--------------------------------------------hashJoin[INNER_JOIN] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk]
------------------PhysicalTopN[MERGE_SORT]
--------------------PhysicalDistribute[DistributionSpecGather]
----------------------PhysicalTopN[LOCAL_SORT]
------------------------hashAgg[GLOBAL]
--------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------hashAgg[LOCAL]
------------------------------PhysicalProject
--------------------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------------------PhysicalWindow
------------------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------------------PhysicalWindow
----------------------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------------------PhysicalProject
------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF6 sr_ticket_number->[ss_ticket_number];RF7 sr_item_sk->[ss_item_sk]
--------------------------------------------------PhysicalProject
----------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0))
------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8
--------------------------------------------------PhysicalProject
----------------------------------------------------filter((sr.sr_return_amt > 10000.00))
------------------------------------------------------PhysicalOlapScan[store_returns]
----------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
------------------------------------------------PhysicalProject
--------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999))
----------------------------------------------------PhysicalOlapScan[date_dim]
------------------------------------------------hashAgg[GLOBAL]
--------------------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------------------hashAgg[LOCAL]
------------------------------------------------------PhysicalProject
--------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk]
----------------------------------------------------------PhysicalProject
------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF6 sr_ticket_number->[ss_ticket_number];RF7 sr_item_sk->[ss_item_sk]
--------------------------------------------------------------PhysicalProject
----------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0))
------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8
--------------------------------------------------------------PhysicalProject
----------------------------------------------------------------filter((sr.sr_return_amt > 10000.00))
------------------------------------------------------------------PhysicalOlapScan[store_returns]
----------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
------------------------------------------------------------PhysicalProject
--------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999))
----------------------------------------------------------------PhysicalOlapScan[date_dim]

View File

@ -9,81 +9,99 @@ PhysicalResultSink
------------hashAgg[LOCAL]
--------------PhysicalUnion
----------------PhysicalDistribute[DistributionSpecExecutionAny]
------------------PhysicalProject
--------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------PhysicalWindow
------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------PhysicalWindow
----------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------PhysicalProject
------------------------------------hashAgg[GLOBAL]
--------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------hashAgg[LOCAL]
------------------------------------------PhysicalProject
--------------------------------------------hashJoin[INNER_JOIN] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number];RF2 ws_item_sk->[wr_item_sk]
------------------PhysicalTopN[MERGE_SORT]
--------------------PhysicalDistribute[DistributionSpecGather]
----------------------PhysicalTopN[LOCAL_SORT]
------------------------hashAgg[GLOBAL]
--------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------hashAgg[LOCAL]
------------------------------PhysicalProject
--------------------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------------------PhysicalWindow
------------------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------------------PhysicalWindow
----------------------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------------------PhysicalProject
------------------------------------------------filter((wr.wr_return_amt > 10000.00))
--------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2
----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk]
------------------------------------------------PhysicalProject
--------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0))
----------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0
------------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
--------------------------------------------------PhysicalProject
----------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999))
------------------------------------------------------PhysicalOlapScan[date_dim]
------------------------------------------------hashAgg[GLOBAL]
--------------------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------------------hashAgg[LOCAL]
------------------------------------------------------PhysicalProject
--------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number];RF2 ws_item_sk->[wr_item_sk]
----------------------------------------------------------PhysicalProject
------------------------------------------------------------filter((wr.wr_return_amt > 10000.00))
--------------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2
----------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk]
------------------------------------------------------------PhysicalProject
--------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0))
----------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0
------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
--------------------------------------------------------------PhysicalProject
----------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999))
------------------------------------------------------------------PhysicalOlapScan[date_dim]
----------------PhysicalDistribute[DistributionSpecExecutionAny]
------------------PhysicalProject
--------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------PhysicalWindow
------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------PhysicalWindow
----------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------PhysicalProject
------------------------------------hashAgg[GLOBAL]
--------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------hashAgg[LOCAL]
------------------------------------------PhysicalProject
--------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF4 cs_order_number->[cr_order_number];RF5 cs_item_sk->[cr_item_sk]
------------------PhysicalTopN[MERGE_SORT]
--------------------PhysicalDistribute[DistributionSpecGather]
----------------------PhysicalTopN[LOCAL_SORT]
------------------------hashAgg[GLOBAL]
--------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------hashAgg[LOCAL]
------------------------------PhysicalProject
--------------------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------------------PhysicalWindow
------------------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------------------PhysicalWindow
----------------------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------------------PhysicalProject
------------------------------------------------filter((cr.cr_return_amount > 10000.00))
--------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5
----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
------------------------------------------------PhysicalProject
--------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0))
----------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3
------------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
--------------------------------------------------PhysicalProject
----------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999))
------------------------------------------------------PhysicalOlapScan[date_dim]
------------------------------------------------hashAgg[GLOBAL]
--------------------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------------------hashAgg[LOCAL]
------------------------------------------------------PhysicalProject
--------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF4 cs_order_number->[cr_order_number];RF5 cs_item_sk->[cr_item_sk]
----------------------------------------------------------PhysicalProject
------------------------------------------------------------filter((cr.cr_return_amount > 10000.00))
--------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5
----------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
------------------------------------------------------------PhysicalProject
--------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0))
----------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3
------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
--------------------------------------------------------------PhysicalProject
----------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999))
------------------------------------------------------------------PhysicalOlapScan[date_dim]
----------------PhysicalDistribute[DistributionSpecExecutionAny]
------------------PhysicalProject
--------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------PhysicalWindow
------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------PhysicalWindow
----------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------PhysicalProject
------------------------------------hashAgg[GLOBAL]
--------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------hashAgg[LOCAL]
------------------------------------------PhysicalProject
--------------------------------------------hashJoin[INNER_JOIN] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF7 ss_ticket_number->[sr_ticket_number];RF8 ss_item_sk->[sr_item_sk]
------------------PhysicalTopN[MERGE_SORT]
--------------------PhysicalDistribute[DistributionSpecGather]
----------------------PhysicalTopN[LOCAL_SORT]
------------------------hashAgg[GLOBAL]
--------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------hashAgg[LOCAL]
------------------------------PhysicalProject
--------------------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------------------PhysicalWindow
------------------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------------------PhysicalWindow
----------------------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------------------PhysicalProject
------------------------------------------------filter((sr.sr_return_amt > 10000.00))
--------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8
----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk]
------------------------------------------------PhysicalProject
--------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0))
----------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6
------------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
--------------------------------------------------PhysicalProject
----------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999))
------------------------------------------------------PhysicalOlapScan[date_dim]
------------------------------------------------hashAgg[GLOBAL]
--------------------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------------------hashAgg[LOCAL]
------------------------------------------------------PhysicalProject
--------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF7 ss_ticket_number->[sr_ticket_number];RF8 ss_item_sk->[sr_item_sk]
----------------------------------------------------------PhysicalProject
------------------------------------------------------------filter((sr.sr_return_amt > 10000.00))
--------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8
----------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk]
------------------------------------------------------------PhysicalProject
--------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0))
----------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6
------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
--------------------------------------------------------------PhysicalProject
----------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999))
------------------------------------------------------------------PhysicalOlapScan[date_dim]

View File

@ -9,81 +9,99 @@ PhysicalResultSink
------------hashAgg[LOCAL]
--------------PhysicalUnion
----------------PhysicalDistribute[DistributionSpecExecutionAny]
------------------PhysicalProject
--------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------PhysicalWindow
------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------PhysicalWindow
----------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------PhysicalProject
------------------------------------hashAgg[GLOBAL]
--------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------hashAgg[LOCAL]
------------------------------------------PhysicalProject
--------------------------------------------hashJoin[INNER_JOIN] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number];RF2 ws_item_sk->[wr_item_sk]
------------------PhysicalTopN[MERGE_SORT]
--------------------PhysicalDistribute[DistributionSpecGather]
----------------------PhysicalTopN[LOCAL_SORT]
------------------------hashAgg[GLOBAL]
--------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------hashAgg[LOCAL]
------------------------------PhysicalProject
--------------------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------------------PhysicalWindow
------------------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------------------PhysicalWindow
----------------------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------------------PhysicalProject
------------------------------------------------filter((wr.wr_return_amt > 10000.00))
--------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2
----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk]
------------------------------------------------PhysicalProject
--------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0))
----------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0
------------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
--------------------------------------------------PhysicalProject
----------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999))
------------------------------------------------------PhysicalOlapScan[date_dim]
------------------------------------------------hashAgg[GLOBAL]
--------------------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------------------hashAgg[LOCAL]
------------------------------------------------------PhysicalProject
--------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number];RF2 ws_item_sk->[wr_item_sk]
----------------------------------------------------------PhysicalProject
------------------------------------------------------------filter((wr.wr_return_amt > 10000.00))
--------------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2
----------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk]
------------------------------------------------------------PhysicalProject
--------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0))
----------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0
------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
--------------------------------------------------------------PhysicalProject
----------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999))
------------------------------------------------------------------PhysicalOlapScan[date_dim]
----------------PhysicalDistribute[DistributionSpecExecutionAny]
------------------PhysicalProject
--------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------PhysicalWindow
------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------PhysicalWindow
----------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------PhysicalProject
------------------------------------hashAgg[GLOBAL]
--------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------hashAgg[LOCAL]
------------------------------------------PhysicalProject
--------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF4 cs_order_number->[cr_order_number];RF5 cs_item_sk->[cr_item_sk]
------------------PhysicalTopN[MERGE_SORT]
--------------------PhysicalDistribute[DistributionSpecGather]
----------------------PhysicalTopN[LOCAL_SORT]
------------------------hashAgg[GLOBAL]
--------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------hashAgg[LOCAL]
------------------------------PhysicalProject
--------------------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------------------PhysicalWindow
------------------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------------------PhysicalWindow
----------------------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------------------PhysicalProject
------------------------------------------------filter((cr.cr_return_amount > 10000.00))
--------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5
----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
------------------------------------------------PhysicalProject
--------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0))
----------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3
------------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
--------------------------------------------------PhysicalProject
----------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999))
------------------------------------------------------PhysicalOlapScan[date_dim]
------------------------------------------------hashAgg[GLOBAL]
--------------------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------------------hashAgg[LOCAL]
------------------------------------------------------PhysicalProject
--------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF4 cs_order_number->[cr_order_number];RF5 cs_item_sk->[cr_item_sk]
----------------------------------------------------------PhysicalProject
------------------------------------------------------------filter((cr.cr_return_amount > 10000.00))
--------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5
----------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
------------------------------------------------------------PhysicalProject
--------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0))
----------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3
------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
--------------------------------------------------------------PhysicalProject
----------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999))
------------------------------------------------------------------PhysicalOlapScan[date_dim]
----------------PhysicalDistribute[DistributionSpecExecutionAny]
------------------PhysicalProject
--------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------PhysicalWindow
------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------PhysicalWindow
----------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------PhysicalProject
------------------------------------hashAgg[GLOBAL]
--------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------hashAgg[LOCAL]
------------------------------------------PhysicalProject
--------------------------------------------hashJoin[INNER_JOIN] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF7 ss_ticket_number->[sr_ticket_number];RF8 ss_item_sk->[sr_item_sk]
------------------PhysicalTopN[MERGE_SORT]
--------------------PhysicalDistribute[DistributionSpecGather]
----------------------PhysicalTopN[LOCAL_SORT]
------------------------hashAgg[GLOBAL]
--------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------hashAgg[LOCAL]
------------------------------PhysicalProject
--------------------------------filter(((return_rank <= 10) OR (currency_rank <= 10)))
----------------------------------PhysicalWindow
------------------------------------PhysicalQuickSort[LOCAL_SORT]
--------------------------------------PhysicalWindow
----------------------------------------PhysicalQuickSort[MERGE_SORT]
------------------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------------------PhysicalQuickSort[LOCAL_SORT]
----------------------------------------------PhysicalProject
------------------------------------------------filter((sr.sr_return_amt > 10000.00))
--------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8
----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk]
------------------------------------------------PhysicalProject
--------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0))
----------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6
------------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
--------------------------------------------------PhysicalProject
----------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999))
------------------------------------------------------PhysicalOlapScan[date_dim]
------------------------------------------------hashAgg[GLOBAL]
--------------------------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------------------------hashAgg[LOCAL]
------------------------------------------------------PhysicalProject
--------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF7 ss_ticket_number->[sr_ticket_number];RF8 ss_item_sk->[sr_item_sk]
----------------------------------------------------------PhysicalProject
------------------------------------------------------------filter((sr.sr_return_amt > 10000.00))
--------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8
----------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk]
------------------------------------------------------------PhysicalProject
--------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0))
----------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6
------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated]
--------------------------------------------------------------PhysicalProject
----------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999))
------------------------------------------------------------------PhysicalOlapScan[date_dim]

View File

@ -24,6 +24,7 @@ suite("order_push_down") {
sql "SET ignore_shape_nodes='PhysicalDistribute,PhysicalProject'"
sql "SET disable_join_reorder=true"
sql 'set be_number_for_test=3'
sql "set disable_nereids_rules='push_down_top_n_distinct_through_union'"
//`limit 1 offset 1 + sort, project`:
qt_limit_offset_sort_project """ explain shape plan SELECT t1.id FROM t1 ORDER BY id LIMIT 1 OFFSET 1; """