findepi commented on code in PR #13466: URL: https://github.com/apache/datafusion/pull/13466#discussion_r1846980887
########## datafusion/functions/src/datetime/date_part.rs: ########## @@ -223,6 +233,30 @@ impl ScalarUDFImpl for DatePartFunc { } } +fn is_integar_part(part: &str) -> bool { + let part = part_normalization(part); + matches!( + part.to_lowercase().as_str(), + "year" + | "month" + | "week" + | "day" + | "hour" + | "minute" + | "qtr" + | "quarter" + | "doy" + | "dow" Review Comment: i didn't know `extract(second ..` returns seconds with fraction. In PostgreSQL it does so, in e.g. Trino and Snowflake it does not ``` postgres=# select extract(second from now()); extract ----------- 29.009019 ``` ``` trino> select extract(second from now()); _col0 ------- 46 ``` so yes, keep seconds with float for now -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org