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

   ### What problem does this PR solve?
   
   Issue Number: Related to #48203
   
   Related PR:
   https://github.com/apache/doris-website/pull/4106
   
   Problem Summary:
   
   Add the `trim_array(array, n)` scalar function. The BE implementation
   trims trailing elements directly from array storage and avoids virtual
   function calls in the hot loop.
   
   Register the function and its signature in the Nereids planner. Add FE
   constant folding so constant invocations can be evaluated during
   planning.
   
   Cover normal and constant columns, NULL values, nullable elements,
   nested arrays, multiple element types, zero, negative and out-of-range
   sizes, and the maximum BIGINT value.
   
   ### Release note
   
   Add the TRIM_ARRAY scalar function.
   
   ### Check List (For Author)
   
   - Test
     - [x] Regression test
     - [x] 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
   
   Test results:
   
   - BE ASAN build passed.
   - `FunctionArrayTrimTest.all_argument_combinations` passed.
   - FE unit tests passed: 2 tests, 0 failures and 0 errors.
   - The trim_array regression suite passed with no mismatches.
   - `run-be-ut.sh` and `run-regression-test.sh` completed
     successfully for the relevant tests.
   
   - Behavior changed:
     - [ ] No.
     - [x] Yes. Adds the new `trim_array` scalar function.
   
   - Does this need documentation?
     - [ ] No.
     - [x] Yes.
       https://github.com/apache/doris-website/pull/4106
   
   ### 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