Kouhei Sutou
null+****@clear*****
Tue Jul 7 15:16:08 JST 2015
Kouhei Sutou 2015-07-07 15:16:08 +0900 (Tue, 07 Jul 2015) New Revision: c176e691d89d327c2e5970eb75986bf540a97493 https://github.com/groonga/groonga/commit/c176e691d89d327c2e5970eb75986bf540a97493 Message: logical_select test: add a plain drilldown test for reference key Added files: test/command/suite/sharding/logical_select/drilldown/plain/keys/reference.expected test/command/suite/sharding/logical_select/drilldown/plain/keys/reference.test Added: test/command/suite/sharding/logical_select/drilldown/plain/keys/reference.expected (+141 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/sharding/logical_select/drilldown/plain/keys/reference.expected 2015-07-07 15:16:08 +0900 (86d013a) @@ -0,0 +1,141 @@ +register sharding +[[0,0.0,0.0],true] +table_create Actions TABLE_HASH_KEY ShortText +[[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 Actions +[[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 Actions +[[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 Actions +[[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 timestamp --limit 0 --drilldown action +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + 9 + ], + [ + [ + "action", + "Actions" + ], + [ + "memo", + "ShortText" + ], + [ + "timestamp", + "Time" + ] + ] + ], + [ + [ + 3 + ], + [ + [ + "_key", + "ShortText" + ], + [ + "_nsubrecs", + "Int32" + ] + ], + [ + "Start", + 2 + ], + [ + "Shutdown", + 1 + ], + [ + "Restart", + 6 + ] + ] + ] +] Added: test/command/suite/sharding/logical_select/drilldown/plain/keys/reference.test (+81 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/sharding/logical_select/drilldown/plain/keys/reference.test 2015-07-07 15:16:08 +0900 (02ad5a0) @@ -0,0 +1,81 @@ +#@on-error omit +register sharding +#@on-error default + +table_create Actions TABLE_HASH_KEY ShortText + +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 Actions + +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 Actions + +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 Actions + +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 timestamp \ + --limit 0 \ + --drilldown action -------------- next part -------------- HTML����������������������������... Download