You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "spenczar (via GitHub)" <gi...@apache.org> on 2023/04/08 16:59:34 UTC

[GitHub] [arrow] spenczar commented on issue #34985: Python extension types aren't usable in struct arrays

spenczar commented on issue #34985:
URL: https://github.com/apache/arrow/issues/34985#issuecomment-1500933703

   Actually, making the array explicitly with StructArray.from_arrays works:
   ```
   def make_struct_array_explicitly():
       data = [1, 2, 3, 4, 5]
       typ = CustomExtensionType()
       return pa.StructArray.from_arrays([pa.array(data, typ)], fields=[("val", typ)])
   ```
   
   So I think this is really about `pa.array`'s handling of structs that contain extension types.


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