Replies: 4 comments 6 replies
-
|
This could be useful in Vinyl: #3095 |
Beta Was this translation helpful? Give feedback.
-
|
It's unclear what |
Beta Was this translation helpful? Give feedback.
-
|
Please describe how the new option will be presented in Lua (via |
Beta Was this translation helpful? Give feedback.
-
|
We decided not to implement this functionality yet. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Reviewers
Changelog
2025-01-14
2024-11-13
includetocoversget,selectand 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
partsinclude 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}})coversmay reference columns by name or by position asparts. The index key columns and primary index key columns are implicitly covered. The order of columns in thecoversis not significant. The default value for option is{}. It is error if same column is specified twice. It is allowed to specify implicitly covered columns explicitly.As proposed in the issue scan can be done only among covered columns.
selectandgetan 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
coverskey. The key is missing for the primary index. Column number in array are 1-based just as in case of describing index parts. The column numbers are sorted.Example:
Persistence
The covered columns are stored as an array of column numbers in existing
optsfield of_indexspace undercoverskey. Only explicitly covered columns are stored. Column numbers are 0-based just as in case ofpartsfield of the space.Beta Was this translation helpful? Give feedback.
All reactions