From: Kirill Shcherbatov <kshcherbatov@tarantool.org> To: tarantool-patches@freelists.org Cc: v.shpilevoy@tarantool.org, Kirill Shcherbatov <kshcherbatov@tarantool.org> Subject: [tarantool-patches] [PATCH v3 0/4] box: indexes by JSON path Date: Mon, 27 Aug 2018 10:37:26 +0300 [thread overview] Message-ID: <cover.1535354849.git.kshcherbatov@tarantool.org> (raw) 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. RFC contains detailed description of those concepts. Finally, supported ability to define JSON paths in user-friendly form containing format field name(that could be changed). Changes in v3: - fixed JSON nullable fields - multiple binary optimizations for field map init for fields that have JSON paths - don't store same JSON path of different indexes twice in format for now - optimized and simplified tuple_field_by_part_raw - new teplate-based comparators/extractors - removed update space epoch to ModifySpaceFormat alter op - fixed key_def_find routine - much informative comments - exported LUA path resolve to core Kirill Shcherbatov (4): rfc: describe a Tarantool JSON indexes box: introduce slot_cache in key_part box: introduce JSON indexes box: specify indexes in user-friendly form doc/rfc/1012-json-indexes.md | 188 +++++++++++ src/box/alter.cc | 38 +++ src/box/errcode.h | 2 +- src/box/index_def.c | 10 +- src/box/key_def.c | 296 +++++++++++++++-- src/box/key_def.h | 42 ++- src/box/lua/index.c | 74 +++++ src/box/lua/schema.lua | 20 +- src/box/lua/space.cc | 5 + src/box/memtx_bitset.c | 8 +- src/box/memtx_engine.c | 5 + src/box/memtx_rtree.c | 6 +- src/box/schema.cc | 12 +- src/box/tuple.c | 11 +- src/box/tuple_compare.cc | 142 ++++++-- src/box/tuple_extract_key.cc | 146 ++++++--- src/box/tuple_format.c | 765 +++++++++++++++++++++++++++++++++++++++---- src/box/tuple_format.h | 80 ++++- src/box/tuple_hash.cc | 67 +++- src/box/vinyl.c | 5 + src/box/vy_log.c | 3 +- src/box/vy_lsm.c | 44 +++ src/box/vy_point_lookup.c | 2 - src/box/vy_stmt.c | 124 +++++-- src/box/vy_stmt.h | 7 +- test/box/misc.result | 57 ++-- test/engine/iterator.result | 2 +- test/engine/tuple.result | 353 ++++++++++++++++++++ test/engine/tuple.test.lua | 99 ++++++ 29 files changed, 2332 insertions(+), 281 deletions(-) create mode 100644 doc/rfc/1012-json-indexes.md -- 2.7.4
next reply other threads:[~2018-08-27 7:37 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-08-27 7:37 Kirill Shcherbatov [this message] 2018-08-27 7:37 ` [tarantool-patches] [PATCH v3 1/4] rfc: describe a Tarantool JSON indexes Kirill Shcherbatov 2018-08-27 7:37 ` [tarantool-patches] [PATCH v3 2/4] box: introduce slot_cache in key_part Kirill Shcherbatov 2018-09-03 10:35 ` [tarantool-patches] " Vladislav Shpilevoy 2018-09-06 12:47 ` Kirill Shcherbatov 2018-09-17 17:08 ` Vladimir Davydov 2018-08-27 7:37 ` [tarantool-patches] [PATCH v3 3/4] box: introduce JSON indexes Kirill Shcherbatov 2018-09-03 10:32 ` [tarantool-patches] " Vladislav Shpilevoy 2018-09-03 10:35 ` Vladislav Shpilevoy 2018-09-06 12:46 ` Kirill Shcherbatov 2018-08-27 7:37 ` [tarantool-patches] [PATCH v3 4/4] box: specify indexes in user-friendly form Kirill Shcherbatov 2018-09-03 10:32 ` [tarantool-patches] " Vladislav Shpilevoy 2018-09-06 12:46 ` Kirill Shcherbatov 2018-09-17 15:50 ` [tarantool-patches] [PATCH v3 0/4] box: indexes by JSON path Vladimir Davydov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=cover.1535354849.git.kshcherbatov@tarantool.org \ --to=kshcherbatov@tarantool.org \ --cc=tarantool-patches@freelists.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [tarantool-patches] [PATCH v3 0/4] box: indexes by JSON path' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox