Skip to content

optimize the next function of ArrowArrayStreamReader#5248

Merged
tustvold merged 1 commit intoapache:masterfrom
doki23:ffi_stream_next_optimization
Dec 29, 2023
Merged

optimize the next function of ArrowArrayStreamReader#5248
tustvold merged 1 commit intoapache:masterfrom
doki23:ffi_stream_next_optimization

Conversation

@doki23
Copy link
Contributor

@doki23 doki23 commented Dec 27, 2023

Which issue does this PR close?

Closes #5103 .

@github-actions github-actions bot added the arrow Changes to the arrow crate label Dec 27, 2023
Copy link
Contributor

@tustvold tustvold left a comment

Choose a reason for hiding this comment

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

Looks good to me, thank you

let data = unsafe {
from_ffi_and_data_type(array, DataType::Struct(self.schema().fields().clone()))
}
.ok()?;
Copy link
Contributor

Choose a reason for hiding this comment

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

I know this isn't introduced by this PR, but I wonder why we surpress errors here?

Perhaps @viirya knows?

Copy link
Member

Choose a reason for hiding this comment

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

Maybe I thought that as self.schema is parsed from imported FFI_ArrowSchema, it should be no error to export it to FFI_ArrowSchema again? It doesn't looks quite correct and I think we should propagate the error.

Copy link
Contributor

Choose a reason for hiding this comment

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

@tustvold tustvold merged commit 31b865e into apache:master Dec 29, 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.

ArrowArrayStreamReader imports FFI_ArrowSchema on each iteration

3 participants