-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Paniced at to_timestamp_micros function when the timestamp is too large. #3832
Comments
Hi. I think this problem is about chrono's timestamp_nano function because it uses i64. Datafusion convert microsecond to nanosecond and passed it to timestamp_nano function. It seems interesting case but I am not sure about the solution. Even if new version chrono is used, your input is too big to store in i64 so it will overflow eventually. You can also see an example in playground with newer version. |
https://github.com/chronotope/chrono/blob/main/src/naive/datetime/mod.rs#L117
|
i submitted a pr here apache/arrow-rs#2892 |
Hi. I am asking this because I want to understand the codebase better. I build datafusion-cli with debug, run
So arrow is using I think it is not releated to this issue but datafusion uses So we also need to fix it. If I am wrong, could you also suggest me tips about how to debug/analyze these bugs? |
@retikulum yes, i think we need to fix it as well. @alamb @avantgardnerio |
When chrono:0.4.23 is out we can kill all these:
|
Presently we can't remove them yet because there is no Timestamp + Months, only Date + months in 0.4.22. |
Yes, I do think eventually the date/time arithmetic should be moved into arrow-rs kernels |
Issue seems to be resolved now, doesn't panic but returns error: DataFusion CLI v15.0.0
❯ SELECT to_timestamp_micros(9065525203050843594);
+-----------------------------------------------+
| totimestampmicros(Int64(9065525203050843594)) |
+-----------------------------------------------+
| ERROR CONVERTING DATE |
+-----------------------------------------------+
1 row in set. Query took 0.002 seconds.
❯ |
Thank you for checking @Jefffrey |
Describe the bug
Paniced at to_timestamp_micros function.
To Reproduce
Additional context
DataFusion 13.0
The text was updated successfully, but these errors were encountered: