Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement simple RecordBatchReader #3704

Closed
wjones127 opened this issue Feb 12, 2023 · 2 comments · Fixed by #3733
Closed

Implement simple RecordBatchReader #3704

wjones127 opened this issue Feb 12, 2023 · 2 comments · Fixed by #3733
Assignees
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog good first issue Good for newcomers help wanted

Comments

@wjones127
Copy link
Member

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

As part of ADBC API, we need to produce RecordBatchReader from data. I wasn't able to find any existing struct that produces one from a RecordBatch or Vec<RecordBatch>. Would be happy to hear if I am mistaken! Otherwise, happy to submit a PR for this.

Describe the solution you'd like

Probably something like:

struct SimpleRecordBatchReader { ... }

impl SimpleRecordBatchReader {
    pub fn new(batches: Vec<RecordBatch>, schema: SchemaRef) -> Self;
}

Describe alternatives you've considered

Open to any alternatives.

Additional context

@wjones127 wjones127 added the enhancement Any new improvement worthy of a entry in the changelog label Feb 12, 2023
@tustvold
Copy link
Contributor

tustvold commented Feb 13, 2023

What do you think of a generic RecordBatchIterator<I> that can be created from I: IntoIterator<Item=Result<RecordBatch>> and a corresponding Schema and implement RecordBatchReader? I think this would cover the in-memory use-case you describe, as well as streaming versions?

@wjones127
Copy link
Member Author

That sounds even better!

@wjones127 wjones127 self-assigned this Feb 18, 2023
@tustvold tustvold added the arrow Changes to the arrow crate label Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog good first issue Good for newcomers help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants