[tarantool-patches] Re: [PATCH v5 07/12] lib: introduce json_path_normalize routine

Kirill Shcherbatov kshcherbatov at tarantool.org
Mon Nov 26 13:50:16 MSK 2018


> 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.
Ugum, now we use a new json_path_cmp routine in such scenarios. This allows
us to use paths in form that user has specified.
It is an interesting moment affecting error handling. The first path specified for
routine is assumed to be valid. When the second path contains an error, the first
path is assumed to be greater. In fact, this means that we catch an info that such
paths are differ on index_def validations and error would raised during format
creation, when path would be parsed manually next time. We have tests for this
case.
 



More information about the Tarantool-patches mailing list