You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seeking guidance on how to operate on Decimal128 bson type such as value comparisons, additions, etc.
I noticed that bson-rust used decimal crate at one point but opted to make it internal. Is decimal byte compatible with Decimal128? Is it advisable to use from_raw_bytes to convert to Decimal?
The text was updated successfully, but these errors were encountered:
The bson crate doesn't provide any manipulation for Decimal128 values beyond reading or printing strings. The binary representation is a standard IEEE 754-2008 value, so anything that uses that representation should work fine, including the decimal crate.
Unfortunately found more details on RUST-960 that this won’t work. Haven’t found any crate that works yet. Looks like the only correct way right now is to convert to string and to reparse it on one of the rust decimal implementations. It won’t be performant though.
Seeking guidance on how to operate on Decimal128 bson type such as value comparisons, additions, etc.
I noticed that bson-rust used decimal crate at one point but opted to make it internal. Is decimal byte compatible with Decimal128? Is it advisable to use from_raw_bytes to convert to Decimal?
The text was updated successfully, but these errors were encountered: