You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
presto> select from_unixtime(nan(), '+04:00');
_col0
--------------------------------
1970-01-01 04:00:00.000 +04:00
(1 row)
@ScalarFunction("from_unixtime")
@SqlType(StandardTypes.TIMESTAMP)
public static long fromUnixTime(@SqlType(StandardTypes.DOUBLE) double unixTime)
{
return Math.round(unixTime * 1000);
}
/**
* Returns the closest {@code long} to the argument, with ties
* rounding to positive infinity.
*
* <p>Special cases:
* <ul><li>If the argument is NaN, the result is 0.
* ...
*/
public static long round(double a) {
This should be easy to reproduce by sending a input vector that contains
nan
to from_unitxtime as the first argument.The text was updated successfully, but these errors were encountered: