Kouhei Sutou
null+****@clear*****
Tue Jul 7 15:10:26 JST 2015
Kouhei Sutou 2015-07-07 15:10:26 +0900 (Tue, 07 Jul 2015) New Revision: 00149d3e79dd4d8d8ce2fc43c6e486216b58281c https://github.com/groonga/groonga/commit/00149d3e79dd4d8d8ce2fc43c6e486216b58281c Message: logical_select test: add a plain drilldown test for multiple sort keys case Added files: test/command/suite/sharding/logical_select/drilldown/plain/sortby/multiple.expected test/command/suite/sharding/logical_select/drilldown/plain/sortby/multiple.test Added: test/command/suite/sharding/logical_select/drilldown/plain/sortby/multiple.expected (+139 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/sharding/logical_select/drilldown/plain/sortby/multiple.expected 2015-07-07 15:10:26 +0900 (fac9050) @@ -0,0 +1,139 @@ +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 timestamp --limit 0 --drilldown action --drilldown_sortby -_nsubrecs,_key +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + 9 + ], + [ + [ + "action", + "ShortText" + ], + [ + "memo", + "ShortText" + ], + [ + "timestamp", + "Time" + ] + ] + ], + [ + [ + 3 + ], + [ + [ + "_key", + "ShortText" + ], + [ + "_nsubrecs", + "Int32" + ] + ], + [ + "Restart", + 5 + ], + [ + "Shutdown", + 2 + ], + [ + "Start", + 2 + ] + ] + ] +] Added: test/command/suite/sharding/logical_select/drilldown/plain/sortby/multiple.test (+80 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/sharding/logical_select/drilldown/plain/sortby/multiple.test 2015-07-07 15:10:26 +0900 (acd4932) @@ -0,0 +1,80 @@ +#@on-error omit +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 timestamp \ + --limit 0 \ + --drilldown action \ + --drilldown_sortby -_nsubrecs,_key -------------- next part -------------- HTML����������������������������...Download