From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 24 Jul 2019 23:22:42 +0300 From: Konstantin Osipov Subject: Re: [PATCH v4 4/4] box: introduce functional indexes Message-ID: <20190724202242.GF7651@atlas> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: To: Kirill Shcherbatov Cc: tarantool-patches@freelists.org, vdavydov.dev@gmail.com List-ID: * Kirill Shcherbatov [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