Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion regression-test/data/nereids_p0/hint/multi_leading.out
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
----PhysicalOlapScan[t1]
--PhysicalResultSink
----PhysicalDistribute[DistributionSpecGather]
------NestedLoopJoin[INNER_JOIN](cast(sum(c11) as DOUBLE) > 0.05 * avg(t1.c11))
------NestedLoopJoin[INNER_JOIN](cast(sum(c11) as DOUBLE) > avg(t1.c11) / 20.0)
--------hashAgg[GLOBAL]
----------PhysicalDistribute[DistributionSpecHash]
------------PhysicalCteConsumer ( cteId=CTEId#0 )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,5 +140,5 @@ suite("multi_leading") {
qt_sql4_res_7 """select /*+ leading(t3 alias1) */ count(*) from (select /*+ leading(alias2 t1) */ c1, c11 from t1 join (select /*+ leading(t4 t2) */ c2, c22 from t2 join t4 on c2 = c4) as alias2 on c1 = alias2.c2) as alias1 join t3 on alias1.c1 = t3.c3;"""

// // use cte in scalar query
qt_sql5_2 """explain shape plan with cte as (select c11, c1 from t1) SELECT c1 FROM cte group by c1 having sum(cte.c11) > (select /*+ leading(cte t1) */ 0.05 * avg(t1.c11) from t1 join cte on t1.c1 = cte.c11 )"""
qt_sql5_2 """explain shape plan with cte as (select c11, c1 from t1) SELECT c1 FROM cte group by c1 having sum(cte.c11) > (select /*+ leading(cte t1) */ avg(t1.c11) / 20.0 from t1 join cte on t1.c1 = cte.c11 )"""
}
Loading