pub trait BasicDecimalArray<T: BasicDecimal, U: From<ArrayData>>: DecimalArrayPrivate {
    const VALUE_LENGTH: i32;

    fn data(&self) -> &ArrayData;
    fn precision(&self) -> usize;
    fn scale(&self) -> usize;

    fn value(&self, i: usize) -> T { ... }
    fn value_offset(&self, i: usize) -> i32 { ... }
    fn value_length(&self) -> i32 { ... }
    fn value_data(&self) -> Buffer { ... }
    fn value_offset_at(&self, i: usize) -> i32 { ... }
    fn value_as_string(&self, row: usize) -> String { ... }
    fn from_fixed_size_binary_array(
        v: FixedSizeBinaryArray,
        precision: usize,
        scale: usize
    ) -> U { ... } fn from_fixed_size_list_array(
        v: FixedSizeListArray,
        precision: usize,
        scale: usize
    ) -> U { ... } }

Required Associated Constants

Required Methods

Return the precision (total digits) that can be stored by this array

Return the scale (digits after the decimal) that can be stored by this array

Provided Methods

Returns the element at index i.

Returns the offset for the element at index i.

Note this doesn’t do any bound checking, for performance reason.

Returns the length for an element.

All elements have the same length as the array is a fixed size.

Returns a clone of the value data buffer

Build a decimal array from FixedSizeBinaryArray.

NB: This function does not validate that each value is in the permissible range for a decimal

👎 Deprecated:

please use from_fixed_size_binary_array instead

Build a decimal array from FixedSizeListArray.

NB: This function does not validate that each value is in the permissible range for a decimal. And, the null buffer of the child array will be ignored.

Implementors