Skip to content

Commit

Permalink
fix: Error on invalid query (#19303)
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 authored Oct 18, 2024
1 parent 3dc421a commit 00650b9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/polars-lazy/src/physical_plan/exotic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ pub(crate) fn prepare_expression_for_context(
let schema = lf.collect_schema()?;
let optimized = lf.optimize(&mut lp_arena, &mut expr_arena)?;
let lp = lp_arena.get(optimized);
let aexpr = lp.get_exprs().pop().unwrap();
let aexpr = lp
.get_exprs()
.pop()
.ok_or_else(|| polars_err!(ComputeError: "expected expressions in the context"))?;

create_physical_expr(
&aexpr,
Expand Down

0 comments on commit 00650b9

Please sign in to comment.