Math operations for int values fail for big values #4132
Labels
area/querylang
Issues related to the query language specification and implementation.
kind/bug
Something is broken.
priority/P0
Critical issue that requires immediate attention.
status/accepted
We accept to investigate/work on it.
What version of Dgraph are you using?
v1.1.0-134-gd9767791
Have you tried reproducing the issue with the latest release?
Yes
What is the hardware spec (RAM, OS)?
32gb ram, ubuntu 19.04
Steps to reproduce the issue (command/config used to run Dgraph).
Expected behaviour and actual result.
Expected Behaviour
Actual Result:
This happens because all the math operations happen in float64 (https://github.com/dgraph-io/dgraph/blob/master/query/aggregator.go#L124), which only has a precision of 53 bits. So int, being 64 bits can overflow when put into float64 and hence the error.
The text was updated successfully, but these errors were encountered: