Skip to content

Commit

Permalink
Update datafusion/core/src/physical_optimizer/enforce_distribution.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Berkay Şahin <[email protected]>
  • Loading branch information
Dandandan and berkaysynnada authored Dec 10, 2024
1 parent 8ca56a2 commit a10d8ab
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ fn add_roundrobin_on_top(
) -> Result<DistributionContext> {
// Adding repartition is helpful:
if input.plan.output_partitioning().partition_count() < n_target
|| input.plan.children().is_empty()
|| (input.plan.children().is_empty() && input.plan.output_partitioning().partition_count() > 1)
{
// When there is an existing ordering, we preserve ordering
// during repartition. This will be un-done in the future
Expand Down

0 comments on commit a10d8ab

Please sign in to comment.