forked from prestodb/presto
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix precision loss in from_unixtime(double) function
from_unixtime(1.7041507095805E9) used to return 1704150709 seconds and 581 milliseconds. It should return 580 milliseconds. Before this change, the function used Math.round(unixTime * 1000), which loses precision in some cases. In the above case, it pushes the resulting number to 1704150709580.500000000, which after rounding becomes 1704150709581, e.g. 581 milliseconds.
- Loading branch information
Showing
2 changed files
with
13 additions
and
1 deletion.
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