-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extract(second from dt)
should return seconds without fraction
#13482
Comments
Given there are other systems return integer too, I'm fine if we return int for second and mili/micro/nano second |
I found that nanosecond is neither supported in postgres and duckdb. If it is true, I prefer to remove it. |
I dont remember why we do support nanos although most of systems do not. |
If they really need nanosecond precision, they could customize the function for themselves |
In ANSI SQL, Trino, Snowflake, DuckDB, ...
extract(second from a_date_time_value)
returns just seconds (integer number 0-59 inclusive), which is consistent with other extraction of other fields like minute (meaning minute-of-hour), hour (meaning hour-of-day), etc. especially when sub-second fields are also supported.in DataFusion
extract(second from dt)
returns second with fraction (as in PostgreSQL).We should probably change it to return just second without fraction, especially given that the fraction part can be extracted with e.g.
extract(millisecond ..)
fieldcc @jayzhan211 @comphead
The text was updated successfully, but these errors were encountered: