[
https://issues.apache.org/jira/browse/ARROW-13522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17391521#comment-17391521
]
Antoine Pitrou commented on ARROW-13522:
----------------------------------------
I seem to get the correct results here:
{code:python}
>>> import pyarrow as pa, pyarrow.compute as pc
>>> arr = pa.array(["ab", "ac"])
>>> pc.utf8_ltrim(arr, characters="a").to_pylist()
['b', 'c']
>>> pc.utf8_rtrim(arr, characters="b").to_pylist()
['a', 'ac']
{code}
Are you expecting something else?
> Regression with compute `utf8_*trim` functions.
> -----------------------------------------------
>
> Key: ARROW-13522
> URL: https://issues.apache.org/jira/browse/ARROW-13522
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++, Python
> Affects Versions: 5.0.0
> Reporter: A. Coady
> Priority: Major
>
> {code:java}
> import pyarrow as pa
> import pyarrow.compute as pc
> arr = pa.array(["ab", "ac"])
> assert pc.utf8_ltrim(arr, characters="a").to_pylist() == ["b", ""]
> assert pc.utf8_rtrim(arr, characters="b").to_pylist() == ["a", "a"]
> {code}
> Seems to go awry after the first match.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)