chaokunyang opened a new issue, #35815:
URL: https://github.com/apache/arrow/issues/35815

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   Arrow compute function `utf8_trim` doesn't support dictionary array:
   
   ```
   File 
~/anaconda3/envs/py3.8/lib/python3.8/site-packages/pyarrow/_compute.pyx:367, in 
pyarrow._compute.Function.call()
   
   File 
~/anaconda3/envs/py3.8/lib/python3.8/site-packages/pyarrow/error.pxi:144, in 
pyarrow.lib.pyarrow_internal_check_status()
   
   File 
~/anaconda3/envs/py3.8/lib/python3.8/site-packages/pyarrow/error.pxi:121, in 
pyarrow.lib.check_status()
   
   ArrowNotImplementedError: Function 'utf8_trim' has no kernel matching input 
types (dictionary<values=string, indices=int64, ordered=0>)
   ```
   
   Reproduction script:
   ```python
   da = pa.DictionaryArray.from_arrays(pa.array([1,2,1,2,1,2,0,0]), 
pa.array(["abc", "b", "a"]))
   pc.utf8_trim(da, characters="bc")
   ```
   
   Decode DictionaryArray into StringArray will work.
   
   ### Component(s)
   
   C++


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