@@ -640,6 +640,9 @@ pub struct ExecutionConfig {
640640 /// Should DataFusion repartition data using the aggregate keys to execute aggregates in parallel
641641 /// using the provided `concurrency` level
642642 pub repartition_aggregations : bool ,
643+ /// Should DataFusion repartition data using the partition keys to execute window functions in
644+ /// parallel using the provided `concurrency` level
645+ pub repartition_windows : bool ,
643646}
644647
645648impl ExecutionConfig {
@@ -669,6 +672,7 @@ impl ExecutionConfig {
669672 information_schema : false ,
670673 repartition_joins : true ,
671674 repartition_aggregations : true ,
675+ repartition_windows : true ,
672676 }
673677 }
674678
@@ -752,11 +756,18 @@ impl ExecutionConfig {
752756 self . repartition_joins = enabled;
753757 self
754758 }
759+
755760 /// Enables or disables the use of repartitioning for aggregations to improve parallelism
756761 pub fn with_repartition_aggregations ( mut self , enabled : bool ) -> Self {
757762 self . repartition_aggregations = enabled;
758763 self
759764 }
765+
766+ /// Enables or disables the use of repartitioning for window functions to improve parallelism
767+ pub fn with_repartition_windows ( mut self , enabled : bool ) -> Self {
768+ self . repartition_windows = enabled;
769+ self
770+ }
760771}
761772
762773/// Holds per-execution properties and data (such as starting timestamps, etc).
0 commit comments