-
Notifications
You must be signed in to change notification settings - Fork 379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set iterator type for each index parts #3243
Comments
This is actually a very good idea, and we need it in SQL as well. |
Should this iterator walk only over a continuous range of tuples? Or skip unsuitable tuples? E.g imagine data:
What should the iterators return?:
|
[[1,2][2,2]]
[[2,1]]
[[1,2],[2,1],[2,2]] In other words, a multi-directional iterator should return all tuples matching the given criteria, even if they don't constitute a singe range. That would match the behavior of SQL SELECT statement. |
Prior to this patch, the SQL parser supported the sort order in the index definition during index creation. However, all of our indexes are ascending until tarantool#3243 is implemented, so the specified sort order was simply ignored. To avoid a drastic change in behavior due to the implementation of multidirectional indexes, we have decided to drop the sort order from the index definition until tarantool#3243 is implemented. Part of tarantool#8100 @TarantoolBot document Title: ASC/DESC during index creation Now the SQL parser does not support ASC/DESC when creating an index. This used to be supported by the parser, but never worked. An example of statements that are no longer supported: ``` CREATE TABLE t(i INT PRIMARY KEY ASC); CREATE TABLE t(i INT PRIMARY KEY, a STRING, UNIQUE(a DESC)); CREATE INDEX i1 ON t(a ASC); ```
Prior to this patch, the SQL parser supported the sort order in the index definition during index creation. However, all of our indexes are ascending until tarantool#3243 is implemented, so the specified sort order was simply ignored. To avoid a drastic change in behavior due to the implementation of multidirectional indexes, we have decided to drop the sort order from the index definition until tarantool#3243 is implemented. Part of tarantool#8100 @TarantoolBot document Title: ASC/DESC during index creation Now the SQL parser does not support ASC/DESC when creating an index. This used to be supported by the parser, but never worked. An example of statements that are no longer supported: ``` CREATE TABLE t(i INT PRIMARY KEY ASC); CREATE TABLE t(i INT PRIMARY KEY, a STRING, UNIQUE(a DESC)); CREATE INDEX i1 ON t(a ASC); ```
Prior to this patch, the SQL parser supported the sort order in the index definition during index creation. However, all of our indexes are ascending until tarantool#3243 is implemented, so the specified sort order was simply ignored. To avoid a drastic change in behavior due to the implementation of multidirectional indexes, we have decided to drop the sort order from the index definition until tarantool#3243 is implemented. Part of tarantool#8100 @TarantoolBot document Title: ASC/DESC during index creation Now the SQL parser does not support ASC/DESC when creating an index. This used to be supported by the parser, but never worked. An example of statements that are no longer supported: ``` CREATE TABLE t(i INT PRIMARY KEY ASC); CREATE TABLE t(i INT PRIMARY KEY, a STRING, UNIQUE(a DESC)); CREATE INDEX i1 ON t(a ASC); ```
Prior to this patch, the SQL parser supported the sort order in the index definition during index creation. However, all of our indexes are ascending until tarantool#3243 is implemented, so the specified sort order was simply ignored. To avoid a drastic change in behavior due to the implementation of multidirectional indexes, we have decided to drop the sort order from the index definition until tarantool#3243 is implemented. Part of tarantool#8100 @TarantoolBot document Title: ASC/DESC during index creation Now the SQL parser does not support ASC/DESC when creating an index. This used to be supported by the parser, but never worked. An example of statements that are no longer supported: ``` CREATE TABLE t(i INT PRIMARY KEY ASC); CREATE TABLE t(i INT PRIMARY KEY, a STRING, UNIQUE(a DESC)); CREATE INDEX i1 ON t(a ASC); ```
Prior to this patch, the SQL parser supported the sort order in the index definition during index creation. However, all of our indexes are ascending until tarantool#3243 is implemented, so the specified sort order was simply ignored. To avoid a drastic change in behavior due to the implementation of multidirectional indexes, we have decided to drop the sort order from the index definition until tarantool#3243 is implemented. Part of tarantool#8100 @TarantoolBot document Title: ASC/DESC during index creation Now the SQL parser does not support ASC/DESC when creating an index. This used to be supported by the parser, but never worked. An example of statements that are no longer supported: ``` CREATE TABLE t(i INT PRIMARY KEY ASC); CREATE TABLE t(i INT PRIMARY KEY, a STRING, UNIQUE(a DESC)); CREATE INDEX i1 ON t(a ASC); ```
Prior to this patch, the SQL parser supported the sort order in the index definition during index creation. However, all of our indexes are ascending until tarantool#3243 is implemented, so the specified sort order was simply ignored. To avoid a drastic change in behavior due to the implementation of multidirectional indexes, we have decided to drop the sort order from the index definition until tarantool#3243 is implemented. Part of tarantool#8100 @TarantoolBot document Title: ASC/DESC during index creation Now the SQL parser does not support ASC/DESC when creating an index. This used to be supported by the parser, but never worked. An example of statements that are no longer supported: ``` CREATE TABLE t(i INT PRIMARY KEY ASC); CREATE TABLE t(i INT PRIMARY KEY, a STRING, UNIQUE(a DESC)); CREATE INDEX i1 ON t(a ASC); ```
Having index:
box.space.feeds:create_index('primary', { type = 'TREE',unique = true, parts = {1, 'unsigned',2,'unsigned',3,'unsigned'}})
I'm using pairs for iterating over index, but how can i set different iterator type for each parts: (EQ parts[1], LE parts[2],GE[3])?
In SQL we can set "order by" order for each field, but how we can do it by tarantool without writing special lua functions?
The text was updated successfully, but these errors were encountered: