You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
From my testing, it appears that functions in temporal_conversions do not handle negative integers correctly. The cast of a negative number to a u32 results in a junk value that causes chrono to panic.
Expected behavior
The conversion functions should handle timestamps before the epoch correctly.
Additional context
I discovered this via the Debug impl for a Timestamp column type. Other basic operations on the column w/ negative timestamps seem to work without a problem, but I haven't tested thoroughly.
The text was updated successfully, but these errors were encountered:
Describe the bug
From my testing, it appears that functions in
temporal_conversions
do not handle negative integers correctly. The cast of a negative number to au32
results in a junk value that causeschrono
to panic.To Reproduce
The following playground snippet reproduces the issue, using the code in
5.0.0
. https://docs.rs/arrow/5.0.0/src/arrow/temporal_conversions.rs.html#98-105https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=d0a2b89c4fdb666b55627d4a371f8ec8
Expected behavior
The conversion functions should handle timestamps before the epoch correctly.
Additional context
I discovered this via the
Debug
impl for a Timestamp column type. Other basic operations on the column w/ negative timestamps seem to work without a problem, but I haven't tested thoroughly.The text was updated successfully, but these errors were encountered: