From: Alexander Turenko <alexander.turenko@tarantool.org> To: Kirill Shcherbatov <kshcherbatov@tarantool.org> Cc: tarantool-patches@freelists.org, Vladimir Davydov <vdavydov.dev@gmail.com> Subject: Re: [tarantool-patches] [PATCH 0/3] lua: add key_def lua module Date: Fri, 22 Mar 2019 19:20:47 +0300 [thread overview] Message-ID: <20190322162047.mg5y2aeezp5jfebj@tkn_work_nb> (raw) In-Reply-To: <50d5c1d8-077a-e564-d28c-7e71ab79deff@tarantool.org> Thank you for the review! Answers are below. WBR, Alexander Turenko. On Fri, Mar 22, 2019 at 05:24:33PM +0300, Kirill Shcherbatov wrote: > Hi! Can't find the patch that we were discussed, so, I've copied It from branch by my own. > > The code you implemented is very similar in many ways to the one already implemented in key_def.c. > I have one principal proposal and one advice(may be good enough): > 1) at first, all map key names must follow their semantic-twin is used with create_index/alter; > I mean field, not fieldno e.g. > The errors also must not differ, I believe. > https://tarantool.io/en/doc/1.10/book/box/box_space/#box-space-create-index Sadly, create_index/alter format differs from one that is used in box.space.<...>.index.<...>.parts. I think we definitely should support the latter one, because typical use case of the key_def module is when you already have an index and want to use its parts to create a Lua key_def instance. > > 2) (proposal) I think you can do without the function load_key_def_set_part, that repeats] > key_def_decode_parts code in many moments. You may encode tuple on region with > lbox_encode_tuple_on_gc() and pass it to key_def_decode_parts(). While key_def:new is > not performance-critical, this is better managed way to solve this problem, I think. Consider my > RFC diff below: > It would be good to do it in that way (it recuces code duplication), but I have two possible problems in the mind: * The formats are different: field vs fieldno. * Support net.box's collation_id (instead of collation). Maybe this problem will gone after fixing #3941.
prev parent reply other threads:[~2019-03-22 16:20 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-12-16 20:17 [PATCH 0/3] Merger Alexander Turenko 2018-12-16 20:17 ` [PATCH 1/3] Add luaT_iscallable with support of cdata metatype Alexander Turenko 2018-12-26 18:35 ` Vladimir Davydov 2018-12-28 1:46 ` Alexander Turenko 2018-12-28 8:00 ` Vladimir Davydov 2018-12-16 20:17 ` [PATCH 2/3] Add module to ease using Lua iterators from C Alexander Turenko 2018-12-26 18:45 ` Vladimir Davydov 2018-12-31 6:43 ` Alexander Turenko 2018-12-16 20:17 ` [PATCH 3/3] Add merger for tuple streams Alexander Turenko 2018-12-26 20:11 ` Vladimir Davydov 2019-01-09 21:36 ` Alexander Turenko 2018-12-18 12:16 ` [PATCH 0/3] Merger Alexander Turenko 2019-03-22 14:24 ` [tarantool-patches] [PATCH 0/3] lua: add key_def lua module Kirill Shcherbatov 2019-03-22 16:20 ` Alexander Turenko [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190322162047.mg5y2aeezp5jfebj@tkn_work_nb \ --to=alexander.turenko@tarantool.org \ --cc=kshcherbatov@tarantool.org \ --cc=tarantool-patches@freelists.org \ --cc=vdavydov.dev@gmail.com \ --subject='Re: [tarantool-patches] [PATCH 0/3] lua: add key_def lua module' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox