Kouhei Sutou
null+****@clear*****
Fri Feb 13 17:17:00 JST 2015
Kouhei Sutou 2015-02-13 17:17:00 +0900 (Fri, 13 Feb 2015) New Revision: 08cf4627e92e1615a6dfee3467f2d6758733b0ca https://github.com/groonga/groonga/commit/08cf4627e92e1615a6dfee3467f2d6758733b0ca Message: logical_range_filter test: add tests for range search Added files: test/command/suite/sharding/logical_range_filter/condition/range/max_exclude.expected test/command/suite/sharding/logical_range_filter/condition/range/max_exclude.test test/command/suite/sharding/logical_range_filter/condition/range/max_include.expected test/command/suite/sharding/logical_range_filter/condition/range/max_include.test test/command/suite/sharding/logical_range_filter/condition/range/min_exclude.expected test/command/suite/sharding/logical_range_filter/condition/range/min_exclude.test test/command/suite/sharding/logical_range_filter/condition/range/min_exclude_max_exclude.expected test/command/suite/sharding/logical_range_filter/condition/range/min_exclude_max_exclude.test test/command/suite/sharding/logical_range_filter/condition/range/min_exclude_max_include.expected test/command/suite/sharding/logical_range_filter/condition/range/min_exclude_max_include.test test/command/suite/sharding/logical_range_filter/condition/range/min_include.expected test/command/suite/sharding/logical_range_filter/condition/range/min_include.test test/command/suite/sharding/logical_range_filter/condition/range/min_include_max_exclude.expected test/command/suite/sharding/logical_range_filter/condition/range/min_include_max_exclude.test test/command/suite/sharding/logical_range_filter/condition/range/min_include_max_include.expected test/command/suite/sharding/logical_range_filter/condition/range/min_include_max_include.test Added: test/command/suite/sharding/logical_range_filter/condition/range/max_exclude.expected (+101 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/sharding/logical_range_filter/condition/range/max_exclude.expected 2015-02-13 17:17:00 +0900 (862e56b) @@ -0,0 +1,101 @@ +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 Text +[[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 Text +[[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 Text +[[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 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Shutdown"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Shutdown"} +] +[[0,0.0,0.0],4] +load --table Logs_20150204 +[ +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Shutdown"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Shutdown"} +] +[[0,0.0,0.0],6] +load --table Logs_20150205 +[ +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Shutdown"} +] +[[0,0.0,0.0],4] +logical_range_filter Logs timestamp --filter 'message == "Shutdown"' --max "2015-02-05 00:00:00" --max_border "exclude" +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + "memo", + "Text" + ], + [ + "message", + "Text" + ], + [ + "timestamp", + "Time" + ] + ], + [ + "2015-02-03 23:59:58", + "Shutdown", + 1422975598.0 + ], + [ + "2015-02-03 23:59:59", + "Shutdown", + 1422975599.0 + ], + [ + "2015-02-04 00:00:00", + "Shutdown", + 1422975600.0 + ], + [ + "2015-02-04 00:00:01", + "Shutdown", + 1422975601.0 + ], + [ + "2015-02-04 23:59:59", + "Shutdown", + 1423061999.0 + ] + ] +] Added: test/command/suite/sharding/logical_range_filter/condition/range/max_exclude.test (+50 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/sharding/logical_range_filter/condition/range/max_exclude.test 2015-02-13 17:17:00 +0900 (98b42f0) @@ -0,0 +1,50 @@ +#@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 Text +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 Text +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 Text +column_create Logs_20150205 message COLUMN_SCALAR Text + +load --table Logs_20150203 +[ +{"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Shutdown"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Shutdown"} +] + +load --table Logs_20150204 +[ +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Shutdown"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Shutdown"} +] + +load --table Logs_20150205 +[ +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Shutdown"} +] + +logical_range_filter Logs timestamp \ + --filter 'message == "Shutdown"' \ + --max "2015-02-05 00:00:00" \ + --max_border "exclude" + Added: test/command/suite/sharding/logical_range_filter/condition/range/max_include.expected (+106 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/sharding/logical_range_filter/condition/range/max_include.expected 2015-02-13 17:17:00 +0900 (ee7a170) @@ -0,0 +1,106 @@ +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 Text +[[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 Text +[[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 Text +[[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 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Shutdown"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Shutdown"} +] +[[0,0.0,0.0],4] +load --table Logs_20150204 +[ +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Shutdown"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Shutdown"} +] +[[0,0.0,0.0],6] +load --table Logs_20150205 +[ +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Shutdown"} +] +[[0,0.0,0.0],4] +logical_range_filter Logs timestamp --filter 'message == "Shutdown"' --max "2015-02-05 00:00:00" --max_border "include" +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + "memo", + "Text" + ], + [ + "message", + "Text" + ], + [ + "timestamp", + "Time" + ] + ], + [ + "2015-02-03 23:59:58", + "Shutdown", + 1422975598.0 + ], + [ + "2015-02-03 23:59:59", + "Shutdown", + 1422975599.0 + ], + [ + "2015-02-04 00:00:00", + "Shutdown", + 1422975600.0 + ], + [ + "2015-02-04 00:00:01", + "Shutdown", + 1422975601.0 + ], + [ + "2015-02-04 23:59:59", + "Shutdown", + 1423061999.0 + ], + [ + "2015-02-05 00:00:00", + "Shutdown", + 1423062000.0 + ] + ] +] Added: test/command/suite/sharding/logical_range_filter/condition/range/max_include.test (+50 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/sharding/logical_range_filter/condition/range/max_include.test 2015-02-13 17:17:00 +0900 (0b8ad52) @@ -0,0 +1,50 @@ +#@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 Text +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 Text +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 Text +column_create Logs_20150205 message COLUMN_SCALAR Text + +load --table Logs_20150203 +[ +{"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Shutdown"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Shutdown"} +] + +load --table Logs_20150204 +[ +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Shutdown"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Shutdown"} +] + +load --table Logs_20150205 +[ +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Shutdown"} +] + +logical_range_filter Logs timestamp \ + --filter 'message == "Shutdown"' \ + --max "2015-02-05 00:00:00" \ + --max_border "include" + Added: test/command/suite/sharding/logical_range_filter/condition/range/min_exclude.expected (+96 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/sharding/logical_range_filter/condition/range/min_exclude.expected 2015-02-13 17:17:00 +0900 (e07d653) @@ -0,0 +1,96 @@ +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 Text +[[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 Text +[[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 Text +[[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 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Shutdown"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Shutdown"} +] +[[0,0.0,0.0],4] +load --table Logs_20150204 +[ +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Shutdown"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Shutdown"} +] +[[0,0.0,0.0],6] +load --table Logs_20150205 +[ +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Shutdown"} +] +[[0,0.0,0.0],4] +logical_range_filter Logs timestamp --filter 'message == "Shutdown"' --min "2015-02-04 00:00:00" --min_border "exclude" +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + "memo", + "Text" + ], + [ + "message", + "Text" + ], + [ + "timestamp", + "Time" + ] + ], + [ + "2015-02-04 00:00:01", + "Shutdown", + 1422975601.0 + ], + [ + "2015-02-04 23:59:59", + "Shutdown", + 1423061999.0 + ], + [ + "2015-02-05 00:00:00", + "Shutdown", + 1423062000.0 + ], + [ + "2015-02-05 00:00:01", + "Shutdown", + 1423062001.0 + ] + ] +] Added: test/command/suite/sharding/logical_range_filter/condition/range/min_exclude.test (+50 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/sharding/logical_range_filter/condition/range/min_exclude.test 2015-02-13 17:17:00 +0900 (0889ad3) @@ -0,0 +1,50 @@ +#@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 Text +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 Text +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 Text +column_create Logs_20150205 message COLUMN_SCALAR Text + +load --table Logs_20150203 +[ +{"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Shutdown"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Shutdown"} +] + +load --table Logs_20150204 +[ +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Shutdown"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Shutdown"} +] + +load --table Logs_20150205 +[ +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Shutdown"} +] + +logical_range_filter Logs timestamp \ + --filter 'message == "Shutdown"' \ + --min "2015-02-04 00:00:00" \ + --min_border "exclude" + Added: test/command/suite/sharding/logical_range_filter/condition/range/min_exclude_max_exclude.expected (+86 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/sharding/logical_range_filter/condition/range/min_exclude_max_exclude.expected 2015-02-13 17:17:00 +0900 (aa65a3d) @@ -0,0 +1,86 @@ +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 Text +[[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 Text +[[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 Text +[[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 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Shutdown"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Shutdown"} +] +[[0,0.0,0.0],4] +load --table Logs_20150204 +[ +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Shutdown"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Shutdown"} +] +[[0,0.0,0.0],6] +load --table Logs_20150205 +[ +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Shutdown"} +] +[[0,0.0,0.0],4] +logical_range_filter Logs timestamp --filter 'message == "Shutdown"' --min "2015-02-04 00:00:00" --min_border "exclude" --max "2015-02-05 00:00:00" --max_border "exclude" +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + "memo", + "Text" + ], + [ + "message", + "Text" + ], + [ + "timestamp", + "Time" + ] + ], + [ + "2015-02-04 00:00:01", + "Shutdown", + 1422975601.0 + ], + [ + "2015-02-04 23:59:59", + "Shutdown", + 1423061999.0 + ] + ] +] Added: test/command/suite/sharding/logical_range_filter/condition/range/min_exclude_max_exclude.test (+52 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/sharding/logical_range_filter/condition/range/min_exclude_max_exclude.test 2015-02-13 17:17:00 +0900 (4da3d47) @@ -0,0 +1,52 @@ +#@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 Text +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 Text +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 Text +column_create Logs_20150205 message COLUMN_SCALAR Text + +load --table Logs_20150203 +[ +{"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Shutdown"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Shutdown"} +] + +load --table Logs_20150204 +[ +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Shutdown"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Shutdown"} +] + +load --table Logs_20150205 +[ +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Shutdown"} +] + +logical_range_filter Logs timestamp \ + --filter 'message == "Shutdown"' \ + --min "2015-02-04 00:00:00" \ + --min_border "exclude" \ + --max "2015-02-05 00:00:00" \ + --max_border "exclude" + Added: test/command/suite/sharding/logical_range_filter/condition/range/min_exclude_max_include.expected (+91 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/sharding/logical_range_filter/condition/range/min_exclude_max_include.expected 2015-02-13 17:17:00 +0900 (6203238) @@ -0,0 +1,91 @@ +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 Text +[[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 Text +[[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 Text +[[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 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Shutdown"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Shutdown"} +] +[[0,0.0,0.0],4] +load --table Logs_20150204 +[ +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Shutdown"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Shutdown"} +] +[[0,0.0,0.0],6] +load --table Logs_20150205 +[ +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Shutdown"} +] +[[0,0.0,0.0],4] +logical_range_filter Logs timestamp --filter 'message == "Shutdown"' --min "2015-02-04 00:00:00" --min_border "exclude" --max "2015-02-05 00:00:00" --max_border "include" +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + "memo", + "Text" + ], + [ + "message", + "Text" + ], + [ + "timestamp", + "Time" + ] + ], + [ + "2015-02-04 00:00:01", + "Shutdown", + 1422975601.0 + ], + [ + "2015-02-04 23:59:59", + "Shutdown", + 1423061999.0 + ], + [ + "2015-02-05 00:00:00", + "Shutdown", + 1423062000.0 + ] + ] +] Added: test/command/suite/sharding/logical_range_filter/condition/range/min_exclude_max_include.test (+52 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/sharding/logical_range_filter/condition/range/min_exclude_max_include.test 2015-02-13 17:17:00 +0900 (6dbdb15) @@ -0,0 +1,52 @@ +#@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 Text +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 Text +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 Text +column_create Logs_20150205 message COLUMN_SCALAR Text + +load --table Logs_20150203 +[ +{"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Shutdown"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Shutdown"} +] + +load --table Logs_20150204 +[ +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Shutdown"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Shutdown"} +] + +load --table Logs_20150205 +[ +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Shutdown"} +] + +logical_range_filter Logs timestamp \ + --filter 'message == "Shutdown"' \ + --min "2015-02-04 00:00:00" \ + --min_border "exclude" \ + --max "2015-02-05 00:00:00" \ + --max_border "include" + Added: test/command/suite/sharding/logical_range_filter/condition/range/min_include.expected (+101 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/sharding/logical_range_filter/condition/range/min_include.expected 2015-02-13 17:17:00 +0900 (5992284) @@ -0,0 +1,101 @@ +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 Text +[[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 Text +[[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 Text +[[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 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Shutdown"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Shutdown"} +] +[[0,0.0,0.0],4] +load --table Logs_20150204 +[ +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Shutdown"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Shutdown"} +] +[[0,0.0,0.0],6] +load --table Logs_20150205 +[ +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Shutdown"} +] +[[0,0.0,0.0],4] +logical_range_filter Logs timestamp --filter 'message == "Shutdown"' --min "2015-02-04 00:00:00" --min_border "include" +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + "memo", + "Text" + ], + [ + "message", + "Text" + ], + [ + "timestamp", + "Time" + ] + ], + [ + "2015-02-04 00:00:00", + "Shutdown", + 1422975600.0 + ], + [ + "2015-02-04 00:00:01", + "Shutdown", + 1422975601.0 + ], + [ + "2015-02-04 23:59:59", + "Shutdown", + 1423061999.0 + ], + [ + "2015-02-05 00:00:00", + "Shutdown", + 1423062000.0 + ], + [ + "2015-02-05 00:00:01", + "Shutdown", + 1423062001.0 + ] + ] +] Added: test/command/suite/sharding/logical_range_filter/condition/range/min_include.test (+50 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/sharding/logical_range_filter/condition/range/min_include.test 2015-02-13 17:17:00 +0900 (edb2249) @@ -0,0 +1,50 @@ +#@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 Text +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 Text +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 Text +column_create Logs_20150205 message COLUMN_SCALAR Text + +load --table Logs_20150203 +[ +{"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Shutdown"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Shutdown"} +] + +load --table Logs_20150204 +[ +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Shutdown"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Shutdown"} +] + +load --table Logs_20150205 +[ +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Shutdown"} +] + +logical_range_filter Logs timestamp \ + --filter 'message == "Shutdown"' \ + --min "2015-02-04 00:00:00" \ + --min_border "include" + Added: test/command/suite/sharding/logical_range_filter/condition/range/min_include_max_exclude.expected (+91 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/sharding/logical_range_filter/condition/range/min_include_max_exclude.expected 2015-02-13 17:17:00 +0900 (6b87fdd) @@ -0,0 +1,91 @@ +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 Text +[[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 Text +[[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 Text +[[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 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Shutdown"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Shutdown"} +] +[[0,0.0,0.0],4] +load --table Logs_20150204 +[ +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Shutdown"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Shutdown"} +] +[[0,0.0,0.0],6] +load --table Logs_20150205 +[ +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Shutdown"} +] +[[0,0.0,0.0],4] +logical_range_filter Logs timestamp --filter 'message == "Shutdown"' --min "2015-02-04 00:00:00" --min_border "include" --max "2015-02-05 00:00:00" --max_border "exclude" +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + "memo", + "Text" + ], + [ + "message", + "Text" + ], + [ + "timestamp", + "Time" + ] + ], + [ + "2015-02-04 00:00:00", + "Shutdown", + 1422975600.0 + ], + [ + "2015-02-04 00:00:01", + "Shutdown", + 1422975601.0 + ], + [ + "2015-02-04 23:59:59", + "Shutdown", + 1423061999.0 + ] + ] +] Added: test/command/suite/sharding/logical_range_filter/condition/range/min_include_max_exclude.test (+52 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/sharding/logical_range_filter/condition/range/min_include_max_exclude.test 2015-02-13 17:17:00 +0900 (fa18f0a) @@ -0,0 +1,52 @@ +#@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 Text +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 Text +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 Text +column_create Logs_20150205 message COLUMN_SCALAR Text + +load --table Logs_20150203 +[ +{"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Shutdown"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Shutdown"} +] + +load --table Logs_20150204 +[ +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Shutdown"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Shutdown"} +] + +load --table Logs_20150205 +[ +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Shutdown"} +] + +logical_range_filter Logs timestamp \ + --filter 'message == "Shutdown"' \ + --min "2015-02-04 00:00:00" \ + --min_border "include" \ + --max "2015-02-05 00:00:00" \ + --max_border "exclude" + Added: test/command/suite/sharding/logical_range_filter/condition/range/min_include_max_include.expected (+96 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/sharding/logical_range_filter/condition/range/min_include_max_include.expected 2015-02-13 17:17:00 +0900 (dd58db7) @@ -0,0 +1,96 @@ +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 Text +[[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 Text +[[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 Text +[[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 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Shutdown"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Shutdown"} +] +[[0,0.0,0.0],4] +load --table Logs_20150204 +[ +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Shutdown"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Shutdown"} +] +[[0,0.0,0.0],6] +load --table Logs_20150205 +[ +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Shutdown"} +] +[[0,0.0,0.0],4] +logical_range_filter Logs timestamp --filter 'message == "Shutdown"' --min "2015-02-04 00:00:00" --min_border "include" --max "2015-02-05 00:00:00" --max_border "include" +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + "memo", + "Text" + ], + [ + "message", + "Text" + ], + [ + "timestamp", + "Time" + ] + ], + [ + "2015-02-04 00:00:00", + "Shutdown", + 1422975600.0 + ], + [ + "2015-02-04 00:00:01", + "Shutdown", + 1422975601.0 + ], + [ + "2015-02-04 23:59:59", + "Shutdown", + 1423061999.0 + ], + [ + "2015-02-05 00:00:00", + "Shutdown", + 1423062000.0 + ] + ] +] Added: test/command/suite/sharding/logical_range_filter/condition/range/min_include_max_include.test (+52 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/sharding/logical_range_filter/condition/range/min_include_max_include.test 2015-02-13 17:17:00 +0900 (7f66862) @@ -0,0 +1,52 @@ +#@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 Text +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 Text +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 Text +column_create Logs_20150205 message COLUMN_SCALAR Text + +load --table Logs_20150203 +[ +{"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Shutdown"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Shutdown"} +] + +load --table Logs_20150204 +[ +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Shutdown"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Start"}, +{"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Shutdown"} +] + +load --table Logs_20150205 +[ +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Shutdown"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Start"}, +{"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Shutdown"} +] + +logical_range_filter Logs timestamp \ + --filter 'message == "Shutdown"' \ + --min "2015-02-04 00:00:00" \ + --min_border "include" \ + --max "2015-02-05 00:00:00" \ + --max_border "include" + -------------- next part -------------- HTML����������������������������... Download