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

   Issue Number: Pick #62069
   
   Related PR: #xxx
   
   Problem Summary:
   
   Improvement of #60352, optimize explode_outer, posexplode and 
posexplode_outer.
   
   The approach is a single-pass algorithm: walk through child rows, 
accumulating contiguous segments into the output, then when hitting a 
null/empty row or reaching the end, flush the segment using bulk operations. 
For outer-null rows, insert a NULL and copy the non-table-function columns 
directly. This naturally handles both outer and
   non-outer modes since non-outer mode just won't produce any null outputs. 
For posexplode, generate position indices alongside this.
   
   Performance test result.
   Create and populate a large test table. Use 100,000,000 base rows, each with 
an array of 10 INT elements, producing 1,000,000,000 total exploded output rows.
   
   | Function | slow path | optimized | SpeedUp|
   | --------- |---------- |-----------|----------|
   | explode | 9734 ms | 5105 ms |90%|
   | explode_outer | 9685 ms | 5064 ms |91%|
   | posexplode | 11021 ms | 5963 ms |84%|
   | posexplode_outer | 14088 ms | 5903 ms |138%|
   
   None
   
   - Test <!-- At least one of them must be included. -->
       - [ ] Regression test
       - [ ] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
   - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change. - [ ] No code files have 
been changed. - [ ] Other reason <!-- Add your reason?  -->
   
   - Behavior changed:
       - [ ] No.
       - [ ] Yes. <!-- Explain the behavior change -->
   
   - Does this need documentation?
       - [ ] No.
   - [ ] Yes. <!-- Add document PR link here. eg: 
https://github.com/apache/doris-website/pull/1214 -->
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label <!-- Add branch pick label that this PR should 
merge into -->
   
   ### What problem does this PR solve?
   
   Issue Number: close #xxx
   
   Related PR: #xxx
   
   Problem Summary:
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [ ] Regression test
       - [ ] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
           - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change.
           - [ ] No code files have been changed.
           - [ ] Other reason <!-- Add your reason?  -->
   
   - Behavior changed:
       - [ ] No.
       - [ ] Yes. <!-- Explain the behavior change -->
   
   - Does this need documentation?
       - [ ] No.
       - [ ] Yes. <!-- Add document PR link here. eg: 
https://github.com/apache/doris-website/pull/1214 -->
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label <!-- Add branch pick label that this PR should 
merge into -->
   
   


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