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: Return an error on type mismatch rather than panic (#4995) #5341

Merged
merged 3 commits into from
Jan 30, 2024

Conversation

carols10cents
Copy link
Contributor

Which issue does this PR close?

Closes #4995.

Rationale for this change

An error with a nice message is better for users than a panic in this case.

What changes are included in this PR?

I replaced an assertion with returning an error that includes the field name.

Are there any user-facing changes?

Previously, this code would panic if given unsupported inputs-- now it returns an error.

I added a bit of documentation on ArrowWrite::write that's where I would look for it, that explains what a user might do at that level that would return this error from the inner function.

@github-actions github-actions bot added the parquet Changes to the parquet crate label Jan 29, 2024
@tustvold tustvold merged commit 8e9d713 into apache:master Jan 30, 2024
16 checks passed
@tustvold
Copy link
Contributor

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parquet Changes to the parquet crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Return error instead of assert when meeting incompatitble type
2 participants