Skip to content

[Python] Support requested_schema in __arrow_c_stream__ implementations #40066

Description

@paleolimbot

Describe the enhancement requested

As noted in #39985 (comment) , we have a few ways available to us to cast a stream of record batches, and ideally we would do this batch-wise. In #39985 I attempted a simple solution using Table.cast(); however, this was a little too simple and lazily-cast-per-batch solution will also make this work for the RecordBatchReader implementation.

I'm game to attempt a C++ solution to this...it is possible to do this using the "record batch from iterable" approach, too, but I think the C++ is reasonably compact and would avoid any involvement of the GIL/Python interpreter that could impact performance when using requested_schema.

Component(s)

Python

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions