Tarantool development patches archive
 help / color / mirror / Atom feed
* [PATCH v5 00/12] box: indexes by JSON path
@ 2018-10-29  6:56 Kirill Shcherbatov
  2018-10-29  6:56 ` [PATCH v5 01/12] box: refactor key_def_find routine Kirill Shcherbatov
                   ` (11 more replies)
  0 siblings, 12 replies; 39+ messages in thread
From: Kirill Shcherbatov @ 2018-10-29  6:56 UTC (permalink / raw)
  To: tarantool-patches; +Cc: vdavydov.dev, Kirill Shcherbatov

http://github.com/tarantool/tarantool/tree/kshch/gh-1012-json-indexes
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.
New JSON tree class is used to manage tuple_field(s) defined for
format. This allows to work with fields in unified way.
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. Initialization of the field map is
done by traversing the tree to detect vertices that are missing
in the msgpack.
Introduced offset_slot_cache in key_part to tune data access
for typical scenario of using tuples that have same format.

Kirill Shcherbatov (12):
  box: refactor key_def_find routine
  box: introduce key_def_parts_are_sequential
  box: introduce tuple_field_go_to_path
  box: introduce tuple_format_add_key_part
  lib: implement JSON tree class for json library
  box: manage format fields with JSON tree class
  lib: introduce json_path_normalize routine
  box: introduce JSON indexes
  box: introduce has_json_paths flag in templates
  box: tune tuple_field_raw_by_path for indexed data
  box: introduce offset slot cache in key_part
  box: specify indexes in user-friendly form

 src/box/alter.cc                |  14 +-
 src/box/blackhole.c             |   5 +-
 src/box/engine.h                |  11 +-
 src/box/errcode.h               |   2 +-
 src/box/index_def.c             |   6 +-
 src/box/key_def.c               | 219 ++++++++++--
 src/box/key_def.h               |  48 ++-
 src/box/lua/index.c             |  59 ++++
 src/box/lua/schema.lua          |  22 +-
 src/box/lua/space.cc            |   5 +
 src/box/memtx_engine.c          |   6 +-
 src/box/memtx_space.c           |   5 +-
 src/box/memtx_space.h           |   2 +-
 src/box/schema.cc               |   4 +-
 src/box/space.c                 |   6 +-
 src/box/space.h                 |   8 +-
 src/box/sql.c                   |  17 +-
 src/box/sql/build.c             |   8 +-
 src/box/sql/pragma.c            |   2 +-
 src/box/sql/select.c            |   6 +-
 src/box/sql/where.c             |   1 +
 src/box/sysview.c               |   3 +-
 src/box/tuple.c                 |  40 +--
 src/box/tuple_compare.cc        | 125 +++++--
 src/box/tuple_extract_key.cc    | 131 ++++---
 src/box/tuple_format.c          | 730 +++++++++++++++++++++++++++++++---------
 src/box/tuple_format.h          |  76 ++++-
 src/box/tuple_hash.cc           |  47 ++-
 src/box/vinyl.c                 |   9 +-
 src/box/vy_log.c                |   3 +-
 src/box/vy_lsm.c                |   5 +-
 src/box/vy_point_lookup.c       |   2 -
 src/box/vy_stmt.c               | 168 +++++++--
 src/lib/json/CMakeLists.txt     |   2 +
 src/lib/json/path.c             |  25 ++
 src/lib/json/path.h             |  18 +
 src/lib/json/tree.c             | 327 ++++++++++++++++++
 src/lib/json/tree.h             | 224 ++++++++++++
 test-run                        |   2 +-
 test/box/misc.result            |   1 +
 test/engine/tuple.result        | 424 +++++++++++++++++++++++
 test/engine/tuple.test.lua      | 121 +++++++
 test/unit/json_path.c           | 250 +++++++++++++-
 test/unit/json_path.result      |  54 ++-
 test/unit/vy_iterators_helper.c |   6 +-
 test/unit/vy_mem.c              |   2 +-
 test/unit/vy_point_lookup.c     |   2 +-
 47 files changed, 2826 insertions(+), 427 deletions(-)
 create mode 100644 src/lib/json/tree.c
 create mode 100644 src/lib/json/tree.h

-- 
2.7.4

^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2018-11-26 10:50 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-29  6:56 [PATCH v5 00/12] box: indexes by JSON path Kirill Shcherbatov
2018-10-29  6:56 ` [PATCH v5 01/12] box: refactor key_def_find routine Kirill Shcherbatov
2018-11-19 17:48   ` Vladimir Davydov
2018-10-29  6:56 ` [PATCH v5 10/12] box: tune tuple_field_raw_by_path for indexed data Kirill Shcherbatov
2018-10-29  6:56 ` [PATCH v5 11/12] box: introduce offset slot cache in key_part Kirill Shcherbatov
2018-11-01 13:32   ` [tarantool-patches] " Konstantin Osipov
2018-11-06 12:15     ` [tarantool-patches] " Kirill Shcherbatov
2018-10-29  6:56 ` [PATCH v5 12/12] box: specify indexes in user-friendly form Kirill Shcherbatov
2018-11-01 13:34   ` [tarantool-patches] " Konstantin Osipov
2018-11-01 14:18   ` Konstantin Osipov
2018-11-06 12:15     ` [tarantool-patches] " Kirill Shcherbatov
2018-10-29  6:56 ` [PATCH v5 02/12] box: introduce key_def_parts_are_sequential Kirill Shcherbatov
2018-11-01 14:23   ` [tarantool-patches] " Konstantin Osipov
2018-11-06 12:14     ` [tarantool-patches] " Kirill Shcherbatov
2018-11-19 17:48   ` Vladimir Davydov
2018-10-29  6:56 ` [PATCH v5 03/12] box: introduce tuple_field_go_to_path Kirill Shcherbatov
2018-11-19 17:48   ` Vladimir Davydov
2018-10-29  6:56 ` [PATCH v5 04/12] box: introduce tuple_format_add_key_part Kirill Shcherbatov
2018-11-01 14:38   ` [tarantool-patches] " Konstantin Osipov
2018-11-06 12:15     ` [tarantool-patches] " Kirill Shcherbatov
2018-11-19 17:50   ` Vladimir Davydov
2018-10-29  6:56 ` [PATCH v5 05/12] lib: implement JSON tree class for json library Kirill Shcherbatov
2018-11-01 15:08   ` [tarantool-patches] " Konstantin Osipov
2018-11-06 12:15     ` [tarantool-patches] " Kirill Shcherbatov
2018-11-19 17:53       ` Vladimir Davydov
2018-11-20 16:43   ` Vladimir Davydov
2018-11-21 10:37     ` [tarantool-patches] " Kirill Shcherbatov
2018-11-26 10:50     ` Kirill Shcherbatov
2018-10-29  6:56 ` [PATCH v5 06/12] box: manage format fields with JSON tree class Kirill Shcherbatov
2018-10-29  6:56 ` [PATCH v5 07/12] lib: introduce json_path_normalize routine Kirill Shcherbatov
2018-11-01 15:22   ` [tarantool-patches] " Konstantin Osipov
2018-11-01 15:27     ` [tarantool-patches] " Kirill Shcherbatov
2018-11-20 15:13       ` Vladimir Davydov
2018-11-26 10:50         ` Kirill Shcherbatov
2018-11-20 15:14   ` Vladimir Davydov
2018-10-29  6:56 ` [PATCH v5 08/12] box: introduce JSON indexes Kirill Shcherbatov
2018-11-20 16:52   ` Vladimir Davydov
2018-11-26 10:50     ` [tarantool-patches] " Kirill Shcherbatov
2018-10-29  6:56 ` [tarantool-patches] [PATCH v5 09/12] box: introduce has_json_paths flag in templates Kirill Shcherbatov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox