Skip to content

Commit

Permalink
check e.is_scalar
Browse files Browse the repository at this point in the history
  • Loading branch information
coastalwhite committed Jan 8, 2025
1 parent 94b79ce commit de9b99a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/polars-expr/src/expressions/sortby.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ impl PhysicalExpr for SortByExpr {

if broadcast_length != column.len() {
polars_ensure!(
broadcast_length == 1,
broadcast_length == 1 && e.is_scalar(),
expr = self.expr, ShapeMismatch:
"`sort_by` produced different length ({}) than earlier Series' length in `by` ({})",
broadcast_length, column.len()
Expand Down

0 comments on commit de9b99a

Please sign in to comment.