AlenkaF opened a new pull request #11765:
URL: https://github.com/apache/arrow/pull/11765
In this PR I added `StructFieldOptions` binding and two small typo
corrections for `TypeError` message in `compute.py`.
What I haven't managed to solve and would ask for suggestions is the case
when options are not specified. Example:
```python
import pyarrow as pa
import pyarrow.compute as pc
a = pa.array([4, 5, 6], type=pa.int64())
b = pa.array(["bar", None, ""])
c = pa.StructArray.from_arrays([a, b], ["a", "b"])
arr = pa.StructArray.from_arrays([a, c], ["a", "c"])
pc.struct_field(arr)
```
This error I get:
```python-traceback
>>> pc.struct_field(arr)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/alenkafrim/repos/arrow/python/pyarrow/compute.py", line 202,
in wrapper
return func.call(args, options, memory_pool)
File "pyarrow/_compute.pyx", line 327, in pyarrow._compute.Function.call
result = GetResultValue(
File "pyarrow/error.pxi", line 143, in
pyarrow.lib.pyarrow_internal_check_status
return check_status(status)
File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
raise ArrowInvalid(message)
pyarrow.lib.ArrowInvalid: Attempted to initialize KernelState from null
FunctionOptions
```
For which I tried to add
https://github.com/AlenkaF/arrow/blob/bec0a6beac3415e03400088a3269f3be3fc7150c/python/pyarrow/_compute.pyx#L977-L978
but it doesn't seem to help.
--
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]