From c0558e3fd288cf3d77dea90ce8e4f16816630d33 Mon Sep 17 00:00:00 2001 From: LiBinfeng <1204975323@qq.com> Date: Sun, 8 Oct 2023 16:27:12 +0800 Subject: [PATCH] [Fix](Nereids) fix test leading change disable join reorder parameter --- .../data/nereids_p0/hint/test_leading.out | 125 +++++++++--------- 1 file changed, 63 insertions(+), 62 deletions(-) diff --git a/regression-test/data/nereids_p0/hint/test_leading.out b/regression-test/data/nereids_p0/hint/test_leading.out index 45813b272aac461..ea760d8b2c6803e 100644 --- a/regression-test/data/nereids_p0/hint/test_leading.out +++ b/regression-test/data/nereids_p0/hint/test_leading.out @@ -3,7 +3,7 @@ PhysicalResultSink --PhysicalDistribute ----PhysicalProject -------hashJoin[INNER_JOIN](t1.c1 = t2.c2) +------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2))otherCondition=() --------PhysicalOlapScan[t2] --------PhysicalDistribute ----------PhysicalOlapScan[t1] @@ -16,7 +16,7 @@ SyntaxError: PhysicalResultSink --PhysicalDistribute ----PhysicalProject -------hashJoin[INNER_JOIN](t1.c1 = t2.c2) +------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2))otherCondition=() --------PhysicalOlapScan[t1] --------PhysicalDistribute ----------PhysicalOlapScan[t2] @@ -29,8 +29,8 @@ SyntaxError: PhysicalResultSink --PhysicalDistribute ----PhysicalProject -------hashJoin[INNER_JOIN](t2.c2 = t3.c3) ---------hashJoin[INNER_JOIN](t1.c1 = t2.c2) +------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3))otherCondition=() +--------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2))otherCondition=() ----------PhysicalOlapScan[t1] ----------PhysicalDistribute ------------PhysicalOlapScan[t2] @@ -45,13 +45,13 @@ SyntaxError: PhysicalResultSink --PhysicalDistribute ----PhysicalProject -------hashJoin[INNER_JOIN](t1.c1 = t2.c2) ---------PhysicalOlapScan[t1] +------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2))otherCondition=() +--------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3))otherCondition=() +----------PhysicalOlapScan[t2] +----------PhysicalDistribute +------------PhysicalOlapScan[t3] --------PhysicalDistribute -----------hashJoin[INNER_JOIN](t2.c2 = t3.c3) -------------PhysicalOlapScan[t2] -------------PhysicalDistribute ---------------PhysicalOlapScan[t3] +----------PhysicalOlapScan[t1] Used: leading(t1 { t2 t3 }) UnUsed: @@ -61,14 +61,14 @@ SyntaxError: PhysicalResultSink --PhysicalDistribute ----PhysicalProject -------hashJoin[INNER_JOIN](t3.c3 = t4.c4) ---------hashJoin[INNER_JOIN](t1.c1 = t2.c2) -----------PhysicalOlapScan[t1] +------hashJoin[INNER_JOIN] hashCondition=((t3.c3 = t4.c4))otherCondition=() +--------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2))otherCondition=() +----------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3))otherCondition=() +------------PhysicalOlapScan[t2] +------------PhysicalDistribute +--------------PhysicalOlapScan[t3] ----------PhysicalDistribute -------------hashJoin[INNER_JOIN](t2.c2 = t3.c3) ---------------PhysicalOlapScan[t2] ---------------PhysicalDistribute -----------------PhysicalOlapScan[t3] +------------PhysicalOlapScan[t1] --------PhysicalDistribute ----------PhysicalOlapScan[t4] @@ -80,13 +80,13 @@ SyntaxError: PhysicalResultSink --PhysicalDistribute ----PhysicalProject -------hashJoin[INNER_JOIN](t2.c2 = t3.c3) ---------hashJoin[INNER_JOIN](t1.c1 = t2.c2) +------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3))otherCondition=() +--------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2))otherCondition=() ----------PhysicalOlapScan[t1] ----------PhysicalDistribute ------------PhysicalOlapScan[t2] --------PhysicalDistribute -----------hashJoin[INNER_JOIN](t3.c3 = t4.c4) +----------hashJoin[INNER_JOIN] hashCondition=((t3.c3 = t4.c4))otherCondition=() ------------PhysicalOlapScan[t3] ------------PhysicalDistribute --------------PhysicalOlapScan[t4] @@ -99,13 +99,13 @@ SyntaxError: PhysicalResultSink --PhysicalDistribute ----PhysicalProject -------hashJoin[INNER_JOIN](t2.c2 = t3.c3) ---------hashJoin[INNER_JOIN](t1.c1 = t2.c2) +------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3))otherCondition=() +--------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2))otherCondition=() ----------PhysicalOlapScan[t1] ----------PhysicalDistribute ------------PhysicalOlapScan[t2] --------PhysicalDistribute -----------hashJoin[INNER_JOIN](t3.c3 = t4.c4) +----------hashJoin[INNER_JOIN] hashCondition=((t3.c3 = t4.c4))otherCondition=() ------------PhysicalOlapScan[t3] ------------PhysicalDistribute --------------PhysicalOlapScan[t4] @@ -118,8 +118,8 @@ SyntaxError: PhysicalResultSink --PhysicalDistribute ----PhysicalProject -------hashJoin[INNER_JOIN](t1.c1 = t3.c3) ---------hashJoin[LEFT_OUTER_JOIN](t1.c1 = t2.c2) +------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t3.c3))otherCondition=() +--------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.c1 = t2.c2))otherCondition=() ----------PhysicalOlapScan[t1] ----------PhysicalDistribute ------------PhysicalOlapScan[t2] @@ -130,8 +130,8 @@ PhysicalResultSink PhysicalResultSink --PhysicalDistribute ----PhysicalProject -------hashJoin[LEFT_OUTER_JOIN](t1.c1 = t2.c2) ---------hashJoin[INNER_JOIN](t1.c1 = t3.c3) +------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.c1 = t2.c2))otherCondition=() +--------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t3.c3))otherCondition=() ----------PhysicalOlapScan[t1] ----------PhysicalDistribute ------------PhysicalOlapScan[t3] @@ -146,8 +146,8 @@ SyntaxError: PhysicalResultSink --PhysicalDistribute ----PhysicalProject -------hashJoin[LEFT_OUTER_JOIN](t1.c1 = t3.c3) ---------hashJoin[LEFT_OUTER_JOIN](t1.c1 = t2.c2) +------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.c1 = t3.c3))otherCondition=() +--------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.c1 = t2.c2))otherCondition=() ----------PhysicalOlapScan[t1] ----------PhysicalDistribute ------------PhysicalOlapScan[t2] @@ -158,8 +158,8 @@ PhysicalResultSink PhysicalResultSink --PhysicalDistribute ----PhysicalProject -------hashJoin[LEFT_OUTER_JOIN](t1.c1 = t2.c2) ---------hashJoin[LEFT_OUTER_JOIN](t1.c1 = t3.c3) +------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.c1 = t2.c2))otherCondition=() +--------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.c1 = t3.c3))otherCondition=() ----------PhysicalOlapScan[t1] ----------PhysicalDistribute ------------PhysicalOlapScan[t3] @@ -174,8 +174,8 @@ SyntaxError: PhysicalResultSink --PhysicalDistribute ----PhysicalProject -------hashJoin[RIGHT_OUTER_JOIN](t1.c1 = t2.c2) ---------hashJoin[LEFT_OUTER_JOIN](t2.c2 = t3.c3) +------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.c1 = t2.c2))otherCondition=() +--------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t2.c2 = t3.c3))otherCondition=() ----------PhysicalOlapScan[t2] ----------PhysicalDistribute ------------PhysicalOlapScan[t3] @@ -190,13 +190,13 @@ SyntaxError: PhysicalResultSink --PhysicalDistribute ----PhysicalProject -------hashJoin[INNER_JOIN](t1.c1 = t2.c2) ---------PhysicalOlapScan[t1] +------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2))otherCondition=() +--------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3))otherCondition=() +----------PhysicalOlapScan[t2] +----------PhysicalDistribute +------------PhysicalOlapScan[t3] --------PhysicalDistribute -----------hashJoin[INNER_JOIN](t2.c2 = t3.c3) -------------PhysicalOlapScan[t2] -------------PhysicalDistribute ---------------PhysicalOlapScan[t3] +----------PhysicalOlapScan[t1] Used: leading(t1 { t2 t3 }) UnUsed: @@ -206,8 +206,8 @@ SyntaxError: PhysicalResultSink --PhysicalDistribute ----PhysicalProject -------hashJoin[RIGHT_OUTER_JOIN](t1.c1 = tmp.c2) ---------hashJoin[INNER_JOIN](t2.c2 = t3.c3) +------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.c1 = tmp.c2))otherCondition=() +--------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3))otherCondition=() ----------PhysicalOlapScan[t2] ----------PhysicalDistribute ------------PhysicalOlapScan[t3] @@ -218,8 +218,8 @@ PhysicalResultSink PhysicalResultSink --PhysicalDistribute ----PhysicalProject -------hashJoin[RIGHT_OUTER_JOIN](t1.c1 = tmp.c2) ---------hashJoin[INNER_JOIN](t2.c2 = t3.c3) +------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.c1 = tmp.c2))otherCondition=() +--------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3))otherCondition=() ----------PhysicalOlapScan[t2] ----------PhysicalDistribute ------------PhysicalOlapScan[t3] @@ -234,7 +234,7 @@ SyntaxError: PhysicalResultSink --PhysicalDistribute ----PhysicalProject -------hashJoin[LEFT_SEMI_JOIN](t1.c1 = t2.c2) +------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.c1 = t2.c2))otherCondition=() --------PhysicalOlapScan[t1] --------PhysicalDistribute ----------PhysicalProject @@ -244,11 +244,11 @@ PhysicalResultSink PhysicalResultSink --PhysicalDistribute ----PhysicalProject -------hashJoin[RIGHT_SEMI_JOIN](t1.c1 = t2.c2) ---------PhysicalProject -----------PhysicalOlapScan[t2] +------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t1.c1 = t2.c2))otherCondition=() +--------PhysicalOlapScan[t1] --------PhysicalDistribute -----------PhysicalOlapScan[t1] +----------PhysicalProject +------------PhysicalOlapScan[t2] Used: leading(t2 t1) UnUsed: @@ -272,10 +272,10 @@ PhysicalResultSink --PhysicalDistribute ----PhysicalProject ------NestedLoopJoin[CROSS_JOIN] ---------PhysicalProject -----------PhysicalOlapScan[t2] +--------PhysicalOlapScan[t1] --------PhysicalDistribute -----------PhysicalOlapScan[t1] +----------PhysicalProject +------------PhysicalOlapScan[t2] Used: leading(t2 t1) UnUsed: @@ -286,7 +286,7 @@ PhysicalResultSink --PhysicalDistribute ----PhysicalProject ------NestedLoopJoin[CROSS_JOIN] ---------hashJoin[INNER_JOIN](cte.c1 = cte.c2) +--------hashJoin[INNER_JOIN] hashCondition=((cte.c1 = cte.c2))otherCondition=() ----------PhysicalProject ------------PhysicalOlapScan[t1] ----------PhysicalDistribute @@ -317,7 +317,7 @@ SyntaxError: PhysicalResultSink --PhysicalDistribute ----PhysicalProject -------hashJoin[INNER_JOIN](t1.c1 = t2.c2) +------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2))otherCondition=() --------PhysicalOlapScan[t1] --------PhysicalDistribute ----------PhysicalOlapScan[t2] @@ -330,7 +330,7 @@ SyntaxError: leading(t66 t1) Msg:can not find table: t66 PhysicalResultSink --PhysicalDistribute ----PhysicalProject -------hashJoin[INNER_JOIN](t1.c1 = t2.c2) +------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2))otherCondition=() --------PhysicalOlapScan[t1] --------PhysicalDistribute ----------PhysicalOlapScan[t2] @@ -344,7 +344,7 @@ PhysicalResultSink --PhysicalDistribute ----PhysicalProject ------NestedLoopJoin[CROSS_JOIN] ---------hashJoin[INNER_JOIN](cte.c1 = cte.c2) +--------hashJoin[INNER_JOIN] hashCondition=((cte.c1 = cte.c2))otherCondition=() ----------PhysicalProject ------------PhysicalOlapScan[t1] ----------PhysicalDistribute @@ -361,8 +361,8 @@ SyntaxError: leading(t2 cte t1) Msg:Leading alias can only be table name alias PhysicalResultSink --PhysicalDistribute ----PhysicalProject -------hashJoin[INNER_JOIN](t2.c2 = t3.c3) ---------hashJoin[INNER_JOIN](t1.c1 = t2.c2) +------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3))otherCondition=() +--------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2))otherCondition=() ----------PhysicalOlapScan[t1] ----------PhysicalDistribute ------------PhysicalOlapScan[t2] @@ -377,8 +377,8 @@ SyntaxError: leading(t1 t2) Msg:tables should be same as join tables PhysicalResultSink --PhysicalDistribute ----PhysicalProject -------hashJoin[INNER_JOIN](t2.c2 = t3.c3) ---------hashJoin[INNER_JOIN](t1.c1 = t2.c2) +------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3))otherCondition=() +--------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t2.c2))otherCondition=() ----------PhysicalOlapScan[t1] ----------PhysicalDistribute ------------PhysicalOlapScan[t2] @@ -393,7 +393,7 @@ SyntaxError: leading(t1 t1 t2 t3) Msg:duplicated table PhysicalResultSink --PhysicalDistribute ----PhysicalProject -------hashJoin[INNER_JOIN](t1.c1 = t_2.c2) +------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t_2.c2))otherCondition=() --------PhysicalOlapScan[t1] --------PhysicalDistribute ----------PhysicalOlapScan[t2] @@ -406,7 +406,7 @@ SyntaxError: PhysicalResultSink --PhysicalDistribute ----PhysicalProject -------hashJoin[INNER_JOIN](t1.c1 = t_2.c2) +------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t_2.c2))otherCondition=() --------PhysicalOlapScan[t1] --------PhysicalDistribute ----------PhysicalOlapScan[t2] @@ -419,10 +419,11 @@ SyntaxError: leading(t1 t2) Msg:can not find table: t2 PhysicalResultSink --PhysicalDistribute ----PhysicalProject -------hashJoin[INNER_JOIN](t1.c1 = t_1.c1) +------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = t_1.c1))otherCondition=() --------PhysicalOlapScan[t1] --------PhysicalOlapScan[t1] Used: leading(t1 t_1) UnUsed: SyntaxError: +