From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Kirill Shcherbatov Subject: [PATCH v1 0/5] box: JSON preparatory patchset Date: Sun, 23 Dec 2018 15:40:35 +0300 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: tarantool-patches@freelists.org, vdavydov.dev@gmail.com Cc: kostja@tarantool.org, Kirill Shcherbatov List-ID: Preparatory patch set for JSON indexes: - Implemented tuple_validate with tuple_init_field_map. - Refactored field type/nullability check routines. - Implemented a new json_token_path_snprint routine able to print JSON path to field by field specified working like cannonical snprintf routine - Reworked box error messages to use the json_token_path_snprint helper to report field names in error in error messages. - Reworked tuple_init_field_map with required fields bitmap - a scallable approach able to work with JSON multilevel fields tree. Branch: http://github.com/tarantool/tarantool/tree/kshch/gh-1012-json-indexes-preparational Issue: https://github.com/tarantool/tarantool/issues/1012 Kirill Shcherbatov (5): box: refactor tuple_validate_raw box: refactor field type and nullability checks lib: introduce json_token_path_snprint box: refactor ER_{FIELD_TYPE, ACTION_MISMATCH} box: refactor tuple_init_field_map to use bitmap src/box/errcode.h | 6 +- src/box/index.cc | 22 +-- src/box/key_def.c | 12 +- src/box/key_def.h | 30 ++-- src/box/memtx_rtree.c | 2 +- src/box/tuple.c | 35 ++--- src/box/tuple.h | 15 +- src/box/tuple_format.c | 213 +++++++++++++++++++++------- src/box/tuple_format.h | 23 +++ src/lib/json/json.c | 46 ++++++ src/lib/json/json.h | 13 ++ test/box/alter.result | 6 +- test/box/alter_limits.result | 15 +- test/box/blackhole.result | 6 +- test/box/ddl.result | 32 +++-- test/box/hash.result | 15 +- test/box/misc.result | 2 +- test/box/rtree_misc.result | 18 ++- test/box/sequence.result | 3 +- test/box/sql.result | 12 +- test/box/tree_pk.result | 9 +- test/box/tree_pk_multipart.result | 8 +- test/engine/ddl.result | 116 ++++++++------- test/engine/indices_any_type.result | 12 +- test/engine/null.result | 85 ++++++----- test/engine/tree.result | 12 +- test/engine/tree_variants.result | 12 +- test/engine/update.result | 6 +- test/engine/upsert.result | 9 +- test/replication/misc.result | 3 +- test/unit/json.c | 20 ++- test/unit/json.result | 113 +++++++++------ test/vinyl/constraint.result | 30 ++-- test/vinyl/errinj.result | 15 +- test/vinyl/gh.result | 3 +- test/vinyl/savepoint.result | 11 +- 36 files changed, 640 insertions(+), 350 deletions(-) -- 2.19.2