[
https://issues.apache.org/jira/browse/ARROW-15747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17495773#comment-17495773
]
Jorge Leitão commented on ARROW-15747:
--------------------------------------
Ok, I made it work! There is no guarantee that the pointer from C is aligned
with Rust's representation, so a different call is needed.
Other than that, the only thing I was unable to find was an API in Python to
write arrays other than StructArray / RecordBatch
> [C++] Allow C stream interface to accept any array
> --------------------------------------------------
>
> Key: ARROW-15747
> URL: https://issues.apache.org/jira/browse/ARROW-15747
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C++
> Reporter: Jorge Leitão
> Priority: Major
>
> It seems that the C stream interface in pyarrow currently requires the array
> to be a StructArray.
> I do not see this constraint in the spec
> (https://arrow.apache.org/docs/format/CStreamInterface.html).
> The error I get when I pass an Int32Array to it (declared on the schema):
> {code:java}
> Invalid: Cannot import schema: ArrowSchema describes non-struct type int32
> {code}
> It would be nice to support everything, like the C data interface.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)