diff --git a/velox/type/Timestamp.h b/velox/type/Timestamp.h index b0901ba0b6f7d..b676ad40f9617 100644 --- a/velox/type/Timestamp.h +++ b/velox/type/Timestamp.h @@ -188,8 +188,8 @@ struct Timestamp { // Timestamp(-9223372036855, 224'192'000). // If the final result does not fit in int64_t we throw. - __int128_t result = - (__int128_t)seconds_ * 1'000'000 + (int64_t)(nanos_ / 1'000); + __int128_t result = static_cast<__int128_t>(seconds_) * 1'000'000 + + static_cast(nanos_ / 1'000); if (result < INT64_MIN || result > INT64_MAX) { VELOX_USER_FAIL( "Could not convert Timestamp({}, {}) to microseconds",