danepitkin commented on issue #37757:
URL: https://github.com/apache/arrow/issues/37757#issuecomment-1769149301
No problem! Here's a small PyArrow-only example that does not reproduce the
issue. I don't think it recreates the exact inputs that Awkward Array is using
though. Note that the empty array does fail, but I believe Awkward Array
handles this internally before calling PyArrow.
arrow_37757.py
```
import pyarrow as pa
import pyarrow.compute as pc
string_padded = [
[" αβγ ", " "],
[],
[" →δε← ", " ζz zζ ", " abc "],
]
expected = [
[["", "αβγ", "", ""], ["", "", ""]],
[],
[["", "→δε←", "", ""], ["", "ζz", "zζ", "", ""], ["", "abc", "", ""]],
]
for i, item in enumerate(string_padded):
arr = pa.array(item)
print(f"Testing: {arr}")
try:
assert pc.utf8_split_whitespace(item, max_splits=None).to_pylist()
== expected[i]
except Exception as err:
print(f"{err=}")
print("Test FAILED")
else:
print("Test PASSED")
print()
```
Output:
```
$ python arrow_37757.py
Testing: [
" αβγ ",
" "
]
Test PASSED
Testing: 0 nulls
err=ArrowNotImplementedError("Function 'utf8_split_whitespace' has no kernel
matching input types (null)")
Test FAILED
Testing: [
" →δε← ",
" ζz zζ ",
" abc "
]
Test PASSED
```
Version
```
$ python -c "import pyarrow as pa; print(pa.__version__);"
13.0.0
```
--
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]