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: support is_indexed types in ak.fill_none #2111

Merged
merged 2 commits into from
Jan 12, 2023

Conversation

agoose77
Copy link
Collaborator

@agoose77 agoose77 commented Jan 12, 2023

Fixes #2107

@codecov
Copy link

codecov bot commented Jan 12, 2023

Codecov Report

Merging #2111 (ff67e0f) into main (6efa287) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files
Impacted Files Coverage Δ
src/awkward/operations/ak_fill_none.py 95.00% <100.00%> (ø)

@agoose77 agoose77 temporarily deployed to docs-preview January 12, 2023 17:29 — with GitHub Actions Inactive
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.

Old logic: "if union or record, continue recursing (by returning None); if option-type, do fill_none; otherwise, stop here (by returning layout)."

New logic: "if option-type, do fill_none; if union, record, or indexed (not IndexedOptionType because this is after the check for option-type), continue recursing; otherwise, stop here."

That makes sense. It could be an IndexedArray of RecordArray (as in your test). In fact, that's pretty common, since any carry of a RecordArray results in an IndexedArray of RecordArray.

@jpivarski jpivarski merged commit 54ab9f3 into main Jan 12, 2023
@jpivarski jpivarski deleted the agoose77/fix-fill-none-indexed branch January 12, 2023 19:46
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.

fill_none doesn't move through indexed types
2 participants