Skip to content

[C++][Compute] Function 'utf8_trim' has no kernel matching input types (dictionary<values=string, indices=int64, ordered=0>) #35815

Description

@chaokunyang

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:

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions