diff --git a/be/src/vec/functions/function_date_or_datetime_computation.h b/be/src/vec/functions/function_date_or_datetime_computation.h index ec8db8c24a0325..3ee57f5ac48def 100644 --- a/be/src/vec/functions/function_date_or_datetime_computation.h +++ b/be/src/vec/functions/function_date_or_datetime_computation.h @@ -75,7 +75,8 @@ ReturnNativeType date_time_add(const InputNativeType& t, Int32 delta, bool& is_n // e.g.: for DatatypeDatetimeV2, cast from u64 to DateV2Value auto ts_value = binary_cast(t); TimeInterval interval(unit, delta, false); - if constexpr (std::is_same_v) { + if constexpr (std::is_same_v || + std::is_same_v) { is_null = !(ts_value.template date_add_interval(interval)); // here DateValueType = ResultDateValueType return binary_cast(ts_value);