[Tarantool-patches] [PATCH v1 1/2] sql: introduce field type ARRAY

Konstantin Osipov kostja.osipov at gmail.com
Wed Nov 3 17:33:53 MSK 2021

* Mergen Imeev <imeevma at tarantool.org> [21/11/03 17:32]:
> > 
> > The entire industry is using [] for array subscript and {} for map
> > subscript. Why did you have to invent () for it?
> > 
> Here we have a user-defined function a1() that takes one argument and returns an
> ARRAY containing a single element that was given as an argument. There are also
> two more functions: a2(), which takes two arguments, and a3(), which takes three
> arguments. They work the same way. I created them to test if ARRAY works as
> intended. The built-in ARRAY() function takes 1 to 127 arguments and returns
> ARRAY, which contains the values passed as arguments to the function.
> This patch-set is just a part of the ARRAY addition, and we plan to add [] for
> ARRAY and {} for MAP a little later, after we have built-in functions ARRAY()
> and MAP().
> Or did you mean something else?

No, I misread your test, thanks for clarification.
> > > +        SELECT a1(1) == CAST(1 AS SCALAR);

Konstantin Osipov, Moscow, Russia

More information about the Tarantool-patches mailing list