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
{{ message }}
Repository navigation
Mongo Decimal128 values with extreme exponents read back as strings of thousands of digits #30461
What a user sees. A Decimal128 field reads back as decimal text without an exponent, so the text is stable across a round trip and matches the PostgreSQL numeric codec. For a value near the limits of Decimal128 (exponents down to 1E-6176 and up to 1E+6144) that text is a plain digit string of up to about 6,100 characters. Nothing is wrong with the value; the string is just very long.
Where.decimal128Decode and the text normalisation in packages/3-mongo-target/1-mongo-target/src/core/bson-scalar-helpers.ts.
Likely fix. None for now: the JSON form must carry no exponent, and no user has reported this. If it shows up in practice, options are a length limit that refuses such values with a clear message, or an opt-in exponent form.
Where it came from. Accepted when the Decimal128 codec was added in #30396.
Activity