[tarantool-patches] Re: [PATCH 07/13] sql: arithmetic functions support big integers

Konstantin Osipov kostja at tarantool.org
Tue Apr 2 10:52:17 MSK 2019


* n.pettik <korablev at tarantool.org> [19/03/25 18:13]:
> > +enum arithmetic_result sqlAddInt64(i64 *, bool, i64, bool);
> > +enum arithmetic_result sqlSubInt64(i64 *, bool, i64, bool);
> > +enum arithmetic_result sqlMulInt64(i64 *, bool, i64, bool);
> > +enum arithmetic_result sqlDivInt64(i64 *, bool, i64, bool);
> > +enum arithmetic_result sqlRemInt64(i64 *, bool, i64, bool);

I think we should not introduce a separate enum for this, the
convention should be:

-1 + diag_set for errors

- the argument list should be designed in a way to make the
  functions composable. E.g. if you input bool is_signed as input,
  it should return bool is_signed for output. 

-- 
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