From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 15 May 2019 16:11:21 +0300 From: Vladimir Davydov Subject: Re: [tarantool-patches] Re: [PATCH 4/4] schema: explicitly forbid setting sequence for json path key part Message-ID: <20190515131121.tc2wrhqqxg4pyeo6@esperanza> References: <20190515130026.GD17999@atlas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190515130026.GD17999@atlas> To: Konstantin Osipov Cc: tarantool-patches@freelists.org List-ID: On Wed, May 15, 2019 at 04:00:26PM +0300, Konstantin Osipov wrote: > * Vladimir Davydov [19/05/15 14:16]: > > When a space has a sequence, we substitute NULL in the corresponding > > primary index part with the next value generated by the sequence. We do > > this by patching raw msgpack, see request_handle_sequence. The problem > > is we can't do it easily if the field is nested. For example, consider > > field [1].a.b. In Lua it is impossible to create tuple {{a = {b = nil}}} > > It is trivial to do, use msgpack.NULL Hmm, I tried box.NULL and it didn't work out. msgpack.NULL seems to be different. > > > so we would need to restore the whole path from an empty tuple. > > No, it's not the job of the sequence to fill in the entire path. > You can expect the right prefix to be there. Okay, will try to address.