NathanChung4 opened a new pull request, #51134:
URL: https://github.com/apache/arrow/pull/51134

   ### Rationale for this change
   
   utf8_trim, utf8_ltrim, and utf8_rtrim error out on dictionary encoded string 
arrays instead of working.
   
   ### What changes are included in this PR?
   
   A new ScalarFunction subclass with a DispatchBest mechanism that unwraps a 
dictionary
   to its value type and retries dispatch, and the three trim functions 
(utf8_trim,
   utf8_ltrim, utf8_rtrim) switched over to use it instead of the default.
   
   ### Are these changes tested?
   
   These changes are tested. arrow-compute-scalar-type-test (253 tests, 
including the
   new one) passed, and I ran the entire arrow::compute test suite (15 test 
binaries)
   to make sure nothing else broke. pre-commit (C++ Format + C++ Lint) came 
back clean.
   
   ### Are there any user-facing changes?
   
   Yes. The three trim functions now accept dictionary encoded string arrays 
instead
   of raising NotImplemented.
   
   ### AI Disclosure
   
   Claude helped and guided me through most of the work: it helped trace the 
dispatch
   mechanism, identified the existing pattern to follow (from 
scalar_compare.cc), wrote
   the implementation and the added test case, and ran the builds and test 
suites. Claude
   also walked me through the mechanism until I understood it. I decided to 
scope this
   to just the three trim functions rather than the whole file, reviewed the 
diff, and
   wrote the commit message and this PR description myself.
   
   * GitHub Issue: #35815
   


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

Reply via email to