[PATCH v3.1 0/5] box: indexes by JSON path
Kirill Shcherbatov
kshcherbatov at tarantool.org
Thu Sep 20 10:46:48 MSK 2018
Branch: http://github.com/tarantool/tarantool/tree/kshch/gh-1012-json-indexes
Issue: https://github.com/tarantool/tarantool/issues/1012
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.
This came possible with auxiliary structures per tuple_format:
tree of intermediate path fields and hashtable refers to leaf field
that use path as key.
To speed-up data access by JSON index key_part structure extended
with offset_slot cache that points to field_map item containing
data offset for current tuple.
Finally, supported ability to define JSON paths in user-friendly
form containing format field name(that could be changed).
Changes in v3.1:
- patch is divided into several parts
- fixed invalid bsize for vy_stmt_new_surrogate_from_key
typles
Kirill Shcherbatov (5):
box: refactor API to use non-constant key_def
box: introduce tuple_field_by_part routine
box: introduce JSON indexes
box: introduce offset slot cache in key_part
box: specify indexes in user-friendly form
src/box/alter.cc | 7 +-
src/box/blackhole.c | 5 +-
src/box/engine.h | 11 +-
src/box/errcode.h | 2 +-
src/box/index_def.c | 10 +-
src/box/key_def.c | 316 ++++++++++++--
src/box/key_def.h | 76 ++--
src/box/lua/index.c | 73 ++++
src/box/lua/schema.lua | 20 +-
src/box/lua/space.cc | 5 +
src/box/memtx_bitset.c | 5 +-
src/box/memtx_engine.c | 9 +-
src/box/memtx_hash.h | 4 +-
src/box/memtx_rtree.c | 3 +-
src/box/memtx_space.c | 5 +-
src/box/memtx_space.h | 2 +-
src/box/schema.cc | 16 +-
src/box/space.c | 4 +-
src/box/space.h | 8 +-
src/box/sysview.c | 3 +-
src/box/tuple.c | 16 +-
src/box/tuple.h | 14 +
src/box/tuple_bloom.c | 8 +-
src/box/tuple_bloom.h | 8 +-
src/box/tuple_compare.cc | 188 ++++++---
src/box/tuple_compare.h | 5 +-
src/box/tuple_extract_key.cc | 147 ++++---
src/box/tuple_format.c | 881 ++++++++++++++++++++++++++++++++++------
src/box/tuple_format.h | 85 +++-
src/box/tuple_hash.cc | 77 ++--
src/box/tuple_hash.h | 9 +-
src/box/vinyl.c | 12 +-
src/box/vy_history.c | 2 +-
src/box/vy_history.h | 2 +-
src/box/vy_log.c | 3 +-
src/box/vy_lsm.c | 46 ++-
src/box/vy_mem.c | 8 +-
src/box/vy_mem.h | 10 +-
src/box/vy_point_lookup.c | 2 -
src/box/vy_range.c | 2 +-
src/box/vy_range.h | 4 +-
src/box/vy_run.c | 39 +-
src/box/vy_run.h | 34 +-
src/box/vy_stmt.c | 163 ++++++--
src/box/vy_stmt.h | 39 +-
src/box/vy_upsert.c | 2 +-
src/box/vy_upsert.h | 2 +-
src/box/vy_write_iterator.c | 8 +-
src/box/vy_write_iterator.h | 6 +-
test/box/misc.result | 57 +--
test/engine/iterator.result | 2 +-
test/engine/tuple.result | 428 +++++++++++++++++++
test/engine/tuple.test.lua | 121 ++++++
test/unit/vy_iterators_helper.c | 6 +-
test/unit/vy_mem.c | 2 +-
test/unit/vy_point_lookup.c | 2 +-
56 files changed, 2462 insertions(+), 562 deletions(-)
--
2.7.4
More information about the Tarantool-patches
mailing list