Tarantool development patches archive
 help / color / mirror / Atom feed
From: Kirill Shcherbatov <kshcherbatov@tarantool.org>
To: tarantool-patches@freelists.org, vdavydov.dev@gmail.com
Cc: Kirill Shcherbatov <kshcherbatov@tarantool.org>
Subject: [PATCH v3 0/7] box: introduce multikey indexes in memtx
Date: Tue,  2 Apr 2019 18:49:31 +0300	[thread overview]
Message-ID: <cover.1554218695.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 3:
    - introduced tuple_parse_iterator class to encapsulate
      tuple parse details
    - refactored json lib helpers
    - introduced mp_stack_top helper in mspuck library
    - stubs for unused functions
    - refactored tuple_extract set
    - fixed unique multikey index
    - new descriptive comments

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

v2: https://www.freelists.org/post/tarantool-patches/PATCH-v5-44-box-introduce-multikey-indexes

http://github.com/tarantool/tarantool/tree/kshch/gh-1257-multikey-indexes
https://github.com/tarantool/tarantool/issues/1257

Kirill Shcherbatov (7):
  box: cleanup key_def virtual extract_key setter
  lib: introduce a new json_path_multikey_offset helper
  box: move offset_slot init to tuple_format_add_field
  lib: update msgpuck library
  box: introduce tuple_parse_iterator class
  box: introduce field_map_builder class
  box: introduce multikey indexes in memtx

 src/box/CMakeLists.txt        |   1 +
 src/box/errcode.h             |   1 +
 src/box/field_map.c           | 125 +++++++++++
 src/box/field_map.h           | 250 +++++++++++++++++++++
 src/box/index_def.c           |   5 +
 src/box/key_def.c             | 112 ++++++---
 src/box/key_def.h             |  34 +++
 src/box/memtx_engine.c        |   8 +-
 src/box/memtx_space.c         |  18 ++
 src/box/memtx_tree.c          | 180 ++++++++++++---
 src/box/sql.c                 |   6 +-
 src/box/tuple.c               |  42 +++-
 src/box/tuple.h               |  85 +++++--
 src/box/tuple_compare.cc      | 150 ++++++++++---
 src/box/tuple_extract_key.cc  | 129 ++++++-----
 src/box/tuple_format.c        | 411 +++++++++++++++++++++-------------
 src/box/tuple_format.h        | 109 ++++++++-
 src/box/vinyl.c               |   5 +
 src/box/vy_stmt.c             | 102 +++------
 src/lib/json/json.c           |  18 ++
 src/lib/json/json.h           |  10 +
 src/lib/msgpuck               |   2 +-
 test/box/misc.result          |   1 +
 test/engine/json.result       |  13 --
 test/engine/json.test.lua     |   7 -
 test/engine/multikey.result   | 298 ++++++++++++++++++++++++
 test/engine/multikey.test.lua |  88 ++++++++
 test/unit/json.c              |  32 ++-
 test/unit/json.result         |  12 +-
 29 files changed, 1842 insertions(+), 412 deletions(-)
 create mode 100644 src/box/field_map.c
 create mode 100644 src/box/field_map.h
 create mode 100644 test/engine/multikey.result
 create mode 100644 test/engine/multikey.test.lua

-- 
2.21.0

             reply	other threads:[~2019-04-02 15:49 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-02 15:49 Kirill Shcherbatov [this message]
2019-04-02 15:49 ` [PATCH v3 1/7] box: cleanup key_def virtual extract_key setter Kirill Shcherbatov
2019-04-03 12:42   ` Vladimir Davydov
2019-04-03 16:22     ` [tarantool-patches] " Kirill Shcherbatov
2019-04-03 18:01       ` Vladimir Davydov
2019-04-02 15:49 ` [PATCH v3 2/7] lib: introduce a new json_path_multikey_offset helper Kirill Shcherbatov
2019-04-03 12:56   ` Vladimir Davydov
2019-04-03 16:22     ` [tarantool-patches] " Kirill Shcherbatov
2019-04-03 18:02       ` Vladimir Davydov
2019-04-04  6:17       ` Konstantin Osipov
2019-04-02 15:49 ` [PATCH v3 3/7] box: move offset_slot init to tuple_format_add_field Kirill Shcherbatov
2019-04-03 12:57   ` Vladimir Davydov
2019-04-03 18:02   ` Vladimir Davydov
2019-04-04  6:19   ` [tarantool-patches] " Konstantin Osipov
2019-04-05 17:17     ` [tarantool-patches] " Kirill Shcherbatov
2019-04-02 15:49 ` [PATCH v3 4/7] lib: update msgpuck library Kirill Shcherbatov
2019-04-03 17:49   ` [tarantool-patches] " Kirill Shcherbatov
2019-04-04 15:54     ` Vladimir Davydov
2019-04-05 17:17       ` [tarantool-patches] " Kirill Shcherbatov
2019-04-07 12:22         ` Vladimir Davydov
2019-04-02 15:49 ` [PATCH v3 5/7] box: introduce tuple_parse_iterator class Kirill Shcherbatov
2019-04-03 14:04   ` Vladimir Davydov
2019-04-05 17:17     ` [tarantool-patches] " Kirill Shcherbatov
2019-04-02 15:49 ` [PATCH v3 6/7] box: introduce field_map_builder class Kirill Shcherbatov
2019-04-03 14:38   ` Vladimir Davydov
2019-04-05 17:17     ` [tarantool-patches] " Kirill Shcherbatov
2019-04-03 16:30   ` Vladimir Davydov
2019-04-02 15:49 ` [PATCH v3 7/7] box: introduce multikey indexes in memtx Kirill Shcherbatov
2019-04-04 14:20   ` 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.1554218695.git.kshcherbatov@tarantool.org \
    --to=kshcherbatov@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=vdavydov.dev@gmail.com \
    --subject='Re: [PATCH v3 0/7] 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