From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 20 Nov 2018 18:13:03 +0300 From: Vladimir Davydov Subject: Re: [tarantool-patches] Re: [PATCH v5 07/12] lib: introduce json_path_normalize routine Message-ID: <20181120151303.34fstx2vcjzirbiz@esperanza> References: <134d5b3da2e0d0102287cceb4d347c88ef2616b5.1540795996.git.kshcherbatov@tarantool.org> <20181101152200.GH30032@chai> <88101bba-75d3-0c44-a0af-fb4d66b1945d@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <88101bba-75d3-0c44-a0af-fb4d66b1945d@tarantool.org> To: Kirill Shcherbatov Cc: tarantool-patches@freelists.org, Kostya Osipov List-ID: On Thu, Nov 01, 2018 at 06:27:55PM +0300, Kirill Shcherbatov wrote: > > Let's try to avoid this altogether. We could use parent references > > to check if path1 equals to path2. > This required in index_def_is_valid to raise error on key_part_path_cmp == 0 > before tuple_format creation. We need to compare path strings in key_part(s) TBO I find the idea that we have to normalize json paths just to compare them a bit of an overkill. Why not simply introduce json_path_cmp() and use it instead? All those functions using key_part_path_cmp() are cold paths so that wouldn't degrade performance.