feat:aggregate_diff value sub
when write aggregate diff, (https://numpy.org/doc/stable/reference/generated/numpy.diff.html) the aggregate diff will sub the two value and panic "attmpt to panic sub overflow"
the value we has is :i8、i6、i32 、i64 when come to i64, the aggregate will panic of overflow(since the largest value type is i64)
so implement the value sub so to avoid the panic
Arithmetic overflow is a global issue all around our codes. We should find a global way to handle it adequately.
Two possible ways I can think of right now are:
- Expanding our
Valueto supportu128andi128primitive types, and make sure our column schema supports max tou64andi64; then change thePrimitive::LargestTypeofu64andi64tou128andi128. - Handling overflow error globally, which requires a global error handler somewhere.
@MichaelScofield @clickme-zxy, could you provide a reproduction so that we can understand the issue more intuitively?
Said a SQL that encounters error while it should not be.
@tisonkun create another issue https://github.com/GreptimeTeam/greptimedb/issues/3385 for this.
Close as superceded by #3385