EaswarKilari commented on PR #60212:
URL: https://github.com/apache/spark/pull/60212#issuecomment-6719920493

   @Raviston6296 thank you very much for the review. I fixed the DOUBLE issue 
in the latest commit. The DOUBLE overload now converts the value through its 
shortest decimal form, as CAST(double AS DECIMAL) does, and then floors to 
microseconds. So 8.2, 1.000001 and 3.0E-6 keep their microsecond, and 
-0.0000001 is still rejected.
   
   I used this instead of rounding to the nearest nanosecond because rounding 
would make values just below 86400, like 86399.99999999999, fail the range 
check. It also keeps truncation consistent with CAST. I added tests for these 
cases, including 8.2.
   
   I left timestamp_seconds unchanged here since it's changes released 
behavior; it could be a separate ticket.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to