[feature](time) using timev2 type to replace the old time type. (#22269)

This commit is contained in:
Mryange
2023-08-01 15:59:07 +08:00
committed by GitHub
parent 58c62431d1
commit f16a39aea1
9 changed files with 64 additions and 28 deletions

View File

@ -193,11 +193,12 @@ TEST(VTimestampFunctionsTest, timediff_test) {
DataSet data_set = {
{{std::string("2019-07-18 12:00:00"), std::string("2019-07-18 12:00:00")}, 0.0},
{{std::string("2019-07-18 12:00:00"), std::string("2019-07-18 13:01:02")}, -3662.0},
{{std::string("2019-07-18 12:00:00"), std::string("2019-07-18 13:01:02")},
(double)-3662.0 * 1e6},
{{std::string("2019-00-18 12:00:00"), std::string("2019-07-18 13:01:02")}, Null()},
{{std::string("2019-07-18 12:00:00"), std::string("2019-07-00 13:01:02")}, Null()}};
check_function<DataTypeTime, true>(func_name, input_types, data_set);
check_function<DataTypeTimeV2, true>(func_name, input_types, data_set);
}
TEST(VTimestampFunctionsTest, date_format_test) {