Tarantool development patches archive
 help / color / mirror / Atom feed
From: Kirill Shcherbatov <kshcherbatov@tarantool.org>
To: tarantool-patches@freelists.org
Cc: vdavydov.dev@gmail.com, Kirill Shcherbatov <kshcherbatov@tarantool.org>
Subject: [PATCH v3.1 0/5] box: indexes by JSON path
Date: Thu, 20 Sep 2018 10:46:48 +0300	[thread overview]
Message-ID: <cover.1537429335.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.
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

             reply	other threads:[~2018-09-20  7:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-20  7:46 Kirill Shcherbatov [this message]
2018-09-20  7:46 ` [PATCH v3.1 1/5] box: refactor API to use non-constant key_def Kirill Shcherbatov
2018-09-21  9:30   ` Vladimir Davydov
2018-09-20  7:46 ` [PATCH v3.1 2/5] box: introduce tuple_field_by_part routine Kirill Shcherbatov
2018-09-21  9:33   ` Vladimir Davydov
2018-09-20  7:46 ` [PATCH v3.1 3/5] box: introduce JSON indexes Kirill Shcherbatov
2018-09-22 19:15   ` Vladimir Davydov
2018-09-20  7:46 ` [PATCH v3.1 4/5] box: introduce offset slot cache in key_part Kirill Shcherbatov
2018-09-20  7:46 ` [PATCH v3.1 5/5] box: specify indexes in user-friendly form 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.1537429335.git.kshcherbatov@tarantool.org \
    --to=kshcherbatov@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=vdavydov.dev@gmail.com \
    --subject='Re: [PATCH v3.1 0/5] 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