SohamDutta02 opened a new issue, #55616:
URL: https://github.com/apache/arrow/issues/55616
### Describe the enhancement requested
`search_sorted` (added in #49677) raises `NotImplemented` for
decimal32/64/128/256 and `fixed_size_binary[N]` inputs, although these types
are orderable and already supported by `sort_indices`. A decimal column sorted
with Arrow therefore can't be searched with Arrow.
Repro (pyarrow 26.0.1):
```python
import pyarrow as pa, pyarrow.compute as pc
from decimal import Decimal
values = pa.array([Decimal("1.0"), Decimal("2.5"), Decimal("4.0")],
pa.decimal128(5, 1))
pc.sort_indices(values) # works
pc.search_sorted(values, pa.array([Decimal("2.5")], pa.decimal128(5, 1)))
# pyarrow.lib.ArrowNotImplementedError: search_sorted is not implemented for
type decimal128(5, 1)
```
The same error occurs for `decimal32`, `decimal64`, `decimal256` and
`fixed_size_binary[N]`.
`VISIT_SEARCH_SORTED_PHYSICAL_TYPES` in
`cpp/src/arrow/compute/kernels/vector_search_sorted.cc` only covers boolean,
integer, floating-point, binary, large_binary and binary_view physical types,
so these types fall through to the `NotImplemented` branch.
### Component(s)
C++, 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]