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
The fastest way to get most functions to work with date nanos at all will be to cast them to a type we already support well. We'll also need a way to cast back to date nanos. There are three functions wrapped up into this ticket, because I think we'll need all three at once to sensibly test any of them. I might be wrong about that though, in which case we could break this down further.
TO_DATETIME should accept a date nanos and return a millisecond resolution time (NOTE: We need to have a rounding convention here)
TO_LONG should accept a date nanos and return the same value as a long
Add a new function TO_DATE_NANOS
Support long -> date nanos via direct conversion (i.e. value stays the same, type changes)
Support datetime -> date nanos via scaling (i.e. multiply by 1,000,000). Overflow will return null and generate a warning
Support string -> date nanos via parsing
The text was updated successfully, but these errors were encountered:
Description
The fastest way to get most functions to work with date nanos at all will be to cast them to a type we already support well. We'll also need a way to cast back to date nanos. There are three functions wrapped up into this ticket, because I think we'll need all three at once to sensibly test any of them. I might be wrong about that though, in which case we could break this down further.
TO_DATETIME
should accept a date nanos and return a millisecond resolution time (NOTE: We need to have a rounding convention here)TO_LONG
should accept a date nanos and return the same value as a longTO_DATE_NANOS
The text was updated successfully, but these errors were encountered: