questdb: CSV double import bug
Describe the bug
When importing a csv, values of type double are subject to add trailing digits. So value 1.234 in the csv might end up being stored as 1.2340000000004 for example.
Expected behavior Values should be imported normally without trailing digits being added.
Environment (please complete the following information):
- AWS linux
- Version: 4.2
Screenshots

About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 18 (17 by maintainers)
Commits related to this issue
- fix(std): fix trailing digits in double conversions (#297) — committed to Cobalt-27/questdb by Cobalt-27 2 years ago
- fix(std): fix trailing digits in double conversions (#297) — committed to Cobalt-27/questdb by Cobalt-27 2 years ago
- fix(std): fix trailing digits in double conversions (#297) — committed to Cobalt-27/questdb by Cobalt-27 2 years ago
- fix(std): fix trailing digits in double conversions (#297) (#2055) — committed to questdb/questdb by Cobalt-27 2 years ago
Thank you for your advice, I would give it a try.
@Cobalt-27 If you are not afraid of math then this (PDF) paper looks like a decent start. It’s not simple at all, but it could be fun to code it from scratch.
I looked at Apache Harmony and they use a native parser. Kotlin folks borrowed the same code from Harmony.
fixed by #2055 Massive Thank You to @Cobalt-27!
Yes, I will send a pr later, also, thank you for giving me some helpful advice on this issue.
@Cobalt-27: cool analysis, thanks for spending your energy on it, much appreciated! Are you planning to send a Pull Request to fix the fast path?
FWIW it’s not a bug only on CSV import I believe. I see in my data too (ILP stream) and was wondering what it is… Very annoying - thanks for raising it and attempting to solve 🙏