We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d3cfc45 commit 8ca56a2Copy full SHA for 8ca56a2
1 file changed
datafusion/core/src/physical_optimizer/enforce_distribution.rs
@@ -836,7 +836,9 @@ fn add_roundrobin_on_top(
836
n_target: usize,
837
) -> Result<DistributionContext> {
838
// Adding repartition is helpful:
839
- if input.plan.output_partitioning().partition_count() < n_target {
+ if input.plan.output_partitioning().partition_count() < n_target
840
+ || input.plan.children().is_empty()
841
+ {
842
// When there is an existing ordering, we preserve ordering
843
// during repartition. This will be un-done in the future
844
// If any of the following conditions is true
0 commit comments