You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, our sum aggregation used the primitive datatype add function to calculate results. So sometimes the calculation will cause overflow panic.
Maybe we need to use the Decimal or Float64 type for the sum calculation.
Minimal reproduce step
createtablet (v int);
insert into t values (2147483647), (2), (3);
selectsum(v) from t;
-- thread 'tokio-runtime-worker' panicked at 'attempt to add with overflow', src/executor/aggregation/sum.rs:36:1
What did you expect to see?
createtablet (v int);
insert into t values (2147483647), (2), (3);
selectsum(v) from t;
+------------+
| sum(v) |
+------------+
| 2147483652 |
+------------+
The text was updated successfully, but these errors were encountered:
Currently, our sum aggregation used the primitive datatype
add
function to calculate results. So sometimes the calculation will cause overflow panic.Maybe we need to use the
Decimal
orFloat64
type for thesum
calculation.Minimal reproduce step
What did you expect to see?
The text was updated successfully, but these errors were encountered: