diff --git a/arrow/src/array/data.rs b/arrow/src/array/data.rs
index d2db0d0c8844..cbbc56a2456a 100644
--- a/arrow/src/array/data.rs
+++ b/arrow/src/array/data.rs
@@ -198,29 +198,6 @@ pub(crate) fn new_buffers(data_type: &DataType, capacity: usize) -> [MutableBuff
}
}
-/// Ensures that at least `min_size` elements of type `data_type` can
-/// be stored in a buffer of `buffer_size`.
-///
-/// `buffer_index` is used in error messages to identify which buffer
-/// had the invalid index
-#[allow(dead_code)]
-fn ensure_size(
- data_type: &DataType,
- min_size: usize,
- buffer_size: usize,
- buffer_index: usize,
-) -> Result<()> {
- // if min_size is zero, may not have buffers (e.g. NullArray)
- if min_size > 0 && buffer_size < min_size {
- Err(ArrowError::InvalidArgumentError(format!(
- "Need at least {} bytes in buffers[{}] in array of type {:?}, but got {}",
- buffer_size, buffer_index, data_type, min_size
- )))
- } else {
- Ok(())
- }
-}
-
/// Maps 2 [`MutableBuffer`]s into a vector of [Buffer]s whose size depends on `data_type`.
#[inline]
pub(crate) fn into_buffers(
diff --git a/arrow/src/compute/util.rs b/arrow/src/compute/util.rs
index 3f168c13191e..62c3be62f55a 100644
--- a/arrow/src/compute/util.rs
+++ b/arrow/src/compute/util.rs
@@ -18,7 +18,7 @@
//! Common utilities for computation kernels.
use crate::array::*;
-use crate::buffer::{buffer_bin_and, buffer_bin_or, Buffer};
+use crate::buffer::{buffer_bin_and, Buffer};
use crate::datatypes::*;
use crate::error::{ArrowError, Result};
use num::{One, ToPrimitive, Zero};
@@ -58,41 +58,6 @@ pub(super) fn combine_option_bitmap(
}
}
-/// Compares the null bitmaps of two arrays using a bitwise `or` operation.
-///
-/// This function is useful when implementing operations on higher level arrays.
-#[allow(clippy::unnecessary_wraps)]
-#[allow(dead_code)]
-pub(super) fn compare_option_bitmap(
- left_data: &ArrayData,
- right_data: &ArrayData,
- len_in_bits: usize,
-) -> Result