Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C++] utf8_slice_codeunits crashes with max start and negative step #34928

Closed
jorisvandenbossche opened this issue Apr 6, 2023 · 1 comment
Closed

Comments

@jorisvandenbossche
Copy link
Member

Describe the bug, including details regarding any error messages, version, and platform.

Reproducer in Python:

In [2]: import sys

In [3]: pa.compute.utf8_slice_codeunits("test", start=sys.maxsize, stop=0, step=-1)
/home/joris/scipy/repos/arrow/cpp/src/arrow/compute/kernels/scalar_string_internal.h:109:  Check failed: (output_ncodeunits) <= (max_output_ncodeunits) 

The idea is that this would slice from the end (the max int value is always beyond the end of a single string) to the beginning of the string with a certain step.

Component(s)

C++

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

No branches or pull requests

3 participants