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 572f0fc7cbae6e..ec8db8c24a0325 100644 --- a/be/src/vec/functions/function_date_or_datetime_computation.h +++ b/be/src/vec/functions/function_date_or_datetime_computation.h @@ -88,43 +88,43 @@ ReturnNativeType date_time_add(const InputNativeType& t, Int32 delta, bool& is_n } } -#define ADD_TIME_FUNCTION_IMPL(CLASS, NAME, UNIT) \ - template \ - struct CLASS { \ - /*for V2 type, if unit <= hour, increase to DatetimeV2, for V1 same as V2 version*/ \ - using ReturnType = std::conditional_t< \ - date_cast::IsV1(), \ - std::conditional_t< \ - std::is_same_v, \ - std::conditional_t, \ - DataTypeDateTime>, \ - std::conditional_t< \ - std::is_same_v, \ - std::conditional_t, \ - DataTypeDateTimeV2>>; \ - static bool has_return_type_in_signature() { \ - return true; \ - } \ - using ReturnNativeType = ReturnType::FieldType; \ - using InputNativeType = ArgType::FieldType; \ - static constexpr auto name = #NAME; \ - static constexpr auto is_nullable = true; \ - static inline ReturnNativeType execute(const InputNativeType& t, Int32 delta, \ - bool& is_null) { \ - return date_time_add(t, delta, is_null); \ - } \ - \ - static DataTypes get_variadic_argument_types() { \ - return {std::make_shared(), std::make_shared()}; \ - } \ +#define ADD_TIME_FUNCTION_IMPL(CLASS, NAME, UNIT) \ + template \ + struct CLASS { \ + /*for V2 type, if unit <= hour, increase to DatetimeV2, for V1 same as V2 version*/ \ + using ReturnType = std::conditional_t< \ + date_cast::IsV1(), \ + std::conditional_t< \ + std::is_same_v, \ + std::conditional_t, \ + DataTypeDateTime>, \ + std::conditional_t< \ + std::is_same_v, \ + std::conditional_t, \ + DataTypeDateTimeV2>>; \ + static bool has_return_type_in_signature() { \ + return true; \ + } \ + using ReturnNativeType = ReturnType::FieldType; \ + using InputNativeType = ArgType::FieldType; \ + static constexpr auto name = #NAME; \ + static constexpr auto is_nullable = true; \ + static inline ReturnNativeType execute(const InputNativeType& t, Int32 delta, \ + bool& is_null) { \ + return date_time_add(t, delta, is_null); \ + } \ + \ + static DataTypes get_variadic_argument_types() { \ + return {std::make_shared(), std::make_shared()}; \ + } \ } ADD_TIME_FUNCTION_IMPL(AddMicrosecondsImpl, microseconds_add, MICROSECOND);