This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 78b81d41505bf3d629268f9c2c2d92167a01f8a7
Author: 谢健 <[email protected]>
AuthorDate: Thu Apr 11 15:00:00 2024 +0800

    [fix](test) remove distribute node of shape in some regression test (#33463)
---
 .../filter_push_down/push_filter_through.out       | 546 ++++++++-------------
 .../filter_push_down/push_filter_through.groovy    |  15 +-
 2 files changed, 220 insertions(+), 341 deletions(-)

diff --git 
a/regression-test/data/nereids_rules_p0/filter_push_down/push_filter_through.out
 
b/regression-test/data/nereids_rules_p0/filter_push_down/push_filter_through.out
index f32919b7411..4487907374c 100644
--- 
a/regression-test/data/nereids_rules_p0/filter_push_down/push_filter_through.out
+++ 
b/regression-test/data/nereids_rules_p0/filter_push_down/push_filter_through.out
@@ -1,9 +1,8 @@
 -- This file is automatically generated. You should know what you did if you 
want to edit this
 -- !filter_project_alias --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----filter((t1.id = 1))
-------PhysicalOlapScan[t1]
+--filter((t1.id = 1))
+----PhysicalOlapScan[t1]
 
 -- !filter_project_constant --
 PhysicalResultSink
@@ -11,58 +10,48 @@ PhysicalResultSink
 
 -- !filter_project_arithmetic --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----filter((cast(id as BIGINT) = 1))
-------PhysicalOlapScan[t1]
+--filter((cast(id as BIGINT) = 1))
+----PhysicalOlapScan[t1]
 
 -- !filter_order_by --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----filter((t.id = 1))
-------PhysicalOlapScan[t1]
+--filter((t.id = 1))
+----PhysicalOlapScan[t1]
 
 -- !filter_order_by_limit --
 PhysicalResultSink
 --filter((t.id = 1))
 ----PhysicalTopN[MERGE_SORT]
-------PhysicalDistribute[DistributionSpecGather]
---------PhysicalTopN[LOCAL_SORT]
-----------PhysicalOlapScan[t1]
+------PhysicalTopN[LOCAL_SORT]
+--------PhysicalOlapScan[t1]
 
 -- !filter_order_by_constant --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----filter((t.id = 1))
-------PhysicalOlapScan[t1]
+--filter((t.id = 1))
+----PhysicalOlapScan[t1]
 
 -- !filter_join_inner --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
-------filter((t1.id = 1))
---------PhysicalOlapScan[t1]
-------PhysicalDistribute[DistributionSpecHash]
---------filter((t2.id = 1))
-----------PhysicalOlapScan[t2]
+--hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
+----filter((t1.id = 1))
+------PhysicalOlapScan[t1]
+----filter((t2.id = 1))
+------PhysicalOlapScan[t2]
 
 -- !filter_join_inner --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
-------filter((t1.id = 1))
---------PhysicalOlapScan[t1]
-------PhysicalDistribute[DistributionSpecHash]
---------filter((t2.id = 1))
-----------PhysicalOlapScan[t2]
+--hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
+----filter((t1.id = 1))
+------PhysicalOlapScan[t1]
+----filter((t2.id = 1))
+------PhysicalOlapScan[t2]
 
 -- !filter_join_inner --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
-------filter((t1.msg = ''))
---------PhysicalOlapScan[t1]
-------PhysicalDistribute[DistributionSpecHash]
---------PhysicalOlapScan[t2]
+--hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
+----filter((t1.msg = ''))
+------PhysicalOlapScan[t1]
+----PhysicalOlapScan[t2]
 
 -- !filter_join_inner --
 PhysicalResultSink
@@ -70,21 +59,17 @@ PhysicalResultSink
 
 -- !filter_join_inner --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) 
otherCondition=(((t1.id = 1) OR (t2.id = 2)))
-------PhysicalOlapScan[t1]
-------PhysicalDistribute[DistributionSpecHash]
---------PhysicalOlapScan[t2]
+--hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=(((t1.id 
= 1) OR (t2.id = 2)))
+----PhysicalOlapScan[t1]
+----PhysicalOlapScan[t2]
 
 -- !filter_join_left --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
-------filter((t1.id = 1))
---------PhysicalOlapScan[t1]
-------PhysicalDistribute[DistributionSpecHash]
---------filter((t2.id = 1))
-----------PhysicalOlapScan[t2]
+--hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
+----filter((t1.id = 1))
+------PhysicalOlapScan[t1]
+----filter((t2.id = 1))
+------PhysicalOlapScan[t2]
 
 -- !filter_join_left --
 PhysicalResultSink
@@ -92,32 +77,26 @@ PhysicalResultSink
 
 -- !filter_join_left --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----filter(((t1.id = 1) OR (t2.id = 2)))
-------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) 
otherCondition=()
---------PhysicalOlapScan[t1]
---------PhysicalDistribute[DistributionSpecHash]
-----------PhysicalOlapScan[t2]
+--filter(((t1.id = 1) OR (t2.id = 2)))
+----hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
+------PhysicalOlapScan[t1]
+------PhysicalOlapScan[t2]
 
 -- !filter_join_right --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
-------filter((t1.id = 1))
---------PhysicalOlapScan[t1]
-------PhysicalDistribute[DistributionSpecHash]
---------filter((t2.id = 1))
-----------PhysicalOlapScan[t2]
+--hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
+----filter((t1.id = 1))
+------PhysicalOlapScan[t1]
+----filter((t2.id = 1))
+------PhysicalOlapScan[t2]
 
 -- !filter_join_full --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
-------filter((t1.id = 1))
---------PhysicalOlapScan[t1]
-------PhysicalDistribute[DistributionSpecHash]
---------filter((t2.id = 1))
-----------PhysicalOlapScan[t2]
+--hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
+----filter((t1.id = 1))
+------PhysicalOlapScan[t1]
+----filter((t2.id = 1))
+------PhysicalOlapScan[t2]
 
 -- !filter_join_left --
 PhysicalResultSink
@@ -125,367 +104,274 @@ PhysicalResultSink
 
 -- !filter_join_left --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----filter(((t1.id = 1) OR (t2.id = 2)))
-------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) 
otherCondition=()
---------PhysicalDistribute[DistributionSpecHash]
-----------PhysicalOlapScan[t1]
---------PhysicalDistribute[DistributionSpecHash]
-----------PhysicalOlapScan[t2]
+--filter(((t1.id = 1) OR (t2.id = 2)))
+----hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
+------PhysicalOlapScan[t1]
+------PhysicalOlapScan[t2]
 
 -- !filter_join_cross --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----NestedLoopJoin[CROSS_JOIN]
-------filter((t1.id = 1))
---------PhysicalOlapScan[t1]
-------PhysicalDistribute[DistributionSpecReplicated]
---------PhysicalOlapScan[t2]
+--NestedLoopJoin[CROSS_JOIN]
+----filter((t1.id = 1))
+------PhysicalOlapScan[t1]
+----PhysicalOlapScan[t2]
 
 -- !filter_join_left_anti --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
-------filter((t1.id = 1))
---------PhysicalOlapScan[t1]
-------PhysicalDistribute[DistributionSpecHash]
---------filter((t2.id = 1))
-----------PhysicalOlapScan[t2]
+--hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
+----filter((t1.id = 1))
+------PhysicalOlapScan[t1]
+----filter((t2.id = 1))
+------PhysicalOlapScan[t2]
 
 -- !filter_join_left_semi --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
-------filter((t1.id = 1))
---------PhysicalOlapScan[t1]
-------PhysicalDistribute[DistributionSpecHash]
---------filter((t2.id = 1))
-----------PhysicalOlapScan[t2]
+--hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
+----filter((t1.id = 1))
+------PhysicalOlapScan[t1]
+----filter((t2.id = 1))
+------PhysicalOlapScan[t2]
 
 -- !filter_join_right_anti --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----hashJoin[RIGHT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
-------PhysicalDistribute[DistributionSpecHash]
---------filter((t1.id = 1))
-----------PhysicalOlapScan[t1]
-------PhysicalDistribute[DistributionSpecHash]
---------filter((t2.id = 1))
-----------PhysicalOlapScan[t2]
+--hashJoin[RIGHT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
+----filter((t1.id = 1))
+------PhysicalOlapScan[t1]
+----filter((t2.id = 1))
+------PhysicalOlapScan[t2]
 
 -- !filter_join_right_semi --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----hashJoin[RIGHT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
-------filter((t1.id = 1))
---------PhysicalOlapScan[t1]
-------PhysicalDistribute[DistributionSpecHash]
---------filter((t2.id = 1))
-----------PhysicalOlapScan[t2]
+--hashJoin[RIGHT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
+----filter((t1.id = 1))
+------PhysicalOlapScan[t1]
+----filter((t2.id = 1))
+------PhysicalOlapScan[t2]
 
 -- !filter_join_right_semi --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----hashJoin[RIGHT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
-------filter((t1.id = 1))
---------PhysicalOlapScan[t1]
-------PhysicalDistribute[DistributionSpecHash]
---------filter((t2.id = 1))
-----------PhysicalOlapScan[t2]
+--hashJoin[RIGHT_SEMI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
+----filter((t1.id = 1))
+------PhysicalOlapScan[t1]
+----filter((t2.id = 1))
+------PhysicalOlapScan[t2]
 
 -- !filter_multi_inner --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=()
-------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
---------filter((t1.id = 1))
-----------PhysicalOlapScan[t1]
---------PhysicalDistribute[DistributionSpecHash]
-----------filter((t2.id = 1))
-------------PhysicalOlapScan[t2]
-------PhysicalDistribute[DistributionSpecHash]
---------filter((t3.id = 1))
-----------PhysicalOlapScan[t3]
+--hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=()
+----hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
+------filter((t1.id = 1))
+--------PhysicalOlapScan[t1]
+------filter((t2.id = 1))
+--------PhysicalOlapScan[t2]
+----filter((t3.id = 1))
+------PhysicalOlapScan[t3]
 
 -- !filter_mixed_inner_left --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----filter((((t1.id = 1) AND (t2.id = 2)) OR (t3.id = 2)))
-------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) 
otherCondition=()
---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
-----------PhysicalOlapScan[t1]
-----------PhysicalDistribute[DistributionSpecHash]
-------------PhysicalOlapScan[t2]
---------PhysicalDistribute[DistributionSpecHash]
-----------PhysicalOlapScan[t3]
+--filter((((t1.id = 1) AND (t2.id = 2)) OR (t3.id = 2)))
+----hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=()
+------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
+--------PhysicalOlapScan[t1]
+--------PhysicalOlapScan[t2]
+------PhysicalOlapScan[t3]
 
 -- !filter_multi_left --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----filter((((t1.id = 1) AND (t2.id > 1)) OR (t3.id < 4)))
-------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) 
otherCondition=()
---------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) 
otherCondition=()
-----------PhysicalOlapScan[t1]
-----------PhysicalDistribute[DistributionSpecHash]
-------------PhysicalOlapScan[t2]
---------PhysicalDistribute[DistributionSpecHash]
-----------PhysicalOlapScan[t3]
+--filter((((t1.id = 1) AND (t2.id > 1)) OR (t3.id < 4)))
+----hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=()
+------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) 
otherCondition=()
+--------PhysicalOlapScan[t1]
+--------PhysicalOlapScan[t2]
+------PhysicalOlapScan[t3]
 
 -- !filter_multi_outer --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=()
-------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) 
otherCondition=()
---------filter((t1.id = 1))
-----------PhysicalOlapScan[t1]
---------PhysicalDistribute[DistributionSpecHash]
-----------filter((t2.id = 1))
-------------PhysicalOlapScan[t2]
-------PhysicalDistribute[DistributionSpecHash]
---------filter((t3.id = 1))
-----------PhysicalOlapScan[t3]
+--hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=()
+----hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
+------filter((t1.id = 1))
+--------PhysicalOlapScan[t1]
+------filter((t2.id = 1))
+--------PhysicalOlapScan[t2]
+----filter((t3.id = 1))
+------PhysicalOlapScan[t3]
 
 -- !filter_multi_cross --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
+--NestedLoopJoin[CROSS_JOIN]
 ----NestedLoopJoin[CROSS_JOIN]
-------NestedLoopJoin[CROSS_JOIN]
+------filter((t1.id = 1))
+--------PhysicalOlapScan[t1]
+------PhysicalOlapScan[t2]
+----PhysicalOlapScan[t3]
+
+-- !filter_multi_mixed --
+PhysicalResultSink
+--hashJoin[INNER_JOIN] hashCondition=((t1.id = t4.id)) otherCondition=()
+----hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=()
+------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
 --------filter((t1.id = 1))
 ----------PhysicalOlapScan[t1]
---------PhysicalDistribute[DistributionSpecReplicated]
+--------filter((t2.id = 1))
 ----------PhysicalOlapScan[t2]
-------PhysicalDistribute[DistributionSpecReplicated]
+------filter((t3.id = 1))
 --------PhysicalOlapScan[t3]
-
--- !filter_multi_mixed --
-PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----hashJoin[INNER_JOIN] hashCondition=((t1.id = t4.id)) otherCondition=()
-------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) 
otherCondition=()
---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
-----------filter((t1.id = 1))
-------------PhysicalOlapScan[t1]
-----------PhysicalDistribute[DistributionSpecHash]
-------------filter((t2.id = 1))
---------------PhysicalOlapScan[t2]
---------PhysicalDistribute[DistributionSpecHash]
-----------filter((t3.id = 1))
-------------PhysicalOlapScan[t3]
-------PhysicalDistribute[DistributionSpecHash]
---------filter((t4.id = 1))
-----------PhysicalOlapScan[t4]
+----filter((t4.id = 1))
+------PhysicalOlapScan[t4]
 
 -- !filter_aggregation_filtered_agg_func --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----filter((count(*) > 10))
-------hashAgg[GLOBAL]
---------PhysicalDistribute[DistributionSpecHash]
-----------hashAgg[LOCAL]
-------------PhysicalOlapScan[t1]
+--filter((count(*) > 10))
+----hashAgg[GLOBAL]
+------hashAgg[LOCAL]
+--------PhysicalOlapScan[t1]
 
 -- !filter_aggregation_group_set --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----filter((cast(msg as DOUBLE) = 1.0))
-------hashAgg[GLOBAL]
---------PhysicalDistribute[DistributionSpecHash]
-----------hashAgg[LOCAL]
-------------PhysicalRepeat
---------------filter((t1.id > 10))
-----------------PhysicalOlapScan[t1]
+--filter((cast(msg as DOUBLE) = 1.0))
+----hashAgg[GLOBAL]
+------hashAgg[LOCAL]
+--------PhysicalRepeat
+----------filter((t1.id > 10))
+------------PhysicalOlapScan[t1]
 
 -- !filter_aggregation_group_set --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----filter(((t1.id > 10) OR (cast(msg as DOUBLE) = 1.0)))
-------hashAgg[GLOBAL]
---------PhysicalDistribute[DistributionSpecHash]
-----------hashAgg[LOCAL]
-------------PhysicalRepeat
---------------PhysicalOlapScan[t1]
+--filter(((t1.id > 10) OR (cast(msg as DOUBLE) = 1.0)))
+----hashAgg[GLOBAL]
+------hashAgg[LOCAL]
+--------PhysicalRepeat
+----------PhysicalOlapScan[t1]
 
 -- !filter_aggregation_filtered_key --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----hashAgg[LOCAL]
-------filter((t1.id > 10))
---------PhysicalOlapScan[t1]
-
--- !filter_aggregation_filtered_part_key --
-PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
+--hashAgg[GLOBAL]
 ----hashAgg[LOCAL]
-------filter((t1.id > 10))
+------filter((t1.msg = '1'))
 --------PhysicalOlapScan[t1]
 
--- !filter_aggregation_filtered_part_key --
-
 -- !filter_aggregation_filtered_part_key --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----filter((t.c > 10))
+--filter((t.c > 10))
+----hashAgg[GLOBAL]
 ------hashAgg[LOCAL]
 --------PhysicalOlapScan[t1]
 
 -- !push_filter_union --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----hashAgg[GLOBAL]
-------PhysicalDistribute[DistributionSpecHash]
---------hashAgg[LOCAL]
-----------PhysicalUnion
-------------PhysicalDistribute[DistributionSpecExecutionAny]
---------------filter((t1.id = 2))
-----------------PhysicalOlapScan[t1]
-------------PhysicalDistribute[DistributionSpecExecutionAny]
---------------filter((t2.id = 2))
-----------------PhysicalOlapScan[t2]
-
--- !push_filter_union_all --
-PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----PhysicalUnion
-------PhysicalDistribute[DistributionSpecExecutionAny]
+--hashAgg[GLOBAL]
+----hashAgg[LOCAL]
+------PhysicalUnion
 --------filter((t1.id = 2))
 ----------PhysicalOlapScan[t1]
-------PhysicalDistribute[DistributionSpecExecutionAny]
 --------filter((t2.id = 2))
 ----------PhysicalOlapScan[t2]
 
+-- !push_filter_union_all --
+PhysicalResultSink
+--PhysicalUnion
+----filter((t1.id = 2))
+------PhysicalOlapScan[t1]
+----filter((t2.id = 2))
+------PhysicalOlapScan[t2]
+
 -- !push_filter_intersect --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----PhysicalIntersect
-------PhysicalDistribute[DistributionSpecHash]
---------filter((t1.id = 2))
-----------PhysicalOlapScan[t1]
-------PhysicalDistribute[DistributionSpecHash]
---------filter((t2.id = 2))
-----------PhysicalOlapScan[t2]
+--PhysicalIntersect
+----filter((t1.id = 2))
+------PhysicalOlapScan[t1]
+----filter((t2.id = 2))
+------PhysicalOlapScan[t2]
 
 -- !push_filter_except --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----PhysicalExcept
-------PhysicalDistribute[DistributionSpecHash]
---------filter((t1.id = 2))
-----------PhysicalOlapScan[t1]
-------PhysicalDistribute[DistributionSpecHash]
---------filter((t2.id = 2))
-----------PhysicalOlapScan[t2]
+--PhysicalExcept
+----filter((t1.id = 2))
+------PhysicalOlapScan[t1]
+----filter((t2.id = 2))
+------PhysicalOlapScan[t2]
 
 -- !push_filter_union --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----hashAgg[GLOBAL]
-------PhysicalDistribute[DistributionSpecHash]
---------hashAgg[LOCAL]
-----------PhysicalUnion
-------------PhysicalDistribute[DistributionSpecExecutionAny]
---------------filter((cast(random() as INT) = 2))
-----------------PhysicalOneRowRelation
-------------PhysicalDistribute[DistributionSpecExecutionAny]
---------------filter((t2.id = 2))
-----------------PhysicalOlapScan[t2]
+--hashAgg[GLOBAL]
+----hashAgg[LOCAL]
+------PhysicalUnion
+--------filter((cast(random() as INT) = 2))
+----------PhysicalOneRowRelation
+--------filter((t2.id = 2))
+----------PhysicalOlapScan[t2]
 
 -- !push_filter_union_all --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----PhysicalUnion
-------PhysicalDistribute[DistributionSpecExecutionAny]
---------filter(cast(random() as INT) IN (2, 3))
-----------PhysicalOneRowRelation
-------PhysicalDistribute[DistributionSpecExecutionAny]
---------filter(id IN (2, 3))
-----------PhysicalOlapScan[t2]
+--PhysicalUnion
+----filter(cast(random() as INT) IN (2, 3))
+------PhysicalOneRowRelation
+----filter(id IN (2, 3))
+------PhysicalOlapScan[t2]
 
 -- !push_filter_intersect --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----PhysicalIntersect
-------PhysicalDistribute[DistributionSpecHash]
---------filter(cast(random() as INT) IN (2, 3))
-----------PhysicalOneRowRelation
-------PhysicalDistribute[DistributionSpecHash]
---------filter(id IN (2, 3))
-----------PhysicalOlapScan[t2]
+--PhysicalIntersect
+----filter(cast(random() as INT) IN (2, 3))
+------PhysicalOneRowRelation
+----filter(id IN (2, 3))
+------PhysicalOlapScan[t2]
 
 -- !push_filter_except --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----PhysicalExcept
-------PhysicalDistribute[DistributionSpecHash]
---------filter((cast(random() as INT) = 2) and (t1.msg = ''))
-----------PhysicalOlapScan[t1]
-------PhysicalDistribute[DistributionSpecHash]
---------filter((t2.id = 2) and (t2.msg = ''))
-----------PhysicalOlapScan[t2]
+--PhysicalExcept
+----filter((cast(random() as INT) = 2) and (t1.msg = ''))
+------PhysicalOlapScan[t1]
+----filter((t2.id = 2) and (t2.msg = ''))
+------PhysicalOlapScan[t2]
 
 -- !push_filter_except --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----hashJoin[INNER_JOIN] hashCondition=((t3.id = t.id)) otherCondition=()
-------PhysicalDistribute[DistributionSpecHash]
---------PhysicalExcept
-----------PhysicalDistribute[DistributionSpecHash]
-------------filter((t1.id = 2))
---------------PhysicalOlapScan[t1]
-----------PhysicalDistribute[DistributionSpecHash]
-------------filter((t2.id = 2))
---------------PhysicalOlapScan[t2]
-------PhysicalDistribute[DistributionSpecHash]
---------PhysicalOlapScan[t3]
+--hashJoin[INNER_JOIN] hashCondition=((t3.id = t.id)) otherCondition=()
+----PhysicalExcept
+------filter((t1.id = 2))
+--------PhysicalOlapScan[t1]
+------filter((t2.id = 2))
+--------PhysicalOlapScan[t2]
+----PhysicalOlapScan[t3]
 
 -- !push_filter_subquery --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----hashJoin[INNER_JOIN] hashCondition=((t3.id = t.id)) otherCondition=()
-------PhysicalDistribute[DistributionSpecHash]
---------PhysicalExcept
-----------PhysicalDistribute[DistributionSpecHash]
-------------filter((t1.id = 2))
---------------PhysicalOlapScan[t1]
-----------PhysicalDistribute[DistributionSpecHash]
-------------filter((t2.id = 2))
---------------PhysicalOlapScan[t2]
-------PhysicalDistribute[DistributionSpecHash]
---------PhysicalOlapScan[t3]
+--hashJoin[INNER_JOIN] hashCondition=((t3.id = t.id)) otherCondition=()
+----PhysicalExcept
+------filter((t1.id = 2))
+--------PhysicalOlapScan[t1]
+------filter((t2.id = 2))
+--------PhysicalOlapScan[t2]
+----PhysicalOlapScan[t3]
 
 -- !filter_window_row_number --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----PhysicalWindow
-------PhysicalQuickSort[LOCAL_SORT]
---------filter((t1.id <= 5))
-----------PhysicalOlapScan[t1]
+--PhysicalWindow
+----PhysicalQuickSort[LOCAL_SORT]
+------filter((t1.id <= 5))
+--------PhysicalOlapScan[t1]
 
 -- !filter_window_order_row_number --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----PhysicalWindow
-------PhysicalQuickSort[LOCAL_SORT]
---------filter((t1.id <= 5))
-----------PhysicalOlapScan[t1]
+--PhysicalWindow
+----PhysicalQuickSort[LOCAL_SORT]
+------filter((t1.id <= 5))
+--------PhysicalOlapScan[t1]
 
 -- !filter_window_row_number_complex_predicate --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----PhysicalWindow
-------PhysicalQuickSort[LOCAL_SORT]
---------PhysicalDistribute[DistributionSpecHash]
-----------filter(((cast(id as DOUBLE) + cast(msg as DOUBLE)) = cast('' as 
DOUBLE)))
-------------PhysicalOlapScan[t1]
+--PhysicalWindow
+----PhysicalQuickSort[LOCAL_SORT]
+------filter(((cast(id as DOUBLE) + cast(msg as DOUBLE)) = cast('' as DOUBLE)))
+--------PhysicalOlapScan[t1]
 
 -- !filter_multi_window --
 PhysicalResultSink
---PhysicalDistribute[DistributionSpecGather]
-----PhysicalWindow
-------PhysicalQuickSort[LOCAL_SORT]
---------PhysicalDistribute[DistributionSpecHash]
-----------PhysicalWindow
-------------PhysicalQuickSort[LOCAL_SORT]
---------------PhysicalDistribute[DistributionSpecHash]
-----------------filter(((t1.msg = '') OR (t1.id = 2)))
-------------------PhysicalOlapScan[t1]
+--PhysicalWindow
+----PhysicalQuickSort[LOCAL_SORT]
+------PhysicalWindow
+--------PhysicalQuickSort[LOCAL_SORT]
+----------filter(((t1.msg = '') OR (t1.id = 2)))
+------------PhysicalOlapScan[t1]
 
diff --git 
a/regression-test/suites/nereids_rules_p0/filter_push_down/push_filter_through.groovy
 
b/regression-test/suites/nereids_rules_p0/filter_push_down/push_filter_through.groovy
index 0c9229249b0..16c06b8edd9 100644
--- 
a/regression-test/suites/nereids_rules_p0/filter_push_down/push_filter_through.groovy
+++ 
b/regression-test/suites/nereids_rules_p0/filter_push_down/push_filter_through.groovy
@@ -22,7 +22,7 @@ suite("push_filter_through") {
     sql "use regression_test_nereids_rules_p0"
     sql "set disable_join_reorder=true"
     sql 'set be_number_for_test=3'
-    sql "SET ignore_shape_nodes='PhysicalDistribute[DistributionSpecGather], 
PhysicalDistribute[DistributionSpecHash],PhysicalProject'"
+    sql "SET ignore_shape_nodes='PhysicalDistribute, PhysicalProject'"
     sql "set enable_fold_nondeterministic_fn=false"
 
     // push filter through alias
@@ -204,19 +204,12 @@ suite("push_filter_through") {
     """
     // Push filter of group by key through aggregated filter
     qt_filter_aggregation_filtered_key"""
-    explain shape plan select count() from t1 group by id having id > 10;
-    """
-    // Push filter of part of group by key through aggregated filter
-    qt_filter_aggregation_filtered_part_key"""
-    explain shape plan select count() from t1 group by id, msg having id > 10;
-    """
-    // Push filter to subquery with constant
-    qt_filter_aggregation_filtered_part_key"""
-    select * from (select count(), rand() as c from t1 group by id) t where c 
> 10;
+    explain shape plan select count() from t1 group by msg having msg = "1";
     """
+
     // Push filter to subquery with alias
     qt_filter_aggregation_filtered_part_key"""
-    explain shape plan select * from (select id + 1, count() as c from t1 
group by id) t where c > 10;
+    explain shape plan select * from (select msg, count() as c from t1 group 
by msg) t where c > 10;
     """
     // Push filter through UNION
     qt_push_filter_union"""


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to