Kouhei Sutou
null+****@clear*****
Fri Feb 13 16:29:17 JST 2015
Kouhei Sutou 2015-02-13 16:29:17 +0900 (Fri, 13 Feb 2015) New Revision: 4a2b5b29adf0f428d5c29e0316ba340ee4a93818 https://github.com/groonga/groonga/commit/4a2b5b29adf0f428d5c29e0316ba340ee4a93818 Message: logical_range_filter test: add a test for --filter case Added files: test/command/suite/sharding/logical_range_filter/condition/no_range.expected test/command/suite/sharding/logical_range_filter/condition/no_range.test Added: test/command/suite/sharding/logical_range_filter/condition/no_range.expected (+102 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/sharding/logical_range_filter/condition/no_range.expected 2015-02-13 16:29:17 +0900 (bac7869) @@ -0,0 +1,102 @@ +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 message COLUMN_SCALAR Text +[[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 message COLUMN_SCALAR Text +[[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 message COLUMN_SCALAR Text +[[0,0.0,0.0],true] +load --table Logs_20150203 +[ +{ + "timestamp": "2015-02-03 12:49:00", + "memo": "2015-02-03 12:49:00", + "message": "Start" +} +] +[[0,0.0,0.0],1] +load --table Logs_20150204 +[ +{ + "timestamp": "2015-02-04 13:49:00", + "memo": "2015-02-04 13:49:00", + "message": "Start" +}, +{ + "timestamp": "2015-02-04 13:50:00", + "memo": "2015-02-04 13:50:00", + "message": "Shutdown" +} +] +[[0,0.0,0.0],2] +load --table Logs_20150205 +[ +{ + "timestamp": "2015-02-05 13:49:00", + "memo": "2015-02-05 13:49:00", + "message": "Start" +}, +{ + "timestamp": "2015-02-05 13:50:00", + "memo": "2015-02-05 13:50:00", + "message": "Running" +}, +{ + "timestamp": "2015-02-05 13:51:00", + "memo": "2015-02-05 13:51:00", + "message": "Shutdown" +} +] +[[0,0.0,0.0],3] +logical_range_filter Logs timestamp --filter 'message == "Shutdown"' +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + "memo", + "ShortText" + ], + [ + "message", + "Text" + ], + [ + "timestamp", + "Time" + ] + ], + [ + "2015-02-04 13:50:00", + "Shutdown", + 1423025400.0 + ], + [ + "2015-02-05 13:51:00", + "Shutdown", + 1423111860.0 + ] + ] +] Added: test/command/suite/sharding/logical_range_filter/condition/no_range.test (+62 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/sharding/logical_range_filter/condition/no_range.test 2015-02-13 16:29:17 +0900 (35df14a) @@ -0,0 +1,62 @@ +#@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 message COLUMN_SCALAR Text + +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 message COLUMN_SCALAR Text + +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 message COLUMN_SCALAR Text + +load --table Logs_20150203 +[ +{ + "timestamp": "2015-02-03 12:49:00", + "memo": "2015-02-03 12:49:00", + "message": "Start" +} +] + +load --table Logs_20150204 +[ +{ + "timestamp": "2015-02-04 13:49:00", + "memo": "2015-02-04 13:49:00", + "message": "Start" +}, +{ + "timestamp": "2015-02-04 13:50:00", + "memo": "2015-02-04 13:50:00", + "message": "Shutdown" +} +] + +load --table Logs_20150205 +[ +{ + "timestamp": "2015-02-05 13:49:00", + "memo": "2015-02-05 13:49:00", + "message": "Start" +}, +{ + "timestamp": "2015-02-05 13:50:00", + "memo": "2015-02-05 13:50:00", + "message": "Running" +}, +{ + "timestamp": "2015-02-05 13:51:00", + "memo": "2015-02-05 13:51:00", + "message": "Shutdown" +} +] + +logical_range_filter Logs timestamp --filter 'message == "Shutdown"' -------------- next part -------------- HTML����������������������������...Download