AlenkaF opened a new issue, #40273:
URL: https://github.com/apache/arrow/issues/40273

   ### Describe the enhancement requested
   
   We want to enable the construction of a Run-End Encoded arrays with 
`pyarrow.array` constructor. Example:
   
   ```python 
   >>> arr = [1, 2, 2, 3, 3, 3]
   >>> ree_arr = pc.run_end_encode(arr)
   >>> ree_type = pa.run_end_encoded(pa.int32(), pa.int64())
   
   >>> pa.array(ree_arr)    # Works
   <pyarrow.lib.RunEndEncodedArray object at 0x12ef46620>
   
   -- run_ends:
     [
       1,
       3,
       6
     ]
   -- values:
     [
       1,
       2,
       3
     ]
   >>> 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


-- 
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]

Reply via email to