tursodatabase / libsql

libSQL is a fork of SQLite that is both Open Source, and Open Contributions.
https://turso.tech/libsql
MIT License
9.54k stars 252 forks source link

Fix JSON Number(f64) precision #1647

Closed wyhaya closed 1 month ago

wyhaya commented 1 month ago
SELECT 0.00000001753244305291446;
# Before
Row: Real(1.7532443052914463e-8)
# After
Row: Real(1.753244305291446e-8)

[!NOTE] This may incur a 2x performance cost. https://github.com/serde-rs/json/blob/54381d6fee21cb05439937a0f5f286177c21d3f6/Cargo.toml#L68