From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 20 Nov 2018 18:14:36 +0300 From: Vladimir Davydov Subject: Re: [PATCH v5 07/12] lib: introduce json_path_normalize routine Message-ID: <20181120151435.hltp2s5dobfpmkwn@esperanza> References: <134d5b3da2e0d0102287cceb4d347c88ef2616b5.1540795996.git.kshcherbatov@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <134d5b3da2e0d0102287cceb4d347c88ef2616b5.1540795996.git.kshcherbatov@tarantool.org> To: Kirill Shcherbatov Cc: tarantool-patches@freelists.org List-ID: On Mon, Oct 29, 2018 at 09:56:39AM +0300, Kirill Shcherbatov wrote: > Introduced a new routine json_path_normalize that makes a > conversion of JSON path to the 'canonical' form: > - all maps keys are specified with operator ["key"] form > - all array indexes are specified with operator [i] form. > This notation is preferable because in the general case it can > be uniquely parsed. > We need such API in JSON indexes patch to store all paths in > 'canonical' form to commit the path uniqueness checks and > to tune access with JSON path hashtable. BTW the comment is misleading. I've looked through the following patches and failed to find any hash table that would map canonical paths to tuple fields. Looks like you normalize paths solely to compare them in key_part_path_cmp().