Skip to main content

FixedLenByteArrayVisitor

Trait FixedLenByteArrayVisitor 

Source
pub(crate) trait FixedLenByteArrayVisitor {
    type Output;

    // Required methods
    fn decimal_length(&self, precision: u8, native_length: usize) -> usize;
    fn values(
        self,
        length: usize,
        fill: impl Fn(usize, &mut [u8]),
    ) -> Result<Self::Output>;
}
Expand description

Receives the values ArrowWriter stores for an Arrow array in a FIXED_LEN_BYTE_ARRAY column, which are also the values hashed into the column’s bloom filter

visit_fixed_len_byte_array holds the conversion from each Arrow type

Required Associated Types§

Required Methods§

Source

fn decimal_length(&self, precision: u8, native_length: usize) -> usize

Returns the length of the values that decimals of precision are stored as

native_length is the length of the Arrow decimal type, for example 16 for Decimal128.

Source

fn values( self, length: usize, fill: impl Fn(usize, &mut [u8]), ) -> Result<Self::Output>

Receives values that are length bytes long

fill(i, value) writes the value at index i of the array to value, which is length zeroed bytes.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§