-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Some panic!s could more semantically be unimplemented! #8933
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
base: main
Are you sure you want to change the base?
Conversation
friendlymatthew
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thank you @abacef
arrow-array/src/array/mod.rs
Outdated
| dt => unimplemented!("{dt}"), | ||
| }, | ||
| DataType::RunEndEncoded(run_ends_type, _) => match run_ends_type.data_type() { | ||
| DataType::Int16 => Arc::new(RunArray::<Int16Type>::from(data)) as ArrayRef, | ||
| DataType::Int32 => Arc::new(RunArray::<Int32Type>::from(data)) as ArrayRef, | ||
| DataType::Int64 => Arc::new(RunArray::<Int64Type>::from(data)) as ArrayRef, | ||
| dt => panic!("Unexpected data type for run_ends array {dt}"), | ||
| dt => unimplemented!("{dt}"), | ||
| }, | ||
| DataType::Null => Arc::new(NullArray::from(data)) as ArrayRef, | ||
| DataType::Decimal32(_, _) => Arc::new(Decimal32Array::from(data)) as ArrayRef, | ||
| DataType::Decimal64(_, _) => Arc::new(Decimal64Array::from(data)) as ArrayRef, | ||
| DataType::Decimal128(_, _) => Arc::new(Decimal128Array::from(data)) as ArrayRef, | ||
| DataType::Decimal256(_, _) => Arc::new(Decimal256Array::from(data)) as ArrayRef, | ||
| dt => panic!("Unexpected data type {dt}"), | ||
| dt => unimplemented!("{dt}"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi hi! Would it be possible to add a message that not only explains which data type is unimplemented, but also for which specific use case?
For example: unimplemented!("unexpected dictionary key type {dt}")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oof not sure why this comment is on line 840. I was talking about lines 827 and 833
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
Which issue does this PR close?
We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax.
Rationale for this change
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
Some
panic!conversionsThere is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
Are these changes tested?
We typically require tests for all PRs in order to:
Not sure these panic test cases are covered
Are there any user-facing changes?
N/A