Skip to content

Commit

Permalink
Always add round robin repartition for child sources
Browse files Browse the repository at this point in the history
  • Loading branch information
Dandandan committed Dec 9, 2024
1 parent d3cfc45 commit 8ca56a2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,9 @@ fn add_roundrobin_on_top(
n_target: usize,
) -> Result<DistributionContext> {
// Adding repartition is helpful:
if input.plan.output_partitioning().partition_count() < n_target {
if input.plan.output_partitioning().partition_count() < n_target
|| input.plan.children().is_empty()
{
// When there is an existing ordering, we preserve ordering
// during repartition. This will be un-done in the future
// If any of the following conditions is true
Expand Down

0 comments on commit 8ca56a2

Please sign in to comment.