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

Don't panic when indexing into a batch which doesn't have that index #272

Merged
merged 1 commit into from
Nov 8, 2022

Conversation

emilk
Copy link
Member

@emilk emilk commented Nov 7, 2022

Stupid bug, I don't know what I was thinking. Indexing into a batch should never panic, and it's fine to have multiple fields with different indices in them.

Bug reported by @nikolausWest on Slack

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I've added a line to CHANGELOG.md (if this is a big enough change to warrant it)

Copy link
Member

@jleibs jleibs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was debating whether we wanted to try surfacing this case as a user-visible error but I believe this is correct without it. That said it raised an interesting question of if/how users should be able to assert that they expect their batches to be dense and consistent.

@emilk emilk merged commit c04d80d into main Nov 8, 2022
@emilk emilk deleted the emilk/fix-batch-index-panic branch November 8, 2022 12: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.

2 participants