[
https://issues.apache.org/jira/browse/ARROW-15747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17495754#comment-17495754
]
Jorge Leitão edited comment on ARROW-15747 at 2/21/22, 8:56 PM:
----------------------------------------------------------------
I see. Thanks.
Is there an API for anything else in Python? I could only find this one in the
docs? https://arrow.apache.org/docs/python/api/ipc.html
Regardless, I am struggling to make this compatible - when I export it to the C
stream interface an empty iterator, the sequence of events I get:
* get_next called
* empty ArrowArray (i.e. released, no buffers, no children) created on the
stack
* core dump (on the call to write the empty ArrowArray to the pointer passed to
get_next)
I.e. we are being unable to write to the pointer passed to get_next (allocated
by C++).
If I do nothing to the pointer when the iterator is empty (i.e. not write a
released array), the same happens when trying to write to the ArrowSchema
pointer passed to get_schema - core dump on the call to write.
Note that this is different from anything else so far, in the C data interface
we have been allocating from Rust, pass the pointer to C++, which consumes from
the passed ArrowArray and ArrowSchema.
was (Author: jorgecarleitao):
I see. Thanks.
Is there an API for anything else in Python? I could only find this one in the
docs? https://arrow.apache.org/docs/python/api/ipc.html
Regardless, I am struggling to make this compatible - when I export it to the C
stream interface an empty iterator, the sequence of events I get:
* get_next called
* empty ArrowArray (i.e. released, no buffers, no children) created on the
stack
* core dump (on the call to write the empty ArrowArray to the pointer passed to
get_next)
> [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)