From 6a30fd5d18ba92c05f3cd175bec529392d1b72e7 Mon Sep 17 00:00:00 2001 From: Raphael Taylor-Davies Date: Thu, 15 Sep 2022 21:39:39 +0100 Subject: [PATCH 1/2] Partially flatten arrow-buffer --- arrow-buffer/src/lib.rs | 9 +++++++-- arrow/src/bitmap.rs | 3 +-- arrow/src/datatypes/native.rs | 2 +- arrow/src/util/mod.rs | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/arrow-buffer/src/lib.rs b/arrow-buffer/src/lib.rs index a8aca7c3dad..74d2bd5ec86 100644 --- a/arrow-buffer/src/lib.rs +++ b/arrow-buffer/src/lib.rs @@ -19,6 +19,11 @@ pub mod alloc; pub mod buffer; +pub use buffer::{Buffer, MutableBuffer}; + mod bytes; -pub mod native; -pub mod util; +mod native; + +pub use native::*; +mod util; +pub use util::*; diff --git a/arrow/src/bitmap.rs b/arrow/src/bitmap.rs index 4491da4632b..6699bc21239 100644 --- a/arrow/src/bitmap.rs +++ b/arrow/src/bitmap.rs @@ -17,12 +17,11 @@ //! Defines [Bitmap] for tracking validity bitmaps -use crate::buffer::Buffer; use crate::error::{ArrowError, Result}; use crate::util::bit_util; use std::mem; -use arrow_buffer::buffer::{buffer_bin_and, buffer_bin_or}; +use arrow_buffer::buffer::{Buffer, buffer_bin_and, buffer_bin_or}; use std::ops::{BitAnd, BitOr}; #[derive(Debug, Clone)] diff --git a/arrow/src/datatypes/native.rs b/arrow/src/datatypes/native.rs index 8c329a066e5..de35c4804fa 100644 --- a/arrow/src/datatypes/native.rs +++ b/arrow/src/datatypes/native.rs @@ -16,7 +16,7 @@ // under the License. use super::DataType; -pub use arrow_buffer::native::{ArrowNativeType, ToByteSlice}; +pub use arrow_buffer::{ArrowNativeType, ToByteSlice}; use half::f16; /// Trait bridging the dynamic-typed nature of Arrow (via [`DataType`]) with the diff --git a/arrow/src/util/mod.rs b/arrow/src/util/mod.rs index 5453c11ab8a..adafc9f5053 100644 --- a/arrow/src/util/mod.rs +++ b/arrow/src/util/mod.rs @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -pub use arrow_buffer::util::{bit_chunk_iterator, bit_util}; +pub use arrow_buffer::{bit_chunk_iterator, bit_util}; #[cfg(feature = "test_utils")] pub mod bench_util; From ab1218d8722ac7e7c831ef09dd49654e8e51459f Mon Sep 17 00:00:00 2001 From: Raphael Taylor-Davies Date: Thu, 15 Sep 2022 21:43:00 +0100 Subject: [PATCH 2/2] Format --- arrow/src/bitmap.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arrow/src/bitmap.rs b/arrow/src/bitmap.rs index 6699bc21239..dbf9706677a 100644 --- a/arrow/src/bitmap.rs +++ b/arrow/src/bitmap.rs @@ -21,7 +21,7 @@ use crate::error::{ArrowError, Result}; use crate::util::bit_util; use std::mem; -use arrow_buffer::buffer::{Buffer, buffer_bin_and, buffer_bin_or}; +use arrow_buffer::buffer::{buffer_bin_and, buffer_bin_or, Buffer}; use std::ops::{BitAnd, BitOr}; #[derive(Debug, Clone)]