morrySnow opened a new pull request, #70627: URL: https://github.com/apache/doris/pull/70627
### Background Project-aware join reordering normalizes projections before moving expressions across joins. Outer joins require child slots to retain their pre-join nullability. ### What problem does this PR solve? Issue Number: close #70447 Related PR: #67541 (introduced the shared helper) PR Type: Bugfix Problem Summary: Lambda projections over outer joins can fail during planning. Preserve lambda-local slots while adjusting input slot nullability. ### Details - **Frequency:** When join exploration normalizes a matching outer-join projection containing a lambda argument. - **Root cause:** The rewrite looks up every slot in join child outputs, including lambda arguments that are not child outputs. - **Why existing tests missed it:** Projection normalization tests did not include lambda-local slots. - **Fix:** Leave slots marked as not originating from children unchanged while retaining ordinary child slot replacement. - **Other paths and branches:** The shared helper is used by multiple project-aware join reorder rules; release branches need separate consideration. ### Testing - FE unit tests: ProjectJoinReorderHelperTest and PushDownProjectThroughInnerOuterJoinTest (14 passed). The new test failed with an NPE before the fix. - FE Checkstyle passed. - FE build passed with BE Java extensions disabled and a separate output directory. - End-to-end SQL regression was not run; no current master cluster was available. ### Release note Fix planning failures for lambda projections above outer joins during join reordering. ### Check List (For Author) - Behavior changed: Yes (see Details) - Does this need documentation: No - Pre-submission status: Partially verified: end-to-end SQL regression not run. ### AI Disclosure - Tool: Codex - Generated: Code, test, and commit description. - Human review: Not yet reviewed. -- 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]
