HyukjinKwon opened a new pull request, #48955:
URL: https://github.com/apache/arrow/pull/48955
### Rationale for this change
Null-type dictionaries (e.g., `dictionary(int8(), null())`) are valid Arrow
constructs supported from day one, but the sorting code had an uncertain `XXX
Should this support Type::NA?` comment. We should explicitly support and test
this because other functions already support this:
```python
import pyarrow as pa
import pyarrow.compute as pc
pc.array_sort_indices(pa.array([None, None, None, None], type=pa.int32()))
# [0, 1, 2, 3]
pc.array_sort_indices(pa.DictionaryArray.from_arrays(
indices=pa.array([None, None, None, None], type=pa.int8()),
dictionary=pa.array([], type=pa.null())
))
# [0, 1, 2, 3]
```
I believe it does not make sense to specifically disallow this in
dictionaries at this point.
### What changes are included in this PR?
Added a unittest for null sorting behaviour.
### Are these changes tested?
Yes, the unittest was added.
### Are there any user-facing changes?
No.
--
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]