Skip to main content

visit_decimal

Function visit_decimal 

Source
fn visit_decimal<T: NativeDecimalType, V: FixedLenByteArrayVisitor>(
    array: &PrimitiveArray<T>,
    visitor: V,
) -> Result<V::Output>
Expand description

Passes the big-endian two’s complement bytes of the values of array to visitor

The values are resized to FixedLenByteArrayVisitor::decimal_length bytes: sign-extended if that is longer than the Arrow decimal type, or truncated to the low bytes if it is shorter. A value too large for the length is truncated, as ArrowWriter has always done, since Arrow does not validate precision.