[Python] pa.compute.fill_null where fill value is FixedSizedBinaryArray fails with unexpected error
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 91
Description
### Describe the bug, including details regarding any error messages, version, and platform.
```python
>>> s1 = pa.array(["ab", None], pa.string())
>>> s2 = pa.array([bytearray([97,98]), None], type=pa.binary(2))
>>> pa.compute.fill_null(s1, s2)
Traceback (most recent call last):
File "", line 1, in
File "C:\ca2_ps_311\Lib\site-packages\pyarrow\compute.py", line 523, in fill_null
fill_value = pa.scalar(fill_value.as_py(), type=values.type)
^^^^^^^^^^^^^^^^
AttributeError: 'pyarrow.lib.FixedSizeBinaryArray' object has no attribute 'as_py'
```
### Component(s)
Python
Contributor guide
Research direction
Start in pyarrow/compute.py at the fill_null implementation around line 523 and reproduce the reported example with a string array and a FixedSizeBinaryArray fill value. Confirm that the call completes without the AttributeError and that the null value is filled with the binary value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100