You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "jorisvandenbossche (via GitHub)" <gi...@apache.org> on 2024/04/08 08:55:11 UTC

[I] [Python] Support schema-like objects through the Arrow PyCapule protocol as type or schema argument in the constructors [arrow]

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

   See https://github.com/apache/arrow/pull/40818#issuecomment-2042199016 for context.
   
   Our constructor functions like `pa.array(..)`, `pa.chunked_array(..)`, `pa.record_batch(..)` and `pa.table(..)` accept a `type` or `schema` argument. 
   Those constructors can all be used to consume data that support the Arrow PyCapsule protocol, and to convert those objects to the equivalent pyarrow object. For those cases, it would make sense to also accept the `type` or `schema` keyword argument as any object supporting the capsule protocol for schemas, i.e. having a `__arro_c_schema__`, while right now we require an actual pyarrow object.
   
   One question is whether we would always support schema-like objects with the ArrowSchema protocol as input wherever specifying a type or schema, or whether we _only_ allow this when actually consuming data through the protocol (i.e. if the data object itself has the `__arrow_c_array/stream__`)


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