Skip to content

[Python] Support construction of Run-End Encoded arrays in pa.array(..) #40273

@AlenkaF

Description

@AlenkaF

Describe the enhancement requested

We want to enable the construction of a Run-End Encoded arrays with pyarrow.array constructor. Example:

>>> arr = [1, 2, 2, 3, 3, 3]
>>> ree_arr = pc.run_end_encode(arr)
>>> pa.array(arr, type=ree_type)   # Fails
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pyarrow/array.pxi", line 343, in pyarrow.lib.array
    result = _sequence_to_array(obj, mask, size, type, pool, c_from_pandas)
  File "pyarrow/array.pxi", line 42, in pyarrow.lib._sequence_to_array
    chunked = GetResultValue(
  File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
    return check_status(status)
  File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
    raise convert_status(status)
pyarrow.lib.ArrowNotImplementedError: run_end_encoded

Component(s)

Python

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions