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 2735027 commit 93d2a91
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 @@ -414,7 +414,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 93d2a91

Please sign in to comment.