mosalx opened a new issue, #35359:
URL: https://github.com/apache/arrow/issues/35359
### Describe the bug, including details regarding any error messages,
version, and platform.
Windows 10
python=3.11.2
pyarrow=11.0.0
```python
import pyarrow as pa
array = pa.array([None, None], type=pa.list_(pa.int32()))
array.flatten()
# Output:
<pyarrow.lib.Int32Array object at 0x000001EBA976FDC0>
[]
```
Same array but with fixed size raises `ArrowInvalid`
```python
array = pa.array([None, None], type=pa.list_(pa.int32(), list_size=1))
array.flatten()
# Output
---------------------------------------------------------------------------
ArrowInvalid Traceback (most recent call last)
Cell In[69], line 1
----> 1 array.flatten()
File
~\AppData\Local\miniconda3\envs\dev311_1\Lib\site-packages\pyarrow\array.pxi:1871,
in pyarrow.lib.BaseListArray.flatten()
File
~\AppData\Local\miniconda3\envs\dev311_1\Lib\site-packages\pyarrow\compute.py:239,
in _make_generic_wrapper.<locals>.wrapper(memory_pool, *args)
237 if args and isinstance(args[0], Expression):
238 return Expression._call(func_name, list(args))
--> 239 return func.call(args, None, memory_pool)
File
~\AppData\Local\miniconda3\envs\dev311_1\Lib\site-packages\pyarrow\_compute.pyx:355,
in pyarrow._compute.Function.call()
File
~\AppData\Local\miniconda3\envs\dev311_1\Lib\site-packages\pyarrow\error.pxi:144,
in pyarrow.lib.pyarrow_internal_check_status()
File
~\AppData\Local\miniconda3\envs\dev311_1\Lib\site-packages\pyarrow\error.pxi:100,
in pyarrow.lib.check_status()
ArrowInvalid: Must pass at least one array
```
Expected behavior: should return an empty array or, since fixed size lists
must allocate memory for null slots, should return an array of two nulls (equal
to `array.values`)
This issue may be related to the fix implemented for this issue:
https://issues.apache.org/jira/browse/ARROW-16174
### 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]