apache / apache/arrow

Implement 'array_take' kernel for run_end_encoded<...> type.

Open
#46,377 0 comments 0 reactions 0 assignees View on GitHub
Component: C++ Component: Python Type: bug
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.

Calling `pa.compute.take()` (or `arrow::compute::Take()` in C++) on an REE encoded array is not supported. While it's clear that the implementation will probably be non-trivial, from the functional perspective, there is no reason not to have it. IIUC, the `Take()` function is the canonical way to sort data, so that if a `Table` has an REE column, such sorting fails.

Min reproduction:
```python
import pyarrow as pa
rle_encoded = pa.compute.run_end_encode([1, 1, 1, 2, 2, 3, 3, 3, 3])
pa.compute.take(rle_encoded, pa.array([0,2,4,6]))
```

### Component(s)

C++, Python

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.