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

Cleanup ArrayData::buffers #4583

Merged
merged 4 commits into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
12 changes: 6 additions & 6 deletions arrow-data/src/data/mod.rs → arrow-data/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ use std::sync::Arc;

use crate::equal;

mod buffers;
pub use buffers::*;
/// A collection of [`Buffer`]
#[doc(hidden)]
pub type Buffers<'a> = &'a [Buffer];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This makes the change backwards compatible

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a "deprecated" marker to it though so it can be removed in some future version?


#[inline]
pub(crate) fn contains_nulls(
Expand Down Expand Up @@ -345,10 +346,9 @@ impl ArrayData {
&self.data_type
}

/// Returns the [`Buffers`] storing data for this [`ArrayData`]
pub fn buffers(&self) -> Buffers<'_> {
// In future ArrayData won't store data contiguously as `Vec<Buffer>` (#1799)
Buffers::from_slice(&self.buffers)
/// Returns the [`Buffer`] storing data for this [`ArrayData`]
pub fn buffers(&self) -> &[Buffer] {
&self.buffers
}

/// Returns a slice of children [`ArrayData`]. This will be non
Expand Down
96 changes: 0 additions & 96 deletions arrow-data/src/data/buffers.rs

This file was deleted.