You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Andre Kohn (Jira)" <ji...@apache.org> on 2022/12/02 23:04:00 UTC

[jira] [Created] (ARROW-18423) [Python] Expose reading a schema from an IPC message

Andre Kohn created ARROW-18423:
----------------------------------

             Summary: [Python] Expose reading a schema from an IPC message
                 Key: ARROW-18423
                 URL: https://issues.apache.org/jira/browse/ARROW-18423
             Project: Apache Arrow
          Issue Type: Improvement
          Components: Python
            Reporter: Andre Kohn


Pyarrow currently does not implement reading the Arrow schema from an IPC message.

[https://github.com/apache/arrow/blob/80b389efe902af376a85a8b3740e0dbdc5f80900/python/pyarrow/ipc.pxi#L1094]

 

We'd like to consume Arrow IPC stream data like the following:

```

    schema_msg = pyarrow.ipc.read_message(result_iter.next().data)
    schema = pyarrow.ipc.read_schema(schema_msg)
    for batch_data in result_iter:
        batch_msg = pyarrow.ipc.read_message(batch_data.data)
        batch = pyarrow.ipc.read_record_batch(batch_msg, schema)
```

 

The associated (tiny) PR on GitHub implements this reading by binding the existing C++ function.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)