github-actions[bot] commented on code in PR #66182:
URL: https://github.com/apache/doris/pull/66182#discussion_r3709152975
##########
regression-test/suites/query_p0/hint/fix_leading.groovy:
##########
@@ -196,6 +206,16 @@ suite("fix_leading") {
qt_select4_2 """select /*+ leading(t1 t2 t3)*/ count(*) from t1 left join
t2 on c1 > 500 and c2 >500 right join t3 on c3 > 500 and c1 < 200;"""
qt_select4_3 """explain shape plan select /*+ leading(t1 t2 t3)*/ count(*)
from t1 left join t2 on c1 > 500 and c2 >500 right join t3 on c3 > 500 and c1 <
200;"""
+ // check right semi join keeps its complete non-output side
+ qt_select4_4 """select /*+ leading(right_join_b right_join_a right_join_c)
*/ count(*)
Review Comment:
[P2] Make these regressions exercise the LEADING path
`leading(right_join_b right_join_a right_join_c)` is left-deep, so it first
tries to join `B` with `A` even though the canonical RIGHT SEMI/ANTI constraint
needs the complete non-output side `{A,C}`. That order can be marked `UnUsed`,
and both original unhinted queries already return count `1` with this
fixture—the exact expected values here—so these tests still pass without
exercising the new constraint handling.
Please use a valid grouped order such as `leading(right_join_b {right_join_a
right_join_c})`, assert the hint log is `Used`, and retain the result/boundary
oracle. If rejection of the left-deep order is the intended behavior, assert
`UnUsed` explicitly instead so the fallback is not silent.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]