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 #679 from kenhys/test-cache-drilldowns-table
test: add drilldowns[LABEL].table test case without cache Patch by Kentaro Hayashi. Thanks!!!
- Loading branch information
Showing
2 changed files
with
338 additions
and
0 deletions.
There are no files selected for viewing
233 changes: 233 additions & 0 deletions
233
test/command/suite/sharding/logical_select/cache/drilldowns/table.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,233 @@ | ||
| 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": "Shutdown" | ||
| } | ||
| ] | ||
| [[0,0.0,0.0],4] | ||
| logical_select Logs --shard_key timestamp --limit 0 --output_columns _id --drilldowns[restart].stage initial --drilldowns[restart].keys 'action' --drilldowns[restart].filter "_key @ 'Restart'" --drilldowns[restart].output_columns _key --drilldowns[start].stage initial --drilldowns[start].keys 'action' --drilldowns[start].filter "_key @ 'Start'" --drilldowns[start].output_columns _key --drilldowns[action].table restart --drilldowns[action].keys _key | ||
| [ | ||
| [ | ||
| 0, | ||
| 0.0, | ||
| 0.0 | ||
| ], | ||
| [ | ||
| [ | ||
| [ | ||
| 9 | ||
| ], | ||
| [ | ||
| [ | ||
| "_id", | ||
| "UInt32" | ||
| ] | ||
| ] | ||
| ], | ||
| { | ||
| "restart": [ | ||
| [ | ||
| 1 | ||
| ], | ||
| [ | ||
| [ | ||
| "_key", | ||
| "ShortText" | ||
| ] | ||
| ], | ||
| [ | ||
| "Restart" | ||
| ] | ||
| ], | ||
| "start": [ | ||
| [ | ||
| 2 | ||
| ], | ||
| [ | ||
| [ | ||
| "_key", | ||
| "ShortText" | ||
| ] | ||
| ], | ||
| [ | ||
| "Start" | ||
| ], | ||
| [ | ||
| "Restart" | ||
| ] | ||
| ], | ||
| "action": [ | ||
| [ | ||
| 1 | ||
| ], | ||
| [ | ||
| [ | ||
| "_key", | ||
| "ShortText" | ||
| ], | ||
| [ | ||
| "_nsubrecs", | ||
| "Int32" | ||
| ] | ||
| ], | ||
| [ | ||
| "Restart", | ||
| 1 | ||
| ] | ||
| ] | ||
| } | ||
| ] | ||
| ] | ||
| logical_select Logs --shard_key timestamp --limit 0 --output_columns _id --drilldowns[restart].stage initial --drilldowns[restart].keys 'action' --drilldowns[restart].filter "_key @ 'Restart'" --drilldowns[restart].output_columns _key --drilldowns[start].stage initial --drilldowns[start].keys 'action' --drilldowns[start].filter "_key @ 'Start'" --drilldowns[start].output_columns _key --drilldowns[action].table start --drilldowns[action].keys _key | ||
| [ | ||
| [ | ||
| 0, | ||
| 0.0, | ||
| 0.0 | ||
| ], | ||
| [ | ||
| [ | ||
| [ | ||
| 9 | ||
| ], | ||
| [ | ||
| [ | ||
| "_id", | ||
| "UInt32" | ||
| ] | ||
| ] | ||
| ], | ||
| { | ||
| "restart": [ | ||
| [ | ||
| 1 | ||
| ], | ||
| [ | ||
| [ | ||
| "_key", | ||
| "ShortText" | ||
| ] | ||
| ], | ||
| [ | ||
| "Restart" | ||
| ] | ||
| ], | ||
| "start": [ | ||
| [ | ||
| 2 | ||
| ], | ||
| [ | ||
| [ | ||
| "_key", | ||
| "ShortText" | ||
| ] | ||
| ], | ||
| [ | ||
| "Start" | ||
| ], | ||
| [ | ||
| "Restart" | ||
| ] | ||
| ], | ||
| "action": [ | ||
| [ | ||
| 2 | ||
| ], | ||
| [ | ||
| [ | ||
| "_key", | ||
| "ShortText" | ||
| ], | ||
| [ | ||
| "_nsubrecs", | ||
| "Int32" | ||
| ] | ||
| ], | ||
| [ | ||
| "Start", | ||
| 1 | ||
| ], | ||
| [ | ||
| "Restart", | ||
| 1 | ||
| ] | ||
| ] | ||
| } | ||
| ] | ||
| ] |
105 changes: 105 additions & 0 deletions
105
test/command/suite/sharding/logical_select/cache/drilldowns/table.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,105 @@ | ||
| #@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": "Shutdown" | ||
| } | ||
| ] | ||
|
|
||
| logical_select Logs \ | ||
| --shard_key timestamp \ | ||
| --limit 0 \ | ||
| --output_columns _id \ | ||
| --drilldowns[restart].stage initial \ | ||
| --drilldowns[restart].keys 'action' \ | ||
| --drilldowns[restart].filter "_key @ 'Restart'" \ | ||
| --drilldowns[restart].output_columns _key \ | ||
| --drilldowns[start].stage initial \ | ||
| --drilldowns[start].keys 'action' \ | ||
| --drilldowns[start].filter "_key @ 'Start'" \ | ||
| --drilldowns[start].output_columns _key \ | ||
| --drilldowns[action].table restart \ | ||
| --drilldowns[action].keys _key | ||
|
|
||
| logical_select Logs \ | ||
| --shard_key timestamp \ | ||
| --limit 0 \ | ||
| --output_columns _id \ | ||
| --drilldowns[restart].stage initial \ | ||
| --drilldowns[restart].keys 'action' \ | ||
| --drilldowns[restart].filter "_key @ 'Restart'" \ | ||
| --drilldowns[restart].output_columns _key \ | ||
| --drilldowns[start].stage initial \ | ||
| --drilldowns[start].keys 'action' \ | ||
| --drilldowns[start].filter "_key @ 'Start'" \ | ||
| --drilldowns[start].output_columns _key \ | ||
| --drilldowns[action].table start \ | ||
| --drilldowns[action].keys _key |