Replies: 2 comments
-
|
Thanks @Fokko for raising this discussion. In iceberg-rust, |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
#669 is now merged so now I like what Renjie suggested. we're using iceberg-rust/bindings/python/src/data_file.rs Lines 26 to 48 in 6165cd9 seems like Datum and PyDatum might be the right abstraction
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
With the PyIceberg <> Iceberg-Rust integration I'm running into issues with the Decimal literal.
Problem
The decimal comes with:
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 #669,rust_decimaldoes 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.
Beta Was this translation helpful? Give feedback.
All reactions