Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH v1 0/2] box: functional and multikey indexes
@ 2018-11-17 13:16 Kirill Shcherbatov
  2018-11-17 13:16 ` [tarantool-patches] [PATCH v1 1/2] box: refactor index termination on space drop Kirill Shcherbatov
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Kirill Shcherbatov @ 2018-11-17 13:16 UTC (permalink / raw)
  To: tarantool-patches; +Cc: georgy, Kirill Shcherbatov

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

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

end of thread, other threads:[~2018-11-20 12:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-17 13:16 [tarantool-patches] [PATCH v1 0/2] box: functional and multikey indexes Kirill Shcherbatov
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

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