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

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   ```
   In [8]: import pyarrow as pa; import pyarrow.compute as pc
   
   In [9]: pa.__version__
   Out[9]: '10.0.1'
   
   In [10]: arr = pa.array(["abcd"])
   
   In [11]: pc.utf8_slice_codeunits(arr, 0)
   ---------------------------------------------------------------------------
   ArrowInvalid                              Traceback (most recent call last)
   Cell In[11], line 1
   ----> 1 pc.utf8_slice_codeunits(arr, 0)
   
   File 
~/opt/miniconda3/envs/pyarrow_10/lib/python3.10/site-packages/pyarrow/compute.py:255,
 in _make_generic_wrapper.<locals>.wrapper(memory_pool, options, *args, 
**kwargs)
       253 if args and isinstance(args[0], Expression):
       254     return Expression._call(func_name, list(args), options)
   --> 255 return func.call(args, options, memory_pool)
   
   File 
~/opt/miniconda3/envs/pyarrow_10/lib/python3.10/site-packages/pyarrow/_compute.pyx:355,
 in pyarrow._compute.Function.call()
   
   File 
~/opt/miniconda3/envs/pyarrow_10/lib/python3.10/site-packages/pyarrow/error.pxi:144,
 in pyarrow.lib.pyarrow_internal_check_status()
   
   File 
~/opt/miniconda3/envs/pyarrow_10/lib/python3.10/site-packages/pyarrow/error.pxi:100,
 in pyarrow.lib.check_status()
   
   ArrowInvalid: Negative buffer resize: -4
   
   In [12]: "abcd"[0:]
   Out[12]: 'abcd'
   ```
   
   Based on the `stop` parameter docs 
   
   >     If given, index to stop slicing at (exclusive). If not given, slicing 
will stop at the end.
   
   
   So I would have expected that `In [12]:` is an equivalent operation to `in 
[11]`
   
   ### Component(s)
   
   Python


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