-
Notifications
You must be signed in to change notification settings - Fork 78
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
Can't convert date_bin aggregated with count(*) to arrow if some windows contain null data #862
Comments
When looking at the dataframe under the debugger, it looks like it skipped the null values ok:
So I am pretty confused about the error message.
|
Another minimal example
It looks like it's something to do with a mix of nullable and non-nullable fields passing when converting to pyarrow. I'll try to investigate what's happening. Interestingly, on the latest
Works just fine. So I'm guessing there's something happening in |
Also, when I coerced the |
Thank you for considering my issue. I tried various ways of coercing the field to nullable, but I couldn't figure anything out from the documentation. @timsaucer If you could get a moment, could I ask you to please drop the code here that you used so I can put into place a work around for the time being? |
It's super hacky:
|
Oh, I just realized that might not work since |
Thank you so much for the help. Much appreciated. Please let me know if there is anything that I can do to help. It sounds like, if all else fails, there is a workaround coming with |
I think that the issue #534 may be related to this one, which seems to be caused by a problem upstream (see datafusion#12307) |
Describe the bug
When using count(*) to aggregate data with date_bin where some of the windows have no data, the datafusion.dataframe object is created fine, but to_arrow_table() raises the below exception.
To Reproduce
The following code reproduces the error, as I see it.
This results in:
Expected behavior
I would expect there to be 3 rows of data, with the count column being [2,0,2]
The text was updated successfully, but these errors were encountered: