From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp63.i.mail.ru (smtp63.i.mail.ru [217.69.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 6DFA4469719 for ; Thu, 15 Oct 2020 06:08:41 +0300 (MSK) Date: Thu, 15 Oct 2020 06:09:00 +0300 From: Alexander Turenko Message-ID: <20201015030900.aonelxqk33gk6ae3@tkn_work_nb> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Subject: Re: [Tarantool-patches] [PATCH v3 00/16] module api: extend for external key_def Lua module List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org On Thu, Oct 15, 2020 at 01:41:57AM +0200, Vladislav Shpilevoy wrote: > Hi! Thanks for the patchset! > > Are we going to create a docbot request or a documentation ticket > for all these newly exported functions? I will create the issue manually. > > > Alexander Turenko (16): > > module api: get rid of typedef redefinitions > > module api: expose box region > > module api/lua: add luaL_iscdata() function > > lua: factor out tuple encoding from luaT_tuple_new > > lua: don't raise a Lua error from luaT_tuple_new() > > module api/lua: add luaT_tuple_encode() > > module api/lua: expose luaT_tuple_new() > > module api/lua: add API_EXPORT to tuple functions > > module api: add API_EXPORT to key_def functions > > module api: add box_key_def_new_v2() > > module api: add box_key_def_dump_parts() > > module api: expose box_key_def_validate_tuple() > > module api: expose box_key_def_merge() > > module api: expose box_key_def_extract_key() > > module api: add box_key_def_validate_key() > > module api: add box_key_def_validate_full_key() > > Still don't understand why do we need full key validation. > Anyway it won't help in anything. The only purpose I can > think of is kind of a guarantee, that if a key is full and > valid, it will return at most 1 tuple, but it is not so for > non-unique indexes - for them a full and not full keys are > the same. But whatever. But what if a caller knows that a particular key_def corresponds to some unique index and want to ensure that a key is not only valid, but also full? Or it knows that a particular key_def imposes a strict order on a particular tuple stream and want to ensure that compare against given key will impose the same strict ordering? It may be important for pagination.