Kouhei Sutou
null+****@clear*****
Thu Jul 9 17:09:39 JST 2015
Kouhei Sutou 2015-07-09 17:09:39 +0900 (Thu, 09 Jul 2015) New Revision: 674f09ed3bb5452399bc8fd52768f834235ba5f9 https://github.com/groonga/groonga/commit/674f09ed3bb5452399bc8fd52768f834235ba5f9 Message: logical_select: add a test for empty key Added files: test/command/suite/sharding/logical_select/output_columns/empty.expected test/command/suite/sharding/logical_select/output_columns/empty.test Added: test/command/suite/sharding/logical_select/output_columns/empty.expected (+141 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/sharding/logical_select/output_columns/empty.expected 2015-07-09 17:09:39 +0900 (0c8fbd2) @@ -0,0 +1,141 @@ +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] +table_create Times_20150203 TABLE_PAT_KEY Time +[[0,0.0,0.0],true] +column_create Times_20150203 timestamp_index COLUMN_INDEX Logs_20150203 timestamp +[[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] +table_create Times_20150204 TABLE_PAT_KEY Time +[[0,0.0,0.0],true] +column_create Times_20150204 timestamp_index COLUMN_INDEX Logs_20150204 timestamp +[[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] +table_create Times_20150205 TABLE_PAT_KEY Time +[[0,0.0,0.0],true] +column_create Times_20150205 timestamp_index COLUMN_INDEX Logs_20150205 timestamp +[[0,0.0,0.0],true] +load --table Logs_20150203 +[ +{ + "timestamp": "2015-02-03 12:49:00", + "memo": "2015-02-03 12:49:00" +}, +{ + "timestamp": "2015-02-03 23:59:59", + "memo": "2015-02-03 23:59:59" +} +] +[[0,0.0,0.0],2] +load --table Logs_20150204 +[ +{ + "timestamp": "2015-02-04 00:00:00", + "memo": "2015-02-04 00:00:00" +}, +{ + "timestamp": "2015-02-04 13:49:00", + "memo": "2015-02-04 13:49:00" +}, +{ + "timestamp": "2015-02-04 13:50:00", + "memo": "2015-02-04 13:50:00" +} +] +[[0,0.0,0.0],3] +load --table Logs_20150205 +[ +{ + "timestamp": "2015-02-05 13:49:00", + "memo": "2015-02-05 13:49:00" +}, +{ + "timestamp": "2015-02-05 13:50:00", + "memo": "2015-02-05 13:50:00" +}, +{ + "timestamp": "2015-02-05 13:51:00", + "memo": "2015-02-05 13:51:00" +}, +{ + "timestamp": "2015-02-05 13:52:00", + "memo": "2015-02-05 13:52:00" +} +] +[[0,0.0,0.0],4] +logical_select Logs timestamp --output_columns _id,,memo +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + 9 + ], + [ + [ + "_id", + "UInt32" + ], + [ + "memo", + "ShortText" + ] + ], + [ + 1, + "2015-02-03 12:49:00" + ], + [ + 2, + "2015-02-03 23:59:59" + ], + [ + 1, + "2015-02-04 00:00:00" + ], + [ + 2, + "2015-02-04 13:49:00" + ], + [ + 3, + "2015-02-04 13:50:00" + ], + [ + 1, + "2015-02-05 13:49:00" + ], + [ + 2, + "2015-02-05 13:50:00" + ], + [ + 3, + "2015-02-05 13:51:00" + ], + [ + 4, + "2015-02-05 13:52:00" + ] + ] + ] +] Added: test/command/suite/sharding/logical_select/output_columns/empty.test (+72 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/sharding/logical_select/output_columns/empty.test 2015-07-09 17:09:39 +0900 (321008b) @@ -0,0 +1,72 @@ +#@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 +table_create Times_20150203 TABLE_PAT_KEY Time +column_create Times_20150203 timestamp_index COLUMN_INDEX Logs_20150203 timestamp + +table_create Logs_20150204 TABLE_NO_KEY +column_create Logs_20150204 timestamp COLUMN_SCALAR Time +column_create Logs_20150204 memo COLUMN_SCALAR ShortText +table_create Times_20150204 TABLE_PAT_KEY Time +column_create Times_20150204 timestamp_index COLUMN_INDEX Logs_20150204 timestamp + +table_create Logs_20150205 TABLE_NO_KEY +column_create Logs_20150205 timestamp COLUMN_SCALAR Time +column_create Logs_20150205 memo COLUMN_SCALAR ShortText +table_create Times_20150205 TABLE_PAT_KEY Time +column_create Times_20150205 timestamp_index COLUMN_INDEX Logs_20150205 timestamp + +load --table Logs_20150203 +[ +{ + "timestamp": "2015-02-03 12:49:00", + "memo": "2015-02-03 12:49:00" +}, +{ + "timestamp": "2015-02-03 23:59:59", + "memo": "2015-02-03 23:59:59" +} +] + +load --table Logs_20150204 +[ +{ + "timestamp": "2015-02-04 00:00:00", + "memo": "2015-02-04 00:00:00" +}, +{ + "timestamp": "2015-02-04 13:49:00", + "memo": "2015-02-04 13:49:00" +}, +{ + "timestamp": "2015-02-04 13:50:00", + "memo": "2015-02-04 13:50:00" +} +] + +load --table Logs_20150205 +[ +{ + "timestamp": "2015-02-05 13:49:00", + "memo": "2015-02-05 13:49:00" +}, +{ + "timestamp": "2015-02-05 13:50:00", + "memo": "2015-02-05 13:50:00" +}, +{ + "timestamp": "2015-02-05 13:51:00", + "memo": "2015-02-05 13:51:00" +}, +{ + "timestamp": "2015-02-05 13:52:00", + "memo": "2015-02-05 13:52:00" +} +] + +logical_select Logs timestamp \ + --output_columns _id,,memo -------------- next part -------------- HTML����������������������������...Download