github-actions[bot] commented on code in PR #67645:
URL: https://github.com/apache/doris/pull/67645#discussion_r4037957168
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/hint/LeadingHint.java:
##########
@@ -442,15 +442,22 @@ public Pair<JoinConstraint, Boolean>
getJoinConstraint(Long joinTableBitmap, Lon
matchedJoinConstraint = joinConstraint;
reversed = true;
} else if (joinConstraint.getJoinType().isSemiJoin()
- && joinConstraint.getRightHand().equals(rightTableBitmap))
{
+ && joinConstraint.getRightHand().equals(rightTableBitmap)
+ && LongBitmap.isSubset(joinConstraint.getMinLeftHand(),
leftTableBitmap)) {
Review Comment:
[P2] Cover the other guarded semi-join orientation
The new negative case `leading(TABLE_2 TABLE_3 TABLE_1)` reaches only the
branch below, where `rightHand.equals(leftTableBitmap)`. There is no direct
pre-fix-sensitive case for this newly changed branch: the mirrored illegal
order is `leading(TABLE_3 TABLE_2 TABLE_1)`, while the positive test exits
through the earlier generic min-hand match. Please add that symmetric case and
assert the hint is UNUSED and the original conditioned LEFT SEMI JOIN remains,
so both rejection paths are protected.
--
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]