Skip to content

Commit

Permalink
fix partition requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
jimexist committed Jun 28, 2021
1 parent fac065c commit 723e7bc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion datafusion/src/physical_plan/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,15 @@ impl ExecutionPlan for WindowAggExec {
}

fn required_child_distribution(&self) -> Distribution {
Distribution::UnspecifiedDistribution
if self
.window_expr()
.iter()
.all(|expr| expr.partition_by().is_empty())
{
Distribution::SinglePartition
} else {
Distribution::UnspecifiedDistribution
}
}

fn with_new_children(
Expand Down

0 comments on commit 723e7bc

Please sign in to comment.