-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs #1372
- Loading branch information
Showing
9 changed files
with
229 additions
and
2 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
File renamed without changes.
File renamed without changes.
63 changes: 63 additions & 0 deletions
63
test/function/suite/select/filter/set_operation/not_and/not_and.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,63 @@ | ||
table_create Tags TABLE_HASH_KEY ShortText | ||
[[0,0.0,0.0],true] | ||
table_create Movies TABLE_HASH_KEY ShortText | ||
[[0,0.0,0.0],true] | ||
column_create Movies tags COLUMN_VECTOR Tags | ||
[[0,0.0,0.0],true] | ||
column_create Tags index COLUMN_INDEX Movies tags | ||
[[0,0.0,0.0],true] | ||
load --table Movies | ||
[ | ||
{"_key": "Seven Samurai", tags: ["Samurai", "Japanese", "Kurosawa Akira"]}, | ||
{"_key": "The Last Samurai", tags: ["Samurai", "English", "Tom Cruise"]}, | ||
{"_key": "The Matrix", tags: ["Keanu Reeves", "SF", "English"]}, | ||
{"_key": "Star Wars", tags: ["George Lucas", "SF", "English"]} | ||
] | ||
[[0,0.0,0.0],4] | ||
select Movies --filter 'tags @ "English" &! (tags @ "SF" &! tags @ "Keanu Reeves")' | ||
[ | ||
[ | ||
0, | ||
0.0, | ||
0.0 | ||
], | ||
[ | ||
[ | ||
[ | ||
2 | ||
], | ||
[ | ||
[ | ||
"_id", | ||
"UInt32" | ||
], | ||
[ | ||
"_key", | ||
"ShortText" | ||
], | ||
[ | ||
"tags", | ||
"Tags" | ||
] | ||
], | ||
[ | ||
2, | ||
"The Last Samurai", | ||
[ | ||
"Samurai", | ||
"English", | ||
"Tom Cruise" | ||
] | ||
], | ||
[ | ||
3, | ||
"The Matrix", | ||
[ | ||
"Keanu Reeves", | ||
"SF", | ||
"English" | ||
] | ||
] | ||
] | ||
] | ||
] |
17 changes: 17 additions & 0 deletions
17
test/function/suite/select/filter/set_operation/not_and/not_and.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,17 @@ | ||
table_create Tags TABLE_HASH_KEY ShortText | ||
|
||
table_create Movies TABLE_HASH_KEY ShortText | ||
column_create Movies tags COLUMN_VECTOR Tags | ||
|
||
column_create Tags index COLUMN_INDEX Movies tags | ||
|
||
load --table Movies | ||
[ | ||
{"_key": "Seven Samurai", tags: ["Samurai", "Japanese", "Kurosawa Akira"]}, | ||
{"_key": "The Last Samurai", tags: ["Samurai", "English", "Tom Cruise"]}, | ||
{"_key": "The Matrix", tags: ["Keanu Reeves", "SF", "English"]}, | ||
{"_key": "Star Wars", tags: ["George Lucas", "SF", "English"]} | ||
] | ||
|
||
select Movies \ | ||
--filter 'tags @ "English" &! (tags @ "SF" &! tags @ "Keanu Reeves")' |
54 changes: 54 additions & 0 deletions
54
test/function/suite/select/filter/set_operation/not_and/or.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,54 @@ | ||
table_create Tags TABLE_HASH_KEY ShortText | ||
[[0,0.0,0.0],true] | ||
table_create Movies TABLE_HASH_KEY ShortText | ||
[[0,0.0,0.0],true] | ||
column_create Movies tags COLUMN_VECTOR Tags | ||
[[0,0.0,0.0],true] | ||
column_create Tags index COLUMN_INDEX Movies tags | ||
[[0,0.0,0.0],true] | ||
load --table Movies | ||
[ | ||
{"_key": "Seven Samurai", tags: ["Samurai", "Japanese", "Kurosawa Akira"]}, | ||
{"_key": "The Last Samurai", tags: ["Samurai", "English", "Tom Cruise"]}, | ||
{"_key": "The Matrix", tags: ["Keanu Reeves", "SF", "English"]}, | ||
{"_key": "Star Wars", tags: ["George Lucas", "SF", "English"]} | ||
] | ||
[[0,0.0,0.0],4] | ||
select Movies --filter 'tags @ "English" &! (tags @ "Keanu Reeves" || tags @ "George Lucas")' | ||
[ | ||
[ | ||
0, | ||
0.0, | ||
0.0 | ||
], | ||
[ | ||
[ | ||
[ | ||
1 | ||
], | ||
[ | ||
[ | ||
"_id", | ||
"UInt32" | ||
], | ||
[ | ||
"_key", | ||
"ShortText" | ||
], | ||
[ | ||
"tags", | ||
"Tags" | ||
] | ||
], | ||
[ | ||
2, | ||
"The Last Samurai", | ||
[ | ||
"Samurai", | ||
"English", | ||
"Tom Cruise" | ||
] | ||
] | ||
] | ||
] | ||
] |
17 changes: 17 additions & 0 deletions
17
test/function/suite/select/filter/set_operation/not_and/or.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,17 @@ | ||
table_create Tags TABLE_HASH_KEY ShortText | ||
|
||
table_create Movies TABLE_HASH_KEY ShortText | ||
column_create Movies tags COLUMN_VECTOR Tags | ||
|
||
column_create Tags index COLUMN_INDEX Movies tags | ||
|
||
load --table Movies | ||
[ | ||
{"_key": "Seven Samurai", tags: ["Samurai", "Japanese", "Kurosawa Akira"]}, | ||
{"_key": "The Last Samurai", tags: ["Samurai", "English", "Tom Cruise"]}, | ||
{"_key": "The Matrix", tags: ["Keanu Reeves", "SF", "English"]}, | ||
{"_key": "Star Wars", tags: ["George Lucas", "SF", "English"]} | ||
] | ||
|
||
select Movies \ | ||
--filter 'tags @ "English" &! (tags @ "Keanu Reeves" || tags @ "George Lucas")' |
54 changes: 54 additions & 0 deletions
54
test/function/suite/select/filter/set_operation/not_and/single_expression.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,54 @@ | ||
table_create Tags TABLE_HASH_KEY ShortText | ||
[[0,0.0,0.0],true] | ||
table_create Movies TABLE_HASH_KEY ShortText | ||
[[0,0.0,0.0],true] | ||
column_create Movies tags COLUMN_VECTOR Tags | ||
[[0,0.0,0.0],true] | ||
column_create Tags index COLUMN_INDEX Movies tags | ||
[[0,0.0,0.0],true] | ||
load --table Movies | ||
[ | ||
{"_key": "Seven Samurai", tags: ["Samurai", "Japanese", "Kurosawa Akira"]}, | ||
{"_key": "The Last Samurai", tags: ["Samurai", "English", "Tom Cruise"]}, | ||
{"_key": "The Matrix", tags: ["Keanu Reeves", "SF", "English"]}, | ||
{"_key": "Star Wars", tags: ["George Lucas", "SF", "English"]} | ||
] | ||
[[0,0.0,0.0],4] | ||
select Movies --filter 'tags @ "English" &! tags @ "SF"' | ||
[ | ||
[ | ||
0, | ||
0.0, | ||
0.0 | ||
], | ||
[ | ||
[ | ||
[ | ||
1 | ||
], | ||
[ | ||
[ | ||
"_id", | ||
"UInt32" | ||
], | ||
[ | ||
"_key", | ||
"ShortText" | ||
], | ||
[ | ||
"tags", | ||
"Tags" | ||
] | ||
], | ||
[ | ||
2, | ||
"The Last Samurai", | ||
[ | ||
"Samurai", | ||
"English", | ||
"Tom Cruise" | ||
] | ||
] | ||
] | ||
] | ||
] |
16 changes: 16 additions & 0 deletions
16
test/function/suite/select/filter/set_operation/not_and/single_expression.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 Tags TABLE_HASH_KEY ShortText | ||
|
||
table_create Movies TABLE_HASH_KEY ShortText | ||
column_create Movies tags COLUMN_VECTOR Tags | ||
|
||
column_create Tags index COLUMN_INDEX Movies tags | ||
|
||
load --table Movies | ||
[ | ||
{"_key": "Seven Samurai", tags: ["Samurai", "Japanese", "Kurosawa Akira"]}, | ||
{"_key": "The Last Samurai", tags: ["Samurai", "English", "Tom Cruise"]}, | ||
{"_key": "The Matrix", tags: ["Keanu Reeves", "SF", "English"]}, | ||
{"_key": "Star Wars", tags: ["George Lucas", "SF", "English"]} | ||
] | ||
|
||
select Movies --filter 'tags @ "English" &! tags @ "SF"' |