[PATCH v5 07/12] lib: introduce json_path_normalize routine

Vladimir Davydov vdavydov.dev at gmail.com
Tue Nov 20 18:14:36 MSK 2018


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().



More information about the Tarantool-patches mailing list