Expand description
Exact decimal string → scaled integer conversion (roadmap §12).
The rule from the roadmap: never convert decimal through f64.
Arrow Decimal128 stores a value as i128 * 10^(-scale). So to
represent “123.45” in Decimal128(18, 2) we need i128 = 12345.
This module provides one pure function — decimal_str_to_scaled_i128 —
that converts a DB text-protocol decimal string to the scaled i128 Arrow
needs without ever touching floating-point arithmetic.
Functions§
- decimal_
str_ to_ scaled_ i128 - scaled_
i128_ to_ decimal_ str - Convert a decimal string (as returned by the database text protocol) to
a scaled
i128ready to be stored in an ArrowDecimal128array.