-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix from_unixtime for NaN input (#2936)
Summary: from_unixtime(NaN, '<timezone>') should return zero. Before the fix it was crashing under UBSAN: ``` velox/functions/prestosql/FromUnixTime.cpp:24:10: runtime error: nan is outside the range of representable values of type 'long' UndefinedBehaviorSanitizer: float-cast-overflow velox/functions/prestosql/FromUnixTime.cpp:24:10 in ``` Fixes #2791 Pull Request resolved: #2936 Reviewed By: xiaoxmeng Differential Revision: D40648988 Pulled By: mbasmanova fbshipit-source-id: 752068a1e17da540f031c98367bd9a4baaa6a604
- Loading branch information
1 parent
fdd27d9
commit 1ae9dc0
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters