benthosdev / benthos

Fancy stream processing made operationally mundane
https://www.benthos.dev
MIT License
7.68k stars 752 forks source link

Comparing int64 values yields unexpected results #2500

Closed nicktelford closed 1 month ago

nicktelford commented 1 month ago

When comparing large numbers coerced to int64, there appears to be some loss of precision in the comparison, yielding incorrect results.

Example:

$ echo '{}' | ./benthos blobl '1780921717355446273.int64() > 1780921717355446272.int64()'
false

Expected output:

true
Jeffail commented 1 month ago

Thanks for raising this @nicktelford, should be fixed with: https://github.com/benthosdev/benthos/commit/35e0b317b002b1f6197089b129e6aeae02608578

nicktelford commented 1 month ago

Thanks @Jeffail! Any idea when the next release will be cut?