diff --git a/arrow-array/src/types.rs b/arrow-array/src/types.rs index 3ade1405d7bc..038b2a291f58 100644 --- a/arrow-array/src/types.rs +++ b/arrow-array/src/types.rs @@ -58,6 +58,12 @@ pub trait ArrowPrimitiveType: primitive::PrimitiveTypeSealed + 'static { /// the corresponding Arrow data type of this primitive type. const DATA_TYPE: DataType; + /// Returns the byte width of this primitive type. + #[deprecated(note = "Use ArrowNativeType::get_byte_width")] + fn get_byte_width() -> usize { + std::mem::size_of::() + } + /// Returns a default value of this primitive type. /// /// This is useful for aggregate array ops like `sum()`, `mean()`.