Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Large integers do not show correctly in TLV (double precision loss) #104

Open
mringwald opened this issue Dec 3, 2018 · 2 comments
Open
Labels

Comments

@mringwald
Copy link

When the log contains large 64bit integers, they do not get correctly displayed. The last digits differ from the actual value.

Given the example log line:
{"ts":"2018-11-28T17:33:01.230","pid":43075,"tid":"70000dbe3000","sev":"info","req":"-","sess":"10483","k":"large-integer","v":{"some-id":9223372036855065056}}
TLV will show "some-id: 9223372036855064576"

This is probably due to parsing the number as a double first and loosing precision on the way. I am not sure if the underlying JSON parser supports the whole range of int64 and this is a TLV issue or if this is a limitation of the JSON parser itself.

@luiseeo
Copy link
Contributor

luiseeo commented Dec 3, 2018

Hi, I think this is a limitation of the JSON parser and how Javascript does numbers (if I remember correctly, every number is a double precision float).
There might be ways to improve this in TLV; right now we are getting the default behavior of the Qt JSON parser.

Do you know if Tableau or Hyper is already logging 64-bit integers in real world scenarios?

@mringwald
Copy link
Author

From a quick search, it looks like the JSON standard leaves it up to the implementation how to handle int64s.

Yes, Hyper does log some 64-bit integers. There are some cases where information is encoded in the most significant bit, resulting in very large integers when logged.

@terencesoh terencesoh added the bug label Jan 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants