Skip to content

Commit

Permalink
Don't do partitioned if key is given as series
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Jan 10, 2025
1 parent 99b0b04 commit c0dc063
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/polars-mem-engine/src/planner/lp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ fn partitionable_gb(
// complex expressions in the group_by itself are also not partitionable
// in this case anything more than col("foo")
for key in keys {
if (expr_arena).iter(key.node()).count() > 1 {
if (expr_arena).iter(key.node()).count() > 1
|| has_aexpr(key.node(), expr_arena, |ae| {
matches!(ae, AExpr::Literal(LiteralValue::Series(_)))
})
{
return false;
}
}
Expand Down

0 comments on commit c0dc063

Please sign in to comment.