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

feat!: canonicalise union of indexed #2527

Merged
merged 8 commits into from
Jun 18, 2023

Conversation

agoose77
Copy link
Collaborator

@agoose77 agoose77 commented Jun 16, 2023

This PR:

  • Deprecates the merge argument to UnionArray.simplified — since the previous introduction of canonicalisation checks, this argument can no longer be meaningfully False in contexts where layouts are mergeable.
  • Add a new rule for the simplification of IndexedArrays inside unions.

Closes #2192

@agoose77 agoose77 changed the title feat!: deprecate UnionArray.simplified's merge argument feat!: canonicalise union of indexed Jun 16, 2023
@codecov
Copy link

codecov bot commented Jun 16, 2023

Codecov Report

Merging #2527 (85a1fb0) into main (f928ba2) will decrease coverage by 0.04%.
The diff coverage is 90.90%.

❗ Current head 85a1fb0 differs from pull request most recent head 92e1e36. Consider uploading reports for the commit 92e1e36 to get more accurate results

Additional details and impacted files
Impacted Files Coverage Δ
src/awkward/contents/content.py 76.03% <ø> (ø)
src/awkward/contents/indexedoptionarray.py 88.59% <ø> (ø)
src/awkward/contents/unionarray.py 84.76% <90.90%> (+0.09%) ⬆️

... and 3 files with indirect coverage changes

@agoose77 agoose77 requested a review from jpivarski June 16, 2023 11:09
@agoose77 agoose77 temporarily deployed to docs-preview June 16, 2023 11:16 — 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.

I know we had this conversation, but I'll reiterate that I agree that IndexedArray inside a UnionArray can get absorbed into the UnionArray's index, and therefore should be. Unless it's categorical, which is a user-visible type.

I added the UnionArray.simplified merge-argument deprecation to the wiki. (And maybe was too vocal about it being more like a bug-fix than a deprecation, but I don't think it matters what we call it.)

You can merge when ready!

@agoose77 agoose77 merged commit f818083 into main Jun 18, 2023
34 of 35 checks passed
@agoose77 agoose77 deleted the agoose77/feat-union-array-indexed-simplification branch June 18, 2023 17:34
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.

IndexedArrays can be absorbed into a UnionArray's index (unless categorical)
2 participants