[PATCH v6 0/8] box: Indexes by JSON path

Kirill Shcherbatov kshcherbatov at tarantool.org
Mon Dec 17 09:52:44 MSK 2018


Sometimes field data could have complex document structure.
When this structure is consistent across whole document,
you are able to create an index by JSON path.

Changes in version 6:
 - key_part(s) path string is not 0-terminated anymore
 - global formats_epoch pool used to initialize tuple_format:epoch
   numeric field
 - more informative error messages
 - splitted changes to few new additional preparatory commits
 - got rid off hashtable in vy_stmt_build
 - prevent traversing field tree twice in vy_stmt_build
 - inline basic field_by_part with slowpath alternative
 - simplified tuple_format1_can_store_format2_tuples
 - splitted tuple_init_field_map to helper routines
 - moved tests to separate file 
 - large and descriptive comments for many things

http://github.com/tarantool/tarantool/tree/kshch/gh-1012-json-indexes
https://github.com/tarantool/tarantool/issues/1012

Kirill Shcherbatov (8):
  box: refactor tuple_validate_raw
  box: refactor ER_{FIELD_TYPE, ACTION_MISMATCH}
  box: build path to field string uniformly on error
  box: introduce JSON Indexes
  box: introduce has_json_paths flag in templates
  box: tune tuple_field_raw_by_path for indexed data
  box: introduce offset_slot cache in key_part
  box: specify indexes in user-friendly form

 src/box/alter.cc             |   2 +-
 src/box/errcode.h            |   6 +-
 src/box/index_def.c          |  10 +-
 src/box/key_def.c            | 172 +++++++--
 src/box/key_def.h            |  44 ++-
 src/box/lua/index.c          |  64 ++++
 src/box/lua/schema.lua       |  22 +-
 src/box/lua/space.cc         |   5 +
 src/box/memtx_engine.c       |   4 +
 src/box/memtx_rtree.c        |   2 +-
 src/box/sql.c                |   1 +
 src/box/sql/build.c          |   1 +
 src/box/sql/select.c         |   3 +-
 src/box/sql/where.c          |   1 +
 src/box/tuple.c              |  35 +-
 src/box/tuple.h              |  34 +-
 src/box/tuple_compare.cc     | 125 +++++--
 src/box/tuple_extract_key.cc | 128 +++++--
 src/box/tuple_format.c       | 666 ++++++++++++++++++++++++++++++-----
 src/box/tuple_format.h       | 111 ++++--
 src/box/tuple_hash.cc        |  47 ++-
 src/box/vinyl.c              |   4 +
 src/box/vy_log.c             |  11 +-
 src/box/vy_point_lookup.c    |   2 -
 src/box/vy_stmt.c            | 105 +++++-
 test/box/alter.result        |   3 +-
 test/box/blackhole.result    |   6 +-
 test/box/ddl.result          |   6 +-
 test/box/misc.result         |   1 +
 test/box/rtree_misc.result   |   3 +-
 test/engine/ddl.result       |  57 +--
 test/engine/json.result      | 483 +++++++++++++++++++++++++
 test/engine/json.test.lua    | 139 ++++++++
 test/engine/null.result      |  24 +-
 test/engine/update.result    |   6 +-
 test/vinyl/errinj.result     |   3 +-
 36 files changed, 1975 insertions(+), 361 deletions(-)
 create mode 100644 test/engine/json.result
 create mode 100644 test/engine/json.test.lua

-- 
2.19.2




More information about the Tarantool-patches mailing list