[tarantool-patches] Re: [PATCH 07/13] sql: arithmetic functions support big integers
Konstantin Osipov
kostja at tarantool.org
Tue Apr 2 10:54:03 MSK 2019
* Stanislav Zudin <szudin at tarantool.org> [19/04/01 23:44]:
> > What is more, personally I would apply the same fix as for atoi functions:
> > make them return -1 in case of overflow or division by 0 and set
> > diag message right in these functions; use enum to represent their args.
>
> It's a bad practice to write diagnostic from the low-level functions.
> Using a single enum as a return value gives a compact readable code.
I'd agree with this if I knew there could be some context where we
would use these functions without needing to set the diagnostics
area. I can not imagine such a case. So I'd make things simple
right now and assume it's a simple to-do refactoring should we
need it in the future.
--
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