Repository navigation
Review use of panic in datafusion-proto crate - #3365
Conversation
# Conflicts: # datafusion/proto/build.rs
Codecov Report
@@ Coverage Diff @@
## master #3365 +/- ##
========================================
Coverage 85.51% 85.51%
========================================
Files 294 296 +2
Lines 54120 54300 +180
========================================
+ Hits 46279 46433 +154
- Misses 7841 7867 +26
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
Looks like there is a CI error on this PR. |
| }), | ||
| DataType::Decimal256(_, _) => { | ||
| unimplemented!("The Decimal256 data type is not yet supported") | ||
| unimplemented!("Proto serialization error: The Decimal256 data type is not yet supported") |
There was a problem hiding this comment.
If we used impl TryFrom instead of impl From, we could return errors here. This could be done as a separate Pr.
|
Thanks @comphead. This is looking good. I left some comments. |
|
@andygrove @alamb I dont get why |
I think the reason that https://github.com/apache/arrow-datafusion/runs/8218776681?check_suite_focus=true is failing is that there is some issue in code that is not normally run via In this case, the command that is failing is: cargo check --workspace --benches --features avro,jit,scheduler,jsonDoes that fail locally for you? |
|
Thanks @alamb |
|
Sorry guys, I probably generated more commits than expected, the reason being is cargo check gives me not the same results as CI, even after cleaning the cache |
|
@avantgardnerio I know you fixed a json proto build issue recently. Could you take a look at this PR to make sure you are happy with it? |
avantgardnerio
left a comment
There was a problem hiding this comment.
I added a few minor nits, but overall I think this is a definite improvement - thank you for putting in this work!
|
|
||
| let out = std::path::PathBuf::from(std::env::var("OUT_DIR").unwrap()); | ||
| let out = std::path::PathBuf::from( | ||
| std::env::var("OUT_DIR").expect("Cannot find OUT_DIR environment vairable"), |
There was a problem hiding this comment.
expect seems semi-reasonable in tests or build.rs
There was a problem hiding this comment.
Imho expect here gives more user friendly message than .unwrap with very generic text
There was a problem hiding this comment.
expect is a definite improvement to unwrap in my opinion too
|
Thanks @avantgardnerio for the review, please find the fixed PR |
alamb
left a comment
There was a problem hiding this comment.
LGTM -- thanks @avantgardnerio and @comphead !
|
Benchmark runs are scheduled for baseline = 4258751 and contender = 1b40ffa. 1b40ffa is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Which issue does this PR close?
Closes #3318.
Rationale for this change
Refactor to get rid of explicit panics
What changes are included in this PR?
Are there any user-facing changes?