morrySnow opened a new pull request, #63892:
URL: https://github.com/apache/doris/pull/63892
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: A scalar subquery comparison can reference a projected
alias from the right side of an inner join. PushDownJoinOnAssertNumRows
previously identified the pushed condition slots against the project output
after rewriting the condition through the project, so aliases expanded to
right-child slots could be treated as if no bottom-join slots were involved and
the alias projection could be attached to the left child. The rewritten plan
then referenced slots that were absent from that child. This change determines
slot ownership from the bottom join output after project pushdown, keeps the
original pushdown child order when assembling the new join, and adds a unit
test for the right-child alias case.
### Release note
Fix query planning failure for scalar subquery comparisons on projected join
expressions.
### Check List (For Author)
- Test:
- Unit Test: ./run-fe-ut.sh --run
org.apache.doris.nereids.rules.rewrite.PushDownJoinOnAssertNumRowsTest
- Behavior changed: Yes. The rewrite now keeps predicates on the child that
actually provides the referenced slots.
- Does this need documentation: No
--
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]