Skip to content

Commit

Permalink
fix: Don't unwrap() expansion (#19196)
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 authored Oct 11, 2024
1 parent 44439d9 commit 6ed1730
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/polars-plan/src/plans/conversion/expr_expansion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fn rewrite_special_aliases(expr: Expr) -> PolarsResult<Expr> {
Ok(Expr::Alias(expr, name.clone()))
},
Expr::RenameAlias { expr, function } => {
let name = get_single_leaf(&expr).unwrap();
let name = get_single_leaf(&expr)?;
let name = function.call(&name)?;
Ok(Expr::Alias(expr, name))
},
Expand Down Expand Up @@ -550,7 +550,7 @@ fn expand_function_inputs(
.flags
.contains(FunctionFlags::INPUT_WILDCARD_EXPANSION) =>
{
*input = rewrite_projections(core::mem::take(input), schema, &[], opt_flags).unwrap();
*input = rewrite_projections(core::mem::take(input), schema, &[], opt_flags)?;
if input.is_empty() && !options.flags.contains(FunctionFlags::ALLOW_EMPTY_INPUTS) {
// Needed to visualize the error
*input = vec![Expr::Literal(LiteralValue::Null)];
Expand Down

0 comments on commit 6ed1730

Please sign in to comment.