-
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.
test: add drilldowns[LABEL].filter test case without cache
When the value of drilldowns[LABEL].filter parameter is changed, Groonga returns result without using cache.
- Loading branch information
Showing
2 changed files
with
388 additions
and
0 deletions.
There are no files selected for viewing
299 changes: 299 additions & 0 deletions
299
test/command/suite/sharding/logical_select/cache/drilldowns/filter.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,299 @@ | ||
plugin_register sharding | ||
[[0,0.0,0.0],true] | ||
table_create Logs_20150203 TABLE_NO_KEY | ||
[[0,0.0,0.0],true] | ||
column_create Logs_20150203 timestamp COLUMN_SCALAR Time | ||
[[0,0.0,0.0],true] | ||
column_create Logs_20150203 memo COLUMN_SCALAR ShortText | ||
[[0,0.0,0.0],true] | ||
column_create Logs_20150203 action COLUMN_SCALAR ShortText | ||
[[0,0.0,0.0],true] | ||
table_create Logs_20150204 TABLE_NO_KEY | ||
[[0,0.0,0.0],true] | ||
column_create Logs_20150204 timestamp COLUMN_SCALAR Time | ||
[[0,0.0,0.0],true] | ||
column_create Logs_20150204 memo COLUMN_SCALAR ShortText | ||
[[0,0.0,0.0],true] | ||
column_create Logs_20150204 action COLUMN_SCALAR ShortText | ||
[[0,0.0,0.0],true] | ||
table_create Logs_20150205 TABLE_NO_KEY | ||
[[0,0.0,0.0],true] | ||
column_create Logs_20150205 timestamp COLUMN_SCALAR Time | ||
[[0,0.0,0.0],true] | ||
column_create Logs_20150205 memo COLUMN_SCALAR ShortText | ||
[[0,0.0,0.0],true] | ||
column_create Logs_20150205 action COLUMN_SCALAR ShortText | ||
[[0,0.0,0.0],true] | ||
load --table Logs_20150203 | ||
[ | ||
{ | ||
"timestamp": "2015-02-03 12:49:00", | ||
"memo": "2015-02-03 12:49:00", | ||
"action": "Start" | ||
}, | ||
{ | ||
"timestamp": "2015-02-03 23:59:59", | ||
"memo": "2015-02-03 23:59:59", | ||
"action": "Shutdown" | ||
} | ||
] | ||
[[0,0.0,0.0],2] | ||
load --table Logs_20150204 | ||
[ | ||
{ | ||
"timestamp": "2015-02-04 00:00:00", | ||
"memo": "2015-02-04 00:00:00", | ||
"action": "Start" | ||
}, | ||
{ | ||
"timestamp": "2015-02-04 13:49:00", | ||
"memo": "2015-02-04 13:49:00", | ||
"action": "Restart" | ||
}, | ||
{ | ||
"timestamp": "2015-02-04 13:50:00", | ||
"memo": "2015-02-04 13:50:00", | ||
"action": "Restart" | ||
} | ||
] | ||
[[0,0.0,0.0],3] | ||
load --table Logs_20150205 | ||
[ | ||
{ | ||
"timestamp": "2015-02-05 13:49:00", | ||
"memo": "2015-02-05 13:49:00", | ||
"action": "Restart" | ||
}, | ||
{ | ||
"timestamp": "2015-02-05 13:50:00", | ||
"memo": "2015-02-05 13:50:00", | ||
"action": "Restart" | ||
}, | ||
{ | ||
"timestamp": "2015-02-05 13:51:00", | ||
"memo": "2015-02-05 13:51:00", | ||
"action": "Restart" | ||
}, | ||
{ | ||
"timestamp": "2015-02-05 13:52:00", | ||
"memo": "2015-02-05 13:52:00", | ||
"action": "Restart" | ||
} | ||
] | ||
[[0,0.0,0.0],4] | ||
logical_select Logs --shard_key timestamp --drilldowns[category].stage initial --drilldowns[category].keys 'action' --drilldowns[category].filter "_key @ 'Restart'" --drilldowns[category].output_columns _key,_nsubrecs | ||
[ | ||
[ | ||
0, | ||
0.0, | ||
0.0 | ||
], | ||
[ | ||
[ | ||
[ | ||
9 | ||
], | ||
[ | ||
[ | ||
"_id", | ||
"UInt32" | ||
], | ||
[ | ||
"action", | ||
"ShortText" | ||
], | ||
[ | ||
"memo", | ||
"ShortText" | ||
], | ||
[ | ||
"timestamp", | ||
"Time" | ||
] | ||
], | ||
[ | ||
1, | ||
"Start", | ||
"2015-02-03 12:49:00", | ||
1422935340.0 | ||
], | ||
[ | ||
2, | ||
"Shutdown", | ||
"2015-02-03 23:59:59", | ||
1422975599.0 | ||
], | ||
[ | ||
1, | ||
"Start", | ||
"2015-02-04 00:00:00", | ||
1422975600.0 | ||
], | ||
[ | ||
2, | ||
"Restart", | ||
"2015-02-04 13:49:00", | ||
1423025340.0 | ||
], | ||
[ | ||
3, | ||
"Restart", | ||
"2015-02-04 13:50:00", | ||
1423025400.0 | ||
], | ||
[ | ||
1, | ||
"Restart", | ||
"2015-02-05 13:49:00", | ||
1423111740.0 | ||
], | ||
[ | ||
2, | ||
"Restart", | ||
"2015-02-05 13:50:00", | ||
1423111800.0 | ||
], | ||
[ | ||
3, | ||
"Restart", | ||
"2015-02-05 13:51:00", | ||
1423111860.0 | ||
], | ||
[ | ||
4, | ||
"Restart", | ||
"2015-02-05 13:52:00", | ||
1423111920.0 | ||
] | ||
], | ||
{ | ||
"category": [ | ||
[ | ||
1 | ||
], | ||
[ | ||
[ | ||
"_key", | ||
"ShortText" | ||
], | ||
[ | ||
"_nsubrecs", | ||
"Int32" | ||
] | ||
], | ||
[ | ||
"Restart", | ||
6 | ||
] | ||
] | ||
} | ||
] | ||
] | ||
logical_select Logs --shard_key timestamp --drilldowns[category].stage initial --drilldowns[category].keys 'action' --drilldowns[category].filter "_key @ 'Shutdown'" --drilldowns[category].output_columns _key,_nsubrecs | ||
[ | ||
[ | ||
0, | ||
0.0, | ||
0.0 | ||
], | ||
[ | ||
[ | ||
[ | ||
9 | ||
], | ||
[ | ||
[ | ||
"_id", | ||
"UInt32" | ||
], | ||
[ | ||
"action", | ||
"ShortText" | ||
], | ||
[ | ||
"memo", | ||
"ShortText" | ||
], | ||
[ | ||
"timestamp", | ||
"Time" | ||
] | ||
], | ||
[ | ||
1, | ||
"Start", | ||
"2015-02-03 12:49:00", | ||
1422935340.0 | ||
], | ||
[ | ||
2, | ||
"Shutdown", | ||
"2015-02-03 23:59:59", | ||
1422975599.0 | ||
], | ||
[ | ||
1, | ||
"Start", | ||
"2015-02-04 00:00:00", | ||
1422975600.0 | ||
], | ||
[ | ||
2, | ||
"Restart", | ||
"2015-02-04 13:49:00", | ||
1423025340.0 | ||
], | ||
[ | ||
3, | ||
"Restart", | ||
"2015-02-04 13:50:00", | ||
1423025400.0 | ||
], | ||
[ | ||
1, | ||
"Restart", | ||
"2015-02-05 13:49:00", | ||
1423111740.0 | ||
], | ||
[ | ||
2, | ||
"Restart", | ||
"2015-02-05 13:50:00", | ||
1423111800.0 | ||
], | ||
[ | ||
3, | ||
"Restart", | ||
"2015-02-05 13:51:00", | ||
1423111860.0 | ||
], | ||
[ | ||
4, | ||
"Restart", | ||
"2015-02-05 13:52:00", | ||
1423111920.0 | ||
] | ||
], | ||
{ | ||
"category": [ | ||
[ | ||
1 | ||
], | ||
[ | ||
[ | ||
"_key", | ||
"ShortText" | ||
], | ||
[ | ||
"_nsubrecs", | ||
"Int32" | ||
] | ||
], | ||
[ | ||
"Shutdown", | ||
1 | ||
] | ||
] | ||
} | ||
] | ||
] |
89 changes: 89 additions & 0 deletions
89
test/command/suite/sharding/logical_select/cache/drilldowns/filter.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,89 @@ | ||
#@on-error omit | ||
plugin_register sharding | ||
#@on-error default | ||
|
||
table_create Logs_20150203 TABLE_NO_KEY | ||
column_create Logs_20150203 timestamp COLUMN_SCALAR Time | ||
column_create Logs_20150203 memo COLUMN_SCALAR ShortText | ||
column_create Logs_20150203 action COLUMN_SCALAR ShortText | ||
|
||
table_create Logs_20150204 TABLE_NO_KEY | ||
column_create Logs_20150204 timestamp COLUMN_SCALAR Time | ||
column_create Logs_20150204 memo COLUMN_SCALAR ShortText | ||
column_create Logs_20150204 action COLUMN_SCALAR ShortText | ||
|
||
table_create Logs_20150205 TABLE_NO_KEY | ||
column_create Logs_20150205 timestamp COLUMN_SCALAR Time | ||
column_create Logs_20150205 memo COLUMN_SCALAR ShortText | ||
column_create Logs_20150205 action COLUMN_SCALAR ShortText | ||
|
||
load --table Logs_20150203 | ||
[ | ||
{ | ||
"timestamp": "2015-02-03 12:49:00", | ||
"memo": "2015-02-03 12:49:00", | ||
"action": "Start" | ||
}, | ||
{ | ||
"timestamp": "2015-02-03 23:59:59", | ||
"memo": "2015-02-03 23:59:59", | ||
"action": "Shutdown" | ||
} | ||
] | ||
|
||
load --table Logs_20150204 | ||
[ | ||
{ | ||
"timestamp": "2015-02-04 00:00:00", | ||
"memo": "2015-02-04 00:00:00", | ||
"action": "Start" | ||
}, | ||
{ | ||
"timestamp": "2015-02-04 13:49:00", | ||
"memo": "2015-02-04 13:49:00", | ||
"action": "Restart" | ||
}, | ||
{ | ||
"timestamp": "2015-02-04 13:50:00", | ||
"memo": "2015-02-04 13:50:00", | ||
"action": "Restart" | ||
} | ||
] | ||
|
||
load --table Logs_20150205 | ||
[ | ||
{ | ||
"timestamp": "2015-02-05 13:49:00", | ||
"memo": "2015-02-05 13:49:00", | ||
"action": "Restart" | ||
}, | ||
{ | ||
"timestamp": "2015-02-05 13:50:00", | ||
"memo": "2015-02-05 13:50:00", | ||
"action": "Restart" | ||
}, | ||
{ | ||
"timestamp": "2015-02-05 13:51:00", | ||
"memo": "2015-02-05 13:51:00", | ||
"action": "Restart" | ||
}, | ||
{ | ||
"timestamp": "2015-02-05 13:52:00", | ||
"memo": "2015-02-05 13:52:00", | ||
"action": "Restart" | ||
} | ||
] | ||
|
||
logical_select Logs \ | ||
--shard_key timestamp \ | ||
--drilldowns[category].stage initial \ | ||
--drilldowns[category].keys 'action' \ | ||
--drilldowns[category].filter "_key @ 'Restart'" \ | ||
--drilldowns[category].output_columns _key,_nsubrecs | ||
|
||
logical_select Logs \ | ||
--shard_key timestamp \ | ||
--drilldowns[category].stage initial \ | ||
--drilldowns[category].keys 'action' \ | ||
--drilldowns[category].filter "_key @ 'Shutdown'" \ | ||
--drilldowns[category].output_columns _key,_nsubrecs |