Conversation
Issue Number: None
Related PR: None
Problem Summary: USING JOIN merge key output in Nereids was inconsistent across join types and star expansion forms. RIGHT and FULL OUTER USING joins could expose the wrong nullable side as the merged key, RIGHT SEMI style joins could lose the merged key from SELECT * output, qualified table.* expansion could hide the original qualified USING keys, and chained USING joins could re-expose keys that an inner USING project had already hidden. The fix moves merge-key construction into a LogicalProject above the join, keeps LogicalJoin output complete for qualified references, distinguishes unqualified star expansion from qualified star expansion, stores explicit asterisk outputs on LogicalProject, and propagates child asterisk outputs through chained USING joins.
None
- Test: Unit Test / Regression test attempted
- Unit Test: ./run-fe-ut.sh --run org.apache.doris.nereids.rules.analysis.BindUsingJoinTest
- Regression test attempted: ./run-regression-test.sh --run -d query_p0/join -s test_using_join_merge_key (local running FE service did not include current FE changes, so the result was not used)
- Behavior changed: Yes (USING JOIN SELECT * now exposes the correct merged key while qualified table.* keeps the table's original USING key)
- Does this need documentation: No
(cherry picked from commit cb74cf4)
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
Contributor
FE UT Coverage ReportIncrement line coverage |
Contributor
FE Regression Coverage ReportIncrement line coverage |
Contributor
Author
|
run buildall |
Contributor
Author
|
run buildall |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
picked from #64718