Druid weird metric values?

Hi,

I got a JSON file that I am ingesting to Druid. Say, I have a field named x, and x’s value on the same timestamp is 1.088 . But on Druid, the same timestamp, same dimensions, I mean the same row, and the x value is
1.0880000591278076.
How could this be possible ? Kind regards,
Thanks.

Druid stores raw values on disk as 32-bit IEEE floating points, so this is probably a floating point precision issue.

Hi!

I guessed it was due to something like that. How can I overcome this ?

Thanks.

All numeric columns in Druid currently are either stored as 64-bit longs or 32-bit floats. If 32-bit floats don’t work for you, you could potentially multiply all your values by something (e.g. use microdollars instead of dollars for currency) and store them as 64-bit longs.