[Tarantool-patches] [PATCH v4 1/3] sql: fix CAST() from STRING to INTEGER

Nikita Pettik korablev at tarantool.org
Wed Apr 15 14:13:15 MSK 2020


On 10 Apr 20:06, Imeev Mergen wrote:
> 
> On 4/10/20 4:05 PM, Nikita Pettik wrote:
> > On 10 Apr 13:43, Mergen Imeev wrote:
> > > Sorry, forgot to answer one question.
> > > 
> > > On Fri, Apr 10, 2020 at 01:39:45PM +0300, Mergen Imeev wrote:
> > > > Hi! Thank you for review. My answers and new patch below.
> > > > 
> > > > On Fri, Mar 27, 2020 at 04:46:04PM +0000, Nikita Pettik wrote:
> > > > > On 27 Mar 14:33, imeevma at tarantool.org wrote:
> > > > > 
> > > > > Could you please find Peter's table containing current/expected cast
> > > > > behaviours and verify that this patch doesn't contradict it?
> > > > > 
> > > Here:
> > > https://github.com/tarantool/doc/blob/pgulutzan-2.3/doc/reference/reference_sql/sql.rst
> > > 
> > > ~                To BOOLEAN | To INTEGER | To NUMBER | To STRING | To VARBINARY
> > > ---------------  ----------   ----------   ---------   ---------   ------------
> > >  From BOOLEAN   | AAA        | A--        | ---       | A--       | ---
> > >  From INTEGER   | A--        | AAA        | AAA       | AAA       | ---
> > >  From NUMBER    | A--        | SSA        | AAA       | AAA       | ---
> > >  From STRING    | S--        | SSS        | SSS       | AAA       | A--
> > >  From VARBINARY | ---        | ---        | ---       | A--       | AAA
> > > 
> > > Should be fine since we have S for CAST() and implicit
> > > cast from STRING to INTEGER.
> > This table describes current behaviour. Could you also find the table
> > which shows expected one?
> I'm sorry, not sure that I have seen such table for CAST(). Should
> I ask Peter?

I did it myself: thread is called "cast" in obsolete dev at tarantool mailing
list (15 May 2019 12:44:54). There's even corresponding issue which was
closed by Kirill for some reason:
https://github.com/tarantool/tarantool/issues/4216

Now I am okay with these patches.



More information about the Tarantool-patches mailing list