You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
"/home/andy/git/apache/arrow-datafusion/datafusion/optimizer/src/common_subexpr_eliminate.rs":111 new_expr.pop().unwrap(),
"/home/andy/git/apache/arrow-datafusion/datafusion/optimizer/src/common_subexpr_eliminate.rs":145 predicate: new_expr.pop().unwrap().pop().unwrap(),
"/home/andy/git/apache/arrow-datafusion/datafusion/optimizer/src/common_subexpr_eliminate.rs":167 window_expr: new_expr.pop().unwrap(),
"/home/andy/git/apache/arrow-datafusion/datafusion/optimizer/src/common_subexpr_eliminate.rs":189 let new_aggr_expr = new_expr.pop().unwrap();
"/home/andy/git/apache/arrow-datafusion/datafusion/optimizer/src/common_subexpr_eliminate.rs":190 let new_group_expr = new_expr.pop().unwrap();
"/home/andy/git/apache/arrow-datafusion/datafusion/optimizer/src/common_subexpr_eliminate.rs":212 expr: new_expr.pop().unwrap(),
"/home/andy/git/apache/arrow-datafusion/datafusion/optimizer/src/common_subexpr_eliminate.rs":276 let (expr, _, data_type) = expr_set.get(&id).unwrap();
"/home/andy/git/apache/arrow-datafusion/datafusion/optimizer/src/common_subexpr_eliminate.rs":557 unreachable!("Enter mark should paired with node number");
"/home/andy/git/apache/arrow-datafusion/datafusion/optimizer/src/common_subexpr_eliminate.rs":655 let (_, counter, _) = self.expr_set.get(curr_id).unwrap();
"/home/andy/git/apache/arrow-datafusion/datafusion/optimizer/src/common_subexpr_eliminate.rs":676 || self.expr_set.get(id).unwrap().1 <= 1
"/home/andy/git/apache/arrow-datafusion/datafusion/optimizer/src/filter_push_down.rs":180 _ => unreachable!("lr_is_preserved only valid for JOIN nodes"),
"/home/andy/git/apache/arrow-datafusion/datafusion/optimizer/src/filter_push_down.rs":195 JoinType::Semi | JoinType::Anti => unreachable!(
"/home/andy/git/apache/arrow-datafusion/datafusion/optimizer/src/filter_push_down.rs":200 unreachable!("on_lr_is_preserved cannot be applied to CROSSJOIN nodes")
"/home/andy/git/apache/arrow-datafusion/datafusion/optimizer/src/filter_push_down.rs":202 _ => unreachable!("on_lr_is_preserved only valid for JOIN nodes"),
"/home/andy/git/apache/arrow-datafusion/datafusion/optimizer/src/filter_push_down.rs":314 .chain(once(on_to_keep.into_iter().reduce(Expr::and).unwrap()))
"/home/andy/git/apache/arrow-datafusion/datafusion/optimizer/src/simplify_expressions.rs":172 _ => panic!("Expected boolean literal, got {:?}", expr),
"/home/andy/git/apache/arrow-datafusion/datafusion/optimizer/src/simplify_expressions.rs":393 if self.can_evaluate.pop().unwrap() {
"/home/andy/git/apache/arrow-datafusion/datafusion/optimizer/src/single_distinct_to_groupby.rs":176 fields_set.insert(expr.name(input.schema()).unwrap());
Describe the solution you'd like
Review code that can panic and see where it makes sense to return a Result instead. For example, It is generally better to use ? than unwrapon results.
The goal is not to remove all panics but review and make sure we are using them appropriately. Bonus points for adding documentation for invariants.
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Describe the solution you'd like
Review code that can panic and see where it makes sense to return a
Result
instead. For example, It is generally better to use?
thanunwrap
on results.The goal is not to remove all panics but review and make sure we are using them appropriately. Bonus points for adding documentation for invariants.
Describe alternatives you've considered
None
Additional context
Generated by https://github.com/andygrove/no-need-to-panic
The text was updated successfully, but these errors were encountered: