[Improvement](datev2) fix some compatible problems for datev2 (#13079)
This commit is contained in:
@ -174,6 +174,8 @@ struct ConvertImpl {
|
||||
} else if constexpr (IsDateTimeV2Type<ToDataType> &&
|
||||
IsDateTimeV2Type<FromDataType>) {
|
||||
DataTypeDateTimeV2::cast_to_date(vec_from[i], vec_to[i]);
|
||||
} else if constexpr (IsDateType<ToDataType> && IsDateV2Type<FromDataType>) {
|
||||
DataTypeDateV2::cast_to_date(vec_from[i], vec_to[i]);
|
||||
}
|
||||
} else {
|
||||
if constexpr (IsDateTimeV2Type<FromDataType>) {
|
||||
|
||||
@ -149,6 +149,8 @@ void register_function_to_time_function(SimpleFunctionFactory& factory) {
|
||||
factory.register_function<FunctionDateTimeV2ToDays>();
|
||||
factory.register_function<FunctionDateTimeV2ToDate>();
|
||||
factory.register_function<FunctionDateTimeV2Date>();
|
||||
factory.register_alias("date", "datev2");
|
||||
factory.register_alias("to_date", "to_datev2");
|
||||
}
|
||||
|
||||
} // namespace doris::vectorized
|
||||
|
||||
@ -1101,7 +1101,7 @@ visible_functions = [
|
||||
'15FunctionContextENS2_18FunctionStateScopeE',
|
||||
'_ZN5doris18TimestampFunctions12format_closeEPN9doris_udf'
|
||||
'15FunctionContextENS2_18FunctionStateScopeE', 'vec', 'ALWAYS_NULLABLE'],
|
||||
[['date', 'to_date'], 'DATEV2', ['DATETIMEV2'],
|
||||
[['date', 'to_date', 'datev2', 'to_datev2'], 'DATEV2', ['DATETIMEV2'],
|
||||
'_ZN5doris18TimestampFunctions7to_dateEPN9doris_udf15FunctionContextERKNS1_11DateTimeV2ValE',
|
||||
'', '', 'vec', 'ALWAYS_NULLABLE'],
|
||||
|
||||
|
||||
Reference in New Issue
Block a user