From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> To: tarantool-patches@freelists.org Subject: [tarantool-patches] Re: [PATCH v1 0/5] box: indexes by JSON path Date: Thu, 9 Aug 2018 01:03:17 +0300 [thread overview] Message-ID: <f91d0500-decc-d00f-d5fc-b066110323d1@tarantool.org> (raw) In-Reply-To: <cover.1533558332.git.kshcherbatov@tarantool.org> Hi! Thanks for the patchset! See 3 comments below. On 06/08/2018 15:26, Kirill Shcherbatov wrote: > 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 referes to leaf field 1. Typo: no such word 'referes'. 2. On the Travis engine/upsert test fails: https://travis-ci.org/tarantool/tarantool/jobs/412620927 3. I've got the build errors: /Users/v.shpilevoy/Work/Repositories/tarantool/src/box/tuple_format.c:72:67: error: excess elements in union initializer [-Werror] FIELD_TYPE_ANY, TUPLE_OFFSET_SLOT_NIL, false, false, {{NULL, 0}, NULL} ^~~~ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.1.0/include/stddef.h:105:16: note: expanded from macro 'NULL' # define NULL ((void*)0) ^~~~~~~~~~ /Users/v.shpilevoy/Work/Repositories/tarantool/src/box/tuple_format.c:803:32: error: variable 'field' is uninitialized when used within its own initialization [-Werror,-Wuninitialized] struct tuple_field *field = field->array[i]; ~~~~~ ^~~~~ 2 errors generated. > 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). > > Branch: http://github.com/tarantool/tarantool/tree/kshch/gh-1012-json-indexes > Issue: https://github.com/tarantool/tarantool/issues/1012 > > Kirill Shcherbatov (5): > rfc: describe a Tarantool JSON indexes > box: introduce slot_cache in key_part > box: introduce path field in key_part > box: introduce path_hash and tuple_field tree > box: specify indexes in user-friendly form > > doc/rfc/1012-json-indexes.md | 188 ++++++++++++++ > src/box/errcode.h | 2 +- > src/box/index_def.c | 8 +- > src/box/key_def.c | 199 ++++++++++++++- > src/box/key_def.h | 17 +- > src/box/lua/schema.lua | 58 ++++- > src/box/lua/space.cc | 5 + > src/box/memtx_bitset.c | 4 +- > src/box/memtx_rtree.c | 2 +- > src/box/schema.cc | 8 +- > src/box/tuple_bloom.c | 8 +- > src/box/tuple_compare.cc | 48 ++-- > src/box/tuple_extract_key.cc | 36 ++- > src/box/tuple_format.c | 570 +++++++++++++++++++++++++++++++++++++++++-- > src/box/tuple_format.h | 35 ++- > src/box/tuple_hash.cc | 28 +-- > src/box/tuple_hash.h | 5 +- > src/box/vy_log.c | 3 +- > src/box/vy_stmt.h | 2 +- > test/box/misc.result | 51 ++-- > test/engine/iterator.result | 2 +- > test/engine/tuple.result | 137 +++++++++++ > test/engine/tuple.test.lua | 37 +++ > 23 files changed, 1300 insertions(+), 153 deletions(-) > create mode 100644 doc/rfc/1012-json-indexes.md >
next prev parent reply other threads:[~2018-08-08 22:03 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-08-06 12:26 [tarantool-patches] " Kirill Shcherbatov 2018-08-06 12:26 ` [tarantool-patches] [PATCH v1 1/5] rfc: describe a Tarantool JSON indexes Kirill Shcherbatov 2018-08-06 12:26 ` [tarantool-patches] [PATCH v1 2/5] box: introduce slot_cache in key_part Kirill Shcherbatov 2018-08-08 22:03 ` [tarantool-patches] " Vladislav Shpilevoy 2018-08-15 12:14 ` Kirill Shcherbatov 2018-08-06 12:27 ` [tarantool-patches] [PATCH v1 3/5] box: introduce path field " Kirill Shcherbatov 2018-08-08 22:03 ` [tarantool-patches] " Vladislav Shpilevoy 2018-08-15 12:14 ` Kirill Shcherbatov 2018-08-06 12:27 ` [tarantool-patches] [PATCH v1 4/5] box: introduce path_hash and tuple_field tree Kirill Shcherbatov 2018-08-08 22:03 ` [tarantool-patches] " Vladislav Shpilevoy 2018-08-15 12:14 ` Kirill Shcherbatov 2018-08-06 12:27 ` [tarantool-patches] [PATCH v1 5/5] box: specify indexes in user-friendly form Kirill Shcherbatov 2018-08-08 22:03 ` Vladislav Shpilevoy [this message] 2018-08-15 12:14 ` [tarantool-patches] Re: [PATCH v1 0/5] box: indexes by JSON path 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=f91d0500-decc-d00f-d5fc-b066110323d1@tarantool.org \ --to=v.shpilevoy@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='[tarantool-patches] Re: [PATCH v1 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