[tarantool-patches] [PATCH 08/13] sql: aggregate sql functions support big int
Konstantin Osipov
kostja at tarantool.org
Tue Apr 2 10:57:07 MSK 2019
* Stanislav Zudin <szudin at tarantool.org> [19/03/15 22:09]:
> if (type == SQL_INTEGER) {
> - i64 v = sql_value_int64(argv[0]);
> + v = sql_value_int64(argv[0]);
> p->rSum += v;
> - if ((p->approx | p->overflow) == 0
> - && sqlAddInt64(&p->iSum, true, v, true) != ATHR_SIGNED) {
> - p->overflow = 1;
> - }
> + is_signed = true;
> + } else if (type == SQL_UNSIGNED) {
> + v = sql_value_int64(argv[0]);
> + p->rSum += (u64)v;
> + is_signed = false;
Perhaps I am missing something in this patch, but where did
overflow check go? How does this work if p->rSum contains a
negative value?
--
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov
More information about the Tarantool-patches
mailing list