neilconway opened a new pull request, #21420:
URL: https://github.com/apache/datafusion/pull/21420

   ## Which issue does this PR close?
   
   - Closes #21410.
   
   ## Rationale for this change
   
   When `split_part` is invoked with a `StringViewArray`, we can avoid copying 
when constructing the return value by instead returning pointers into the view 
buffers of the input `StringViewArray`.
   
   Benchmarks (M4 Max):
   
     - scalar_utf8view_very_long_parts/pos_first: 102 µs → 68 µs (-33%)
     - scalar_utf8view_long_parts/pos_middle: 164 µs → 137 µs (-15%)
     - scalar_utf8_single_char/pos_first: 42.5 µs → 42.9 µs (no change)
     - scalar_utf8_single_char/pos_middle: 96.5 µs → 99.5 µs (noise)
     - scalar_utf8_single_char/pos_negative: 48.3 µs → 48.6 µs (no change)
     - scalar_utf8_multi_char/pos_middle: 132 µs → 132 µs (no change)
     - scalar_utf8_long_strings/pos_middle: 1.06 ms → 1.08 ms (noise)
     - array_utf8_single_char/pos_middle: 355 µs → 365 µs (noise)
     - array_utf8_multi_char/pos_middle: 357 µs → 360 µs (no change)
   
   ## What changes are included in this PR?
   
   * Implement optimization
   * Add benchmark that covers this case
   * Improve SLT test coverage for this code path
   
   ## Are these changes tested?
   
   Yes.
   
   ## Are there any user-facing changes?
   
   No.
   


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