Naoya Murakami
null+****@clear*****
Tue Jul 11 23:31:45 JST 2017
Naoya Murakami 2017-07-11 23:31:45 +0900 (Tue, 11 Jul 2017) New Revision: c81d72a058f79c873c4a4e93308d0df2e435ff5b https://github.com/groonga/groonga/commit/c81d72a058f79c873c4a4e93308d0df2e435ff5b Merged f5406a5: Merge pull request #734 from naoa/test-overflow-time-classify-interval Message: functions/time: add test for overflow interval case Added files: test/command/suite/select/function/time/time_classify_month/overflow_interval.expected test/command/suite/select/function/time/time_classify_month/overflow_interval.test Added: test/command/suite/select/function/time/time_classify_month/overflow_interval.expected (+67 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/function/time/time_classify_month/overflow_interval.expected 2017-07-11 23:31:45 +0900 (6bfb802) @@ -0,0 +1,67 @@ +plugin_register functions/time +[[0,0.0,0.0],true] +table_create Timestamps TABLE_PAT_KEY Time +[[0,0.0,0.0],true] +load --table Timestamps +[ +{"_key": "2016-04-30 23:59:59.999999"}, +{"_key": "2016-05-01 00:00:00.000000"}, +{"_key": "2016-05-01 00:00:00.000001"}, +{"_key": "2016-06-30 23:59:59.999999"}, +{"_key": "2016-07-01 00:00:00.000000"}, +{"_key": "2016-07-01 00:00:00.000001"} +] +[[0,0.0,0.0],6] +select Timestamps --sortby _id --limit -1 --output_columns '_key, time_classify_month(_key, 4294967296)' +[ + [ + [ + -22, + 0.0, + 0.0 + ], + "time_classify_month(): the second argument must not be zero: <4294967296>" + ], + [ + [ + [ + 6 + ], + [ + [ + "_key", + "Time" + ], + [ + "time_classify_month", + null + ] + ], + [ + 1462060799.999999, + "time_classify_month(): the second argument must not be zero: <4294967296>" + ], + [ + 1462060800.0, + "time_classify_month(): the second argument must not be zero: <4294967296>" + ], + [ + 1462060800.000001, + "time_classify_month(): the second argument must not be zero: <4294967296>" + ], + [ + 1467331199.999999, + "time_classify_month(): the second argument must not be zero: <4294967296>" + ], + [ + 1467331200.0, + "time_classify_month(): the second argument must not be zero: <4294967296>" + ], + [ + 1467331200.000001, + "time_classify_month(): the second argument must not be zero: <4294967296>" + ] + ] + ] +] +#|e| time_classify_month(): the second argument must not be zero: <4294967296> Added: test/command/suite/select/function/time/time_classify_month/overflow_interval.test (+18 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/function/time/time_classify_month/overflow_interval.test 2017-07-11 23:31:45 +0900 (d0900d2) @@ -0,0 +1,18 @@ +plugin_register functions/time + +table_create Timestamps TABLE_PAT_KEY Time + +load --table Timestamps +[ +{"_key": "2016-04-30 23:59:59.999999"}, +{"_key": "2016-05-01 00:00:00.000000"}, +{"_key": "2016-05-01 00:00:00.000001"}, +{"_key": "2016-06-30 23:59:59.999999"}, +{"_key": "2016-07-01 00:00:00.000000"}, +{"_key": "2016-07-01 00:00:00.000001"} +] + +select Timestamps \ + --sortby _id \ + --limit -1 \ + --output_columns '_key, time_classify_month(_key, 4294967296)' -------------- next part -------------- HTML����������������������������... Télécharger