diff --git a/datafusion/physical-plan/src/sorts/merge.rs b/datafusion/physical-plan/src/sorts/merge.rs index 54ed1242010d..d2b79d57d1be 100644 --- a/datafusion/physical-plan/src/sorts/merge.rs +++ b/datafusion/physical-plan/src/sorts/merge.rs @@ -111,7 +111,7 @@ pub(crate) struct SortPreservingMergeStream { /// To resolve this, we are modifying the tie-breaking logic. Instead of always choosing the partition with the smallest index, /// we now select the partition that has the fewest poll counts for the same value. /// This ensures that multiple partitions with the same value are chosen equally, distributing the polling load in a round-robin fashion. - /// This approach balances the workload more effectively across partitions and avoids excessive buffer growth.Round robin tie breaker + /// This approach balances the workload more effectively across partitions and avoids excessive buffer growth. enable_round_robin_tie_breaker: bool, /// Flag indicating whether we are in the mode of round-robin diff --git a/datafusion/physical-plan/src/sorts/sort_preserving_merge.rs b/datafusion/physical-plan/src/sorts/sort_preserving_merge.rs index 22a28669bf02..019f3b2d59f2 100644 --- a/datafusion/physical-plan/src/sorts/sort_preserving_merge.rs +++ b/datafusion/physical-plan/src/sorts/sort_preserving_merge.rs @@ -401,12 +401,12 @@ mod tests { Ok(Arc::new(spm)) } - #[tokio::test(flavor = "multi_thread")] /// This test verifies that memory usage stays within limits when the tie breaker is enabled. /// Any errors here could indicate unintended changes in tie breaker logic. /// /// Note: If you adjust constants in this test, ensure that memory usage differs /// based on whether the tie breaker is enabled or disabled. + #[tokio::test(flavor = "multi_thread")] async fn test_round_robin_tie_breaker_success() -> Result<()> { let task_ctx = generate_task_ctx_for_round_robin_tie_breaker()?; let spm = generate_spm_for_round_robin_tie_breaker(true)?;