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)

Reply via email to