[PATCH v4 4/4] box: introduce functional indexes

Konstantin Osipov kostja at tarantool.org
Wed Jul 24 23:22:42 MSK 2019


* Kirill Shcherbatov <kshcherbatov at tarantool.org> [19/07/24 10:38]:
> lua_code = [[function(tuple)
>                 local address = string.split(tuple[2])
>                 local ret = {}
>                 for _, v in pairs(address) do
> 			table.insert(ret, {utf8.upper(v)})
> 		end
>                 return unpack(ret)
>              end]]

I think the convention should be that a multikey function must always
return a table (a msgpack array for a C function).

It's OK to wrap every key into a table as long as it simplifies 
the code (key part count is encoded automatically by struct port), but otherwise 
I would stick to scalars.


-- 
Konstantin Osipov, Moscow, Russia



More information about the Tarantool-patches mailing list