[fix](datetime) Added datetime compatibility logic (#25791)

This commit is contained in:
zclllyybb
2023-10-24 10:37:57 +08:00
committed by GitHub
parent f23fdcbbef
commit f9f539221f
2 changed files with 17 additions and 6 deletions

View File

@ -353,6 +353,13 @@ bool FunctionBuilderImpl::is_date_or_datetime_or_decimal(
func_return_type->is_nullable()
? ((DataTypeNullable*)func_return_type.get())->get_nested_type()
: func_return_type)) ||
(is_date_or_datetime(return_type->is_nullable()
? ((DataTypeNullable*)return_type.get())->get_nested_type()
: return_type) &&
is_date_v2_or_datetime_v2(
func_return_type->is_nullable()
? ((DataTypeNullable*)func_return_type.get())->get_nested_type()
: func_return_type)) ||
(is_decimal(return_type->is_nullable()
? ((DataTypeNullable*)return_type.get())->get_nested_type()
: return_type) &&