[C++][Python] `MapArray.value_parent_indices()` crashes (probably segfaults)
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
### Describe the bug, including details regarding any error messages, version, and platform.
The following code fails for me with the interpreter crashing:
```python
import pyarrow as pa
print(pa.__version__)
a = pa.array([dict(a=1,b=2),dict(c=3)],pa.map_(pa.utf8(), pa.uint16()))
print(a.value_parent_indices()) # <-- crashes
```
The very similar `ListArray` implementation does not seem to have this problem
```python
import pyarrow as pa
print(pa.__version__)
a = pa.array(
[list(d.items()) for d in [dict(a=1,b=2),dict(c=3)]],
pa.list_(pa.struct([pa.field("key",pa.utf8()), pa.field("value",pa.uint16())])),
)
print(a.value_parent_indices())
```
Versions:
- `Python 3.13.2 (main, Feb 9 2025, 08:12:44) [Clang 16.0.0 (clang-1600.0.26.6)` (pyenv-built on arm64 macOS)
- pip-installed pyarrow 19.0.1
### Component(s)
Python
Contributor guide
Assessment
This issue has not been assessed yet.