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(arrow-ipc) Add: Support FileReader and StreamReader skip array data validation #6938

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions arrow-data/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1890,6 +1890,21 @@ impl ArrayDataBuilder {
data
}

/// Creates an array data, without any validation,
/// but aligning buffers.
///
/// # Safety
///
/// The same caveats as [`ArrayData::new_unchecked`] apply.
pub unsafe fn build_aligned_unchecked(self) -> ArrayData {
let mut data = self.build_impl();
data.align_buffers();
// Provide a force_validate mode
#[cfg(feature = "force_validate")]
data.validate_data().unwrap();
data
}

/// Same as [`Self::build_unchecked`] but ignoring `force_validate` feature flag
unsafe fn build_impl(self) -> ArrayData {
let nulls = self
Expand Down
Loading
Loading