-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #740 from naoa/between-index-column
between: support specifying index column Patch by Naoya Murakami. Thanks!!!
- Loading branch information
Showing
4 changed files
with
105 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
test/command/suite/select/function/between/with_index/index_column.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
table_create Users TABLE_HASH_KEY ShortText | ||
[[0,0.0,0.0],true] | ||
column_create Users age COLUMN_SCALAR Int32 | ||
[[0,0.0,0.0],true] | ||
table_create Ages TABLE_PAT_KEY Int32 | ||
[[0,0.0,0.0],true] | ||
column_create Ages users_age COLUMN_INDEX Users age | ||
[[0,0.0,0.0],true] | ||
load --table Users | ||
[ | ||
{"_key": "alice", "age": 17}, | ||
{"_key": "bob", "age": 18}, | ||
{"_key": "calros", "age": 19}, | ||
{"_key": "dave", "age": 20}, | ||
{"_key": "eric", "age": 21} | ||
] | ||
[[0,0.0,0.0],5] | ||
select Users --filter 'between(Ages.users_age, "18", "include", 20, "include")' | ||
[ | ||
[ | ||
0, | ||
0.0, | ||
0.0 | ||
], | ||
[ | ||
[ | ||
[ | ||
3 | ||
], | ||
[ | ||
[ | ||
"_id", | ||
"UInt32" | ||
], | ||
[ | ||
"_key", | ||
"ShortText" | ||
], | ||
[ | ||
"age", | ||
"Int32" | ||
] | ||
], | ||
[ | ||
2, | ||
"bob", | ||
18 | ||
], | ||
[ | ||
3, | ||
"calros", | ||
19 | ||
], | ||
[ | ||
4, | ||
"dave", | ||
20 | ||
] | ||
] | ||
] | ||
] |
16 changes: 16 additions & 0 deletions
16
test/command/suite/select/function/between/with_index/index_column.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
table_create Users TABLE_HASH_KEY ShortText | ||
column_create Users age COLUMN_SCALAR Int32 | ||
|
||
table_create Ages TABLE_PAT_KEY Int32 | ||
column_create Ages users_age COLUMN_INDEX Users age | ||
|
||
load --table Users | ||
[ | ||
{"_key": "alice", "age": 17}, | ||
{"_key": "bob", "age": 18}, | ||
{"_key": "calros", "age": 19}, | ||
{"_key": "dave", "age": 20}, | ||
{"_key": "eric", "age": 21} | ||
] | ||
|
||
select Users --filter 'between(Ages.users_age, "18", "include", 20, "include")' |