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

Minor: Error rather than panic for unsupported for dictionary casting #6456

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

goldmedal
Copy link
Contributor

Which issue does this PR close?

no correlated issue.

Rationale for this change

While working on apache/datafusion#12621 (comment) , I got the panic from the arrow side. Instead of panicking, we can throw the ArrowError. It would be easier to trace the error for downstream projects (e.g. DataFusion).

What changes are included in this PR?

Remove unwrap() and return ArrowError instead.

Are there any user-facing changes?

no

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Looks like an improvement to me -- thank you @goldmedal

@alamb alamb changed the title Enhance the error handling for dictionary casting Error rather than panic for unsupported for dictionary casting Sep 25, 2024
@goldmedal
Copy link
Contributor Author

It seems that the CI failure isn't related to this PR 🤔 ( It also fails on the main branch and other PRs)

@alamb
Copy link
Contributor

alamb commented Sep 25, 2024

It seems that the CI failure isn't related to this PR 🤔 ( It also fails on the main branch and other PRs)

Agree -- I believe it is #6448

@alamb alamb changed the title Error rather than panic for unsupported for dictionary casting Minor: Error rather than panic for unsupported for dictionary casting Sep 25, 2024
@alamb alamb merged commit 43dd5e4 into apache:master Sep 25, 2024
26 of 27 checks passed
@goldmedal goldmedal deleted the chore/throw-error-utf8view branch September 25, 2024 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants