[feature-wip] Support all date functions for datev2/datetimev2 (#11265)
* [feature-wip] (datetimev2) support convert_tz function * [feature-wip] Support all date functions for datev2/datetimev2
This commit is contained in:
@ -539,7 +539,7 @@ TEST(VTimestampFunctionsTest, convert_tz_test) {
|
||||
{{DATETIME("2019-08-01 13:21:03"), STRING("+08:00"), STRING("America/Los_Angeles")},
|
||||
str_to_date_time("2019-07-31 22:21:03", true)}};
|
||||
|
||||
check_function<DataTypeDate, true>(func_name, input_types, data_set);
|
||||
check_function<DataTypeDateTime, true>(func_name, input_types, data_set);
|
||||
}
|
||||
|
||||
TEST(VTimestampFunctionsTest, weekday_test) {
|
||||
@ -1817,4 +1817,19 @@ TEST(VTimestampFunctionsTest, seconds_sub_v2_test) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(VTimestampFunctionsTest, convert_tz_v2_test) {
|
||||
std::string func_name = "convert_tz";
|
||||
|
||||
InputTypeSet input_types = {TypeIndex::DateTimeV2, TypeIndex::String, TypeIndex::String};
|
||||
|
||||
DataSet data_set = {
|
||||
{{DATETIME("2019-08-01 13:21:03"), STRING("Asia/Shanghai"),
|
||||
STRING("America/Los_Angeles")},
|
||||
str_to_datetime_v2("2019-07-31 22:21:03", "%Y-%m-%d %H:%i:%s.%f")},
|
||||
{{DATETIME("2019-08-01 13:21:03"), STRING("+08:00"), STRING("America/Los_Angeles")},
|
||||
str_to_datetime_v2("2019-07-31 22:21:03", "%Y-%m-%d %H:%i:%s.%f")}};
|
||||
|
||||
check_function<DataTypeDateTimeV2, true>(func_name, input_types, data_set);
|
||||
}
|
||||
|
||||
} // namespace doris::vectorized
|
||||
|
||||
Reference in New Issue
Block a user