diff --git a/arrow-buffer/src/buffer/scalar.rs b/arrow-buffer/src/buffer/scalar.rs index 3b75d5384046..ca1a1d230b12 100644 --- a/arrow-buffer/src/buffer/scalar.rs +++ b/arrow-buffer/src/buffer/scalar.rs @@ -18,7 +18,7 @@ use crate::alloc::Deallocation; use crate::buffer::Buffer; use crate::native::ArrowNativeType; -use crate::MutableBuffer; +use crate::{MutableBuffer, OffsetBuffer}; use std::fmt::Formatter; use std::marker::PhantomData; use std::ops::Deref; @@ -145,6 +145,12 @@ impl From for ScalarBuffer { } } +impl From> for ScalarBuffer { + fn from(value: OffsetBuffer) -> Self { + value.into_inner() + } +} + impl From> for ScalarBuffer { fn from(value: Vec) -> Self { Self {