Tarantool development patches archive
 help / color / mirror / Atom feed
From: Kirill Shcherbatov <kshcherbatov@tarantool.org>
To: tarantool-patches@freelists.org
Cc: georgy@tarantool.org, Kirill Shcherbatov <kshcherbatov@tarantool.org>
Subject: [tarantool-patches] [PATCH v1 0/2] box: functional and multikey indexes
Date: Sat, 17 Nov 2018 16:16:53 +0300	[thread overview]
Message-ID: <cover.1542460247.git.kshcherbatov@tarantool.org> (raw)

http://github.com/tarantool/tarantool/tree/kshch/gh-1260-functional-index
https://github.com/tarantool/tarantool/issues/1260

Tarantool functional and multikey indexes allows you to create
an index based on user-specified function.
Feature use hidden space _i_{index_name}_{space_name} containing
tuples of structure [{extractor_format}{pk_format}] and redefines
on_replace trigger for target space to fill this space. Index
object metamethods are monkeypatched to make indirect lookups in
ispace to retrieve required tuple primary key.

Same tuples indexed by different keys may be returned multiple
(matches key math count) times. To prevent such behavior for
select and count operations builtin filters were implemented.
The :pairs operator can't work such way, so it may return
same tuples.

Kirill Shcherbatov (2):
  box: refactor index termination on space drop
  box: functional and multikey indexes

 src/box/CMakeLists.txt              |   1 +
 src/box/alter.cc                    |  61 ++++++-
 src/box/index.cc                    |   9 +
 src/box/index.h                     |   4 +
 src/box/index_def.c                 |  64 +++++++-
 src/box/index_def.h                 |  14 ++
 src/box/lua/call.c                  |  43 +++++
 src/box/lua/call.h                  |  18 ++
 src/box/lua/func_idx.lua            | 319 ++++++++++++++++++++++++++++++++++++
 src/box/lua/schema.lua              |  52 ++++--
 src/box/lua/space.cc                |  21 +++
 src/box/memtx_engine.c              |   6 +
 src/box/vinyl.c                     |   6 +
 src/lua/init.c                      |   2 +
 test/engine/functional_idx.result   | 120 ++++++++++++++
 test/engine/functional_idx.test.lua |  35 ++++
 16 files changed, 753 insertions(+), 22 deletions(-)
 create mode 100644 src/box/lua/func_idx.lua
 create mode 100644 test/engine/functional_idx.result
 create mode 100644 test/engine/functional_idx.test.lua

-- 
2.7.4

             reply	other threads:[~2018-11-17 13:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-17 13:16 Kirill Shcherbatov [this message]
2018-11-17 13:16 ` [tarantool-patches] [PATCH v1 1/2] box: refactor index termination on space drop Kirill Shcherbatov
2018-11-19 12:22 ` [tarantool-patches] Re: [PATCH] functional and multikey indexes RFC Kirill Shcherbatov
2018-11-20 12:18   ` Kirill Shcherbatov
     [not found] ` <45d55e70c60c5c4b5806c8e7ce3330957a8dc0ce.1542460247.git.kshcherbatov@tarantool.org>
2018-11-20 12:18   ` [tarantool-patches] Re: [PATCH v1 2/2] box: functional and multikey indexes 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.1542460247.git.kshcherbatov@tarantool.org \
    --to=kshcherbatov@tarantool.org \
    --cc=georgy@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [tarantool-patches] [PATCH v1 0/2] box: functional and multikey indexes' \
    /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