Skip to content

Conversation

@getvictor
Copy link
Contributor

Fixes #8301

The previous fix was incomplete -- there were still some numbers that were being improperly converted into string.

image

This fix limits double-to-string conversion to significant digits only, without an extra non-significant digit.

@getvictor getvictor requested review from a team as code owners June 19, 2024 22:15
@lucasmrod
Copy link
Contributor

I've tested this change and it works as expected now:
Query: SELECT pid, total_size, name, ROUND(((total_size * 1.0) / (1024 * 1024)), 2) AS used FROM processes ORDER BY total_size DESC;
Screenshot 2024-06-25 at 2 25 57 PM

@zwass zwass merged commit ca14540 into osquery:master Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SQL real precision incorrect

4 participants