You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "AlenkaF (via GitHub)" <gi...@apache.org> on 2024/02/28 12:43:52 UTC

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

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: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Python] Support construction of Run-End Encoded arrays in pa.array(..) [arrow]

Posted by "jorisvandenbossche (via GitHub)" <gi...@apache.org>.
jorisvandenbossche commented on issue #40273:
URL: https://github.com/apache/arrow/issues/40273#issuecomment-2008963314

   Issue resolved by pull request 40341
   https://github.com/apache/arrow/pull/40341


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Python] Support construction of Run-End Encoded arrays in pa.array(..) [arrow]

Posted by "jorisvandenbossche (via GitHub)" <gi...@apache.org>.
jorisvandenbossche closed issue #40273: [Python] Support construction of Run-End Encoded arrays in pa.array(..)
URL: https://github.com/apache/arrow/issues/40273


-- 
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: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org