diff --git a/velox/functions/sparksql/DateTimeFunctions.h b/velox/functions/sparksql/DateTimeFunctions.h index 9c6426b3136a..94a7f21317e5 100644 --- a/velox/functions/sparksql/DateTimeFunctions.h +++ b/velox/functions/sparksql/DateTimeFunctions.h @@ -365,10 +365,7 @@ struct DateFromUnixDateFunction { VELOX_DEFINE_FUNCTION_TYPES(T); FOLLY_ALWAYS_INLINE void call(out_type& result, const int32_t& value) { - // If addititon does not overflow the result is valid. - // Max and min value of result here is numeric_limits::max() and - // numeric_limits::min(). - __builtin_add_overflow(0, value, &result); + result = value; } };