nrc commented on PR #11501:
URL: https://github.com/apache/datafusion/pull/11501#issuecomment-2306105468

   After some testing, I found a couple of bugs due to the `seconds` function 
making assumptions about `date_part` which don't hold for 
`Interval`/`Duration`. Calling `date_part` to get the nanos from an Interval or 
Duration will often return `Null` due to overflow, which will cause 
date_part/extract to return null, even if we should have ignored the nanos and 
just used the whole seconds (e.g, extracting seconds from a 1000000 second 
duration should return 1000000, not null). Furthermore, `extract(second from 
interval '1 second')` would return `2` because the one second was queried as 
seconds and nanoseconds.
   
   Both those bugs are fixed, but because the formatting of Intervals has 
changed with the Arrow update, it is difficult to write tests, so those will 
come after the proper Arrow update.


-- 
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

Reply via email to