Replies: 3 comments 6 replies
-
This could be useful in Vinyl: #3095 |
Beta Was this translation helpful? Give feedback.
0 replies
-
It's unclear what |
Beta Was this translation helpful? Give feedback.
6 replies
-
Please describe how the new option will be presented in Lua (via |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Reviewers
Changelog
2025-01-14
2024-11-13
include
tocovers
get
,select
and suchProblem statement
The task is described in https://github.com/tarantool/tarantool-ee/issues/893. Existing scanner API allows to pass index id so this document is merely to come to terms how to specify which columns besides mentioned in the
parts
include into the index.Proposed API
Proposed API is:
Creation
index:create_index(name, {parts = {key_column_1, ..., key_column_K}, covers={column_1, ..., column_N}})
covers
may reference columns by name or by position asparts
. The index key columns and primary index key columns are implicitly covered. The default value for option is{}
.As proposed in the issue scan can be done only among covered columns.
select
andget
an such will return all columns. In future we may introduce an option for these operations to return only covered columns, likeindex:select(key, {column_set = 'covered'})
.Introspection
Covered columns, both explicit and implicit, are visible in index object under
covers
key. The key is missing for the primary index. Column number in array are 1-based just as in case of describing index parts.Example:
Persistence
The covered columns are stored as an array of column numbers in existing
opts
field of_index
space undercovers
key. Only explicitly covered columns are stored. Column numbers are 0-based just as in case ofparts
field of the space. The key is stored only for secondary indexes. Ifcovers = {}
then it is stored explicitly as{}
.Beta Was this translation helpful? Give feedback.
All reactions