Skip to content

Commit

Permalink
c
Browse files Browse the repository at this point in the history
  • Loading branch information
nameexhaustion committed Nov 5, 2024
1 parent ae513be commit 6c883d0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/polars-expr/src/expressions/apply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ impl ApplyExpr {
// })?
let out: ListChunked = POOL.install(|| iter.collect::<PolarsResult<_>>())?;

debug_assert_eq!(out.dtype(), &dtype);
debug_assert_eq!(&dtype, out.dtype());

out
} else {
Expand Down
12 changes: 9 additions & 3 deletions crates/polars-expr/src/planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -571,9 +571,15 @@ fn create_physical_expr_inner(
move |c: &mut [polars_core::frame::column::Column]| c[0].explode().map(Some),
) as Arc<dyn ColumnsUdf>);

let field = expr_arena
.get(expression)
.to_field(schema, ctxt, expr_arena)?;
let mut field =
expr_arena
.get(expression)
.to_field(schema, Context::Default, expr_arena)?;

if let Context::Aggregation = ctxt {
field.dtype = DataType::List(Box::new(field.dtype));
}

Ok(Arc::new(ApplyExpr::new(
vec![input],
function,
Expand Down

0 comments on commit 6c883d0

Please sign in to comment.