feiniaofeiafei opened a new pull request, #68182:
URL: https://github.com/apache/doris/pull/68182

   ### What problem does this PR solve?
   
   With a non-null separator, `concat_ws(',', NULL)` returns an empty string. 
Eager aggregation must preserve the contribution of such values from unmatched 
outer-join rows. Without the `NullToNonNullFunction` marker, aggregates 
containing `concat_ws` can be pushed below the nullable side of an outer join 
and produce incorrect results.
   
   Make `ConcatWs` implement `NullToNonNullFunction` to reuse the existing 
pushdown protection. Add coverage in `EagerAggRewriterTest` for both left and 
right outer joins, and verify that inner-join pushdown remains allowed.
   
   ### Release note
   
   Fix incorrect eager aggregation results for `concat_ws` on the nullable side 
of outer joins.
   
   ### Check List (For Author)
   
   - Test
       - [x] Unit Test: `bash run-fe-ut.sh --run 
org.apache.doris.nereids.rules.rewrite.eageraggregation.EagerAggRewriterTest` — 
31 tests passed.
       - Checkstyle 9.3 passed for both changed Java files using the repository 
configuration. Standalone Maven validation was blocked by unresolved internal 
SNAPSHOT dependencies, so Checkstyle was run directly.
       - `git diff --check` passed.
   
   - Behavior changed:
       - [x] Yes. Prevent unsafe aggregate pushdown for `concat_ws` on the 
nullable side of outer joins.
   
   - Does this need documentation?
       - [x] No.
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label
   


-- 
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]

Reply via email to