is_valid_variant_decimal

Function is_valid_variant_decimal 

Source
fn is_valid_variant_decimal(p: &u8, s: &i8, max_precision: u8) -> bool
Expand description

Validates whether a given arrow decimal is a valid variant decimal

NOTE: By a strict reading of the “decimal table” in the shredding spec, each decimal type should have a width-dependent lower bound on precision as well as an upper bound (i.e. Decimal16 with precision 5 is invalid because Decimal4 “covers” it). But the variant shredding integration tests specifically expect such cases to succeed, so we only enforce the upper bound here.