From: Kirill Shcherbatov <kshcherbatov@tarantool.org>
To: tarantool-patches@freelists.org, vdavydov.dev@gmail.com
Cc: Kirill Shcherbatov <kshcherbatov@tarantool.org>
Subject: [PATCH v2 0/5] box: introduce multikey indexes in memtx
Date: Tue, 19 Mar 2019 15:32:05 +0300 [thread overview]
Message-ID: <cover.1552998554.git.kshcherbatov@tarantool.org> (raw)
Multikey indexes allows you to automatically index set of documents
by JSON paths having array index placeholder "[*]". Multikey index
cannot be primary as it cannot be unique(by definition).
Multikey index parts must be compatible: only one "[*]" placeholder
is allowed in same position(for all JSON paths in index parts).
Changes in version 2:
- introduced field_map_builder class to perform field_map
preparation
- reworked code: new helpers json_path_is_multikey and
new flag json_path_cmp(is_weak_cmp = true)
- rebased to actual tuple hints head
- new tests
http://github.com/tarantool/tarantool/tree/kshch/gh-1257-multikey-indexes
https://github.com/tarantool/tarantool/issues/1257
Kirill Shcherbatov (5):
lib: introduce json_path_is_multikey helper
lib: introduce is_weak_cmp flag for json_path_cmp
box: move offset_slot init to tuple_format_add_field
box: introduce field_map_builder for field_map init
box: introduce multikey indexes in memtx
src/box/CMakeLists.txt | 1 +
src/box/errcode.h | 1 +
src/box/index_def.c | 27 ++-
src/box/key_def.c | 14 +-
src/box/key_def.h | 18 ++
src/box/memtx_engine.c | 10 +-
src/box/memtx_space.c | 18 ++
src/box/memtx_tree.c | 183 ++++++++++++++---
src/box/tuple.c | 40 +++-
src/box/tuple.h | 111 +++++++++--
src/box/tuple_compare.cc | 87 +++++++--
src/box/tuple_extract_key.cc | 2 +-
src/box/tuple_field_map.c | 80 ++++++++
src/box/tuple_field_map.h | 163 ++++++++++++++++
src/box/tuple_format.c | 315 ++++++++++++++++++------------
src/box/tuple_format.h | 7 +-
src/box/vinyl.c | 8 +-
src/box/vy_stmt.c | 9 +-
src/lib/json/json.c | 25 ++-
src/lib/json/json.h | 14 +-
test/box/misc.result | 1 +
test/engine/json.result | 13 --
test/engine/json.test.lua | 7 -
test/engine/multikey_idx.result | 228 +++++++++++++++++++++
test/engine/multikey_idx.test.lua | 67 +++++++
test/unit/json.c | 20 +-
test/unit/json.result | 7 +-
27 files changed, 1242 insertions(+), 234 deletions(-)
create mode 100644 src/box/tuple_field_map.c
create mode 100644 src/box/tuple_field_map.h
create mode 100644 test/engine/multikey_idx.result
create mode 100644 test/engine/multikey_idx.test.lua
--
2.21.0
next reply other threads:[~2019-03-19 12:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-19 12:32 Kirill Shcherbatov [this message]
2019-03-19 12:32 ` [PATCH v2 1/5] lib: introduce json_path_is_multikey helper Kirill Shcherbatov
2019-03-19 15:43 ` [tarantool-patches] " Konstantin Osipov
2019-04-02 15:49 ` [tarantool-patches] " Kirill Shcherbatov
2019-03-19 12:32 ` [PATCH v2 2/5] lib: introduce is_weak_cmp flag for json_path_cmp Kirill Shcherbatov
2019-03-19 15:47 ` [tarantool-patches] " Konstantin Osipov
2019-03-19 12:32 ` [PATCH v2 3/5] box: move offset_slot init to tuple_format_add_field Kirill Shcherbatov
2019-03-19 12:32 ` [PATCH v2 4/5] box: introduce field_map_builder for field_map init Kirill Shcherbatov
2019-03-19 12:32 ` [PATCH v2 5/5] box: introduce multikey indexes in memtx Kirill Shcherbatov
2019-03-19 16:05 ` [tarantool-patches] " Kirill Shcherbatov
2019-03-21 12:35 ` Kirill Shcherbatov
2019-03-28 10:21 ` [PATCH v2 0/5] " Vladimir Davydov
2019-04-02 15:49 ` [tarantool-patches] " Kirill Shcherbatov
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.1552998554.git.kshcherbatov@tarantool.org \
--to=kshcherbatov@tarantool.org \
--cc=tarantool-patches@freelists.org \
--cc=vdavydov.dev@gmail.com \
--subject='Re: [PATCH v2 0/5] box: introduce multikey indexes in memtx' \
/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