Skip to content
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

Merged
merged 4 commits into from
Sep 2, 2022

Conversation

kkothari2001
Copy link
Collaborator

@kkothari2001 kkothari2001 commented Sep 2, 2022

Fixes #697

@kkothari2001 kkothari2001 marked this pull request as ready for review September 2, 2022 04:24
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)
Copy link
Collaborator Author

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.

Copy link
Member

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.

Copy link
Member

@jpivarski jpivarski left a 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)
Copy link
Member

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.

@kkothari2001
Copy link
Collaborator Author

Yes, I'm done with the PR and was waiting for your review. Thanks for the review!

@kkothari2001 kkothari2001 merged commit 293e931 into main Sep 2, 2022
@kkothari2001 kkothari2001 deleted the uproot-dask-empty-branches branch September 2, 2022 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

uproot.dask raises error on empty branches
2 participants