From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 3 Apr 2019 21:01:55 +0300 From: Vladimir Davydov Subject: Re: [tarantool-patches] Re: [PATCH v3 1/7] box: cleanup key_def virtual extract_key setter Message-ID: <20190403180154.aekvwaqwj3tiquam@esperanza> References: <781937f7536d5e70438177905f1365789303db1d.1554218695.git.kshcherbatov@tarantool.org> <20190403124215.7ngokicqvqceahid@esperanza> <7f1136a6-055a-7713-cb6c-91a51a53ec8d@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7f1136a6-055a-7713-cb6c-91a51a53ec8d@tarantool.org> To: Kirill Shcherbatov Cc: tarantool-patches@freelists.org List-ID: On Wed, Apr 03, 2019 at 07:22:56PM +0300, Kirill Shcherbatov wrote: > > Yeah, this looks better. However, I'd also replace set_extract_func with > > plain if-else-if - it would take only a couple lines longer, but look > > more straightforward IMO. > > I don't mind. Updated version is on the branch. > > ====================================================== > > This patch inspired by 082cffca4dba attempts to simplify setting > appropriate tuple_extract_key pointer for plain and json indexes > in key_def_set_extract_func routine. > Being split to plain and json blocks this code becomes easier > to understand and extend. > > In further patches we need to introduce is_multikey branch and > without this refactoring required amendments turn the > key_def_set_extract_func code into a mess. > > Needed for #1257 > --- > src/box/tuple_extract_key.cc | 97 +++++++++++++++++++----------------- > 1 file changed, 52 insertions(+), 45 deletions(-) Pushed to master.