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: proper typetracer array slicing in BitMaskedArray #3028

Merged
merged 2 commits into from
Feb 20, 2024

Conversation

agoose77
Copy link
Collaborator

@agoose77 agoose77 commented Feb 19, 2024

A long-running design choice was to avoid handling unknown-lengths as indices in TypeTracerArray; the caller (usually Content methods) would normalise to unknown-scalars (0D arrays).

This PR fixes a place where this assumption is not properly ensured, which was surfaced during testing of dask-awkward.

In the long run, I'd be in favour of relaxing this assumption and requiring that TypeTracerArray properly normalise unknown lengths to unknown scalars, but that's out of scope for this fix.

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.

Got it—that makes sense! I followed this through to its definition; the wrapper function is ensuring that the unknown_length singleton becomes a TypeTracerArray scalar, so that it can be used as a slice endpoint.

This is good to merge, and it looks done, so I'll merge it myself.

@jpivarski jpivarski merged commit 8b8bc73 into main Feb 20, 2024
38 of 39 checks passed
@jpivarski jpivarski deleted the agoose77/fix-slice-bitmaskedarray branch February 20, 2024 23:02
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.

None yet

2 participants