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

feat: support RecordBatchReader on boxed trait objects #4475

Merged
merged 2 commits into from
Jul 3, 2023

Conversation

wjones127
Copy link
Member

Which issue does this PR close?

Closes #4474.

This also contains a drive-by change to make the FFI export require Send, since we implemented send for the FFI struct earlier in #4232.

Rationale for this change

Makes it possible to take generic impl RecordBatchReader arguments that support boxed and unboxed ones.

What changes are included in this PR?

Are there any user-facing changes?

@github-actions github-actions bot added the arrow Changes to the arrow crate label Jul 2, 2023
@@ -157,7 +157,7 @@ impl Drop for FFI_ArrowArrayStream {

impl FFI_ArrowArrayStream {
/// Creates a new [`FFI_ArrowArrayStream`].
pub fn new(batch_reader: Box<dyn RecordBatchReader>) -> Self {
pub fn new(batch_reader: Box<dyn RecordBatchReader + Send>) -> Self {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is sort of a bug fix to get in compliant with the released API, but in a direct sense it is breaking, so maybe this should be labelled as breaking change? Not sure 🤔

@tustvold tustvold merged commit 5ea197d into apache:master Jul 3, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement RecordBatchReader for Boxed trait object
2 participants