-
Notifications
You must be signed in to change notification settings - Fork 76
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
fix: Fixes uproot.dask bug with empty branches #700
Conversation
for more information, see https://pre-commit.ci
common_keys, entry_start=first_basket_start, entry_stop=first_basket_stop | ||
) | ||
meta = dask_awkward.core.typetracer_array(first_basket) | ||
empty_arr = hasbranches[0].arrays(common_keys, entry_start=0, entry_stop=0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change had to be made so we support empty branches. Earlier we were checking the entry_stop for the first basket.
I wrongly assumed that in empty branches the first TBasket would still be present albeit empty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that makes sense: it could have been implemented that way, but it wasn't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks to me like this solves the issue! The test exactly reproduces @masonproffitt's reproducer, and furthermore you verify that the Dask-computed output has the same form as eager reading. The code update appears to be fairly minimal, too.
You didn't explicitly request a review. Are you done with the PR? If so, you can squash-and-merge it yourself.
common_keys, entry_start=first_basket_start, entry_stop=first_basket_stop | ||
) | ||
meta = dask_awkward.core.typetracer_array(first_basket) | ||
empty_arr = hasbranches[0].arrays(common_keys, entry_start=0, entry_stop=0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that makes sense: it could have been implemented that way, but it wasn't.
Yes, I'm done with the PR and was waiting for your review. Thanks for the review! |
Fixes #697