diff --git a/parquet/src/data_type.rs b/parquet/src/data_type.rs index 5aff88e53402..40d54c78ed1d 100644 --- a/parquet/src/data_type.rs +++ b/parquet/src/data_type.rs @@ -17,6 +17,7 @@ //! Data types that connect Parquet physical types with their Rust-specific //! representations. +use bytes::Bytes; use std::cmp::Ordering; use std::fmt; use std::mem; @@ -214,6 +215,12 @@ impl From for ByteArray { } } +impl From for ByteArray { + fn from(value: Bytes) -> Self { + ByteBufferPtr::from(value).into() + } +} + impl PartialEq for ByteArray { fn eq(&self, other: &ByteArray) -> bool { match (&self.data, &other.data) {