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

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   When attempting to use a `RunEndEncoded` array with either a `struct` or a 
`list`, an exception is raised indicating that no matching kernel is available.
   
   #### Steps to Reproduce:
   Please run the following example code to reproduce the issue:
   
   ```python
   import pyarrow as pa
   
   for data_type, values in [
       [pa.struct([pa.field("age", pa.int32())]), {"age": 20}],
       [pa.list_(pa.int32()), [20]]
   ]:
       try:
           schema = pa.schema([pa.field("data", pa.run_end_encoded(pa.int16(), 
data_type))])
   
           data = [
               {"data": values},
           ]
   
           table = pa.Table.from_pylist(data, schema=schema)
       except Exception as e:
           print(f"Failed with {data_type} {e}")
   ```
   
   #### Observed Output:
   ```
   Failed with struct<age: int32> Function 'run_end_encode' has no kernel 
matching input types (struct<age: int32>)
   Failed with list<item: int32> Function 'run_end_encode' has no kernel 
matching input types (list<item: int32>)
   ```
   
   #### Expected Behavior:
   The code should correctly create a `RunEndEncoded` array using both `struct` 
and `list` types without raising exceptions.
   
   #### Environment:
   - PyArrow version: 18.0.0.dev
   - Python version: 3.12.5
   - Platform: Mac OS X
   
   #### Additional Context:
   The failure seems to suggest that the `run_end_encode` function does not 
currently support `struct` or `list` types, but it's not explicitly documented 
whether this is intentional or an oversight.
   
   
   
   ### 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-unsubscr...@arrow.apache.org.apache.org

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

Reply via email to