Skip to content

Commit

Permalink
Deprecate ArrowPrimitiveType::get_byte_width.
Browse files Browse the repository at this point in the history
  • Loading branch information
RinChanNOWWW committed Apr 14, 2024
1 parent 70819a1 commit ef4f44f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arrow-array/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<Self::Native>()
}

/// Returns a default value of this primitive type.
///
/// This is useful for aggregate array ops like `sum()`, `mean()`.
Expand Down

0 comments on commit ef4f44f

Please sign in to comment.