benibus commented on PR #36575:
URL: https://github.com/apache/arrow/pull/36575#issuecomment-1629426845
This may need more work, unfortunately. I've learned that passing
`stop=None` doesn't produce the same results as it would for python arrays if
`step` is also negative. For instance:
```python
>>> s = pa.scalar("𝑓öõḍš")
>>>
>>> pc.utf8_slice_codeunits(s, start=2, stop=None, step=-1)
<pyarrow.StringScalar: ''>
>>>
>>> s.as_py()[2:None:-1]
'õö𝑓'
```
The current behavior is actually equivalent to this:
```python
>>> s.as_py()[2:sys.maxsize:-1]
''
```
So yeah... expanding the python tests was a good call.
--
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]