console icon indicating copy to clipboard operation
console copied to clipboard

64 bit number values are not not displayed correctly

Open conwayok opened this issue 2 years ago • 6 comments

Hi, I have discovered an issue where if a kafka message contains int64 fields, they are not displayed correctly.

Example:

image

the TransId field actually has the value 73314510714175488, but is displayed as 73314510714175490

Seems like a JavaScript issue where they can only handle max 53 bit numbers?

conwayok avatar Feb 19 '23 16:02 conwayok

Seems like a JavaScript issue where they can only handle max 53 bit numbers?

Seems likely to me. cc @rikimaru0345

weeco avatar Feb 23 '23 09:02 weeco

Yes, that is indeed the issue here. Right now, I don't think there is anything (reasonable) we can do about this. Eventually, we will have to switch to a different serialization format for topic messages.

rikimaru0345 avatar Feb 24 '23 21:02 rikimaru0345

Any plans to fix this? Long keys are also displayed incorrectly rendering the quick search useless.

benbehringer avatar Dec 01 '23 10:12 benbehringer

Starting from ECMAScript 2020 (ES11), JavaScript introduced the BigInt type, which can be used to represent integers with arbitrary precision. You can utilize the BigInt type to handle integers that surpass the Int64 range.

cobolbaby avatar Dec 01 '23 14:12 cobolbaby

Any updates?

aeson85 avatar May 10 '24 09:05 aeson85

@cobolbaby this is not about surpassing Int64 range because those integers are proper Int64. The thing is that they are above Int53 which is the limit of JS internal float64 representation, that uses a 52-bit mantissa (IEE754).

sigxcpu76 avatar Aug 12 '24 09:08 sigxcpu76