-
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
When the to_timestamp_millis
function is used and the output format is csv, it will panic
#4947
Comments
@ZuoTiJia
|
Mixing correct and incorrect results is not good, it would be nice to be able to throw an error.
|
Agree, in old spark versions, if timestamp cast cannot be done then null returned that was really confusing, we should consider a runtime error if such invalid cast happened. I'll fix it in apache/arrow-rs#3547 soon |
Waiting apache/arrow-rs#3584 and apache/arrow-rs#3514 |
@ZuoTiJia The initial problem is solved.
Another problem still in place is to remove mixed values, lets do that in separate issue if needed |
(venv-310) andrewlamb@Andrews-MacBook-Pro-2:~/Software/arrow-rs$ datafusion-cli --format csv
DataFusion CLI v42.1.0
> SELECT to_timestamp_millis(1926632005177685347);
to_timestamp_millis(Int64(1926632005177685347))
Arrow error: Csv error: Error processing row 1, col 1: Cast error: Failed to convert 1926632005177685347 to datetime for Timestamp(Millisecond, None)
> Seems like the panic is fixed and the code is working as expected |
Thanks (again) to @drauschenbach for pointing this out |
To Reproduce
The bug of csv writer occurs when unwrap() is called during conversion, which seems to be a bug of
arrow-csv
.Expected behavior
Throw an error, no panic
The text was updated successfully, but these errors were encountered: