GitHub user Fokko created a discussion: `PrimitiveLiteral` of of `Decimal`
With the PyIceberg <> Iceberg-Rust integration I'm running into issues with the Decimal literal. # Problem The decimal comes with: - **Precision**: is the number of digits in a number. - **Scale**: the number of digits to the right of the decimal point in a number. However, internally it is stored as a `i128`, which is fine for the Precision, since everything fits in there. Unfortunately, you cannot use this primitive on its own since you don't know the scale. # Potential solution My first instinct was to introduce a separate primitive that would maintain the decimal scale. Unfortunately, Rust does not have an internal type; therefore, we now use `rust_decimal`. However, I don't like the idea of exposing third party types in the public Iceberg-Rust API. As pointed out in issue https://github.com/apache/iceberg-rust/issues/669, `rust_decimal` does not support full precision. Switching libraries would already entail breaking the API. I wanted to start a discussion to see if more folks have run into this and if there are any solutions I've missed. GitHub link: https://github.com/apache/iceberg-rust/discussions/2062 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
