retikulum commented on issue #3832:
URL: 
https://github.com/apache/arrow-datafusion/issues/3832#issuecomment-1279461383

   Hi. I think this problem is about [chronos timestamp_nano 
function](https://github.com/chronotope/chrono/blob/a62da032f94b8553d8860d777ed0166b5f8396af/src/offset/mod.rs#L397)
 because it uses i64. Datafusion convert microsecond to nanosecond and passed 
it to timestamp_nano function. `9065525203050843594` microsecond is 
`9065525203050843594000` and it doesn't fit into i64 and overflowed. You can 
also see an example in 
[playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=6156756059d862af06621e9cf6478bbd).
 I guess the function call stack is followed:
   
   - 
[to_timestamp_micros](https://github.com/apache/arrow-datafusion/blob/c59a76754e7e45063cb51c273f2a53aa325676a4/datafusion/physical-expr/src/datetime_expressions.rs#L152)
   - 
[string_to_timestamp_nanos_shim](https://github.com/apache/arrow-datafusion/blob/c59a76754e7e45063cb51c273f2a53aa325676a4/datafusion/physical-expr/src/datetime_expressions.rs#L129)
   - [arrow's 
string_to_timestamp_nanos](https://github.com/apache/arrow-rs/blob/master/arrow/src/compute/kernels/cast_utils.rs#L69)
   - [chrono's 
timestamp_nanos](https://github.com/chronotope/chrono/blob/a62da032f94b8553d8860d777ed0166b5f8396af/src/offset/mod.rs#L397)
   
   It seems interesting case but I am not sure about the solution.
   


-- 
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...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to