@@ -1114,29 +1114,29 @@ fn remove_dist_changing_operators(
1114
1114
} )
1115
1115
}
1116
1116
1117
- /// Changes each child of the `dist_context.plan` such that they no longer
1118
- /// use order preserving variants, if no ordering is required at the output
1119
- /// of the physical plan (there is no global ordering requirement by the query).
1120
- fn update_plan_to_remove_unnecessary_final_order (
1121
- dist_context : DistributionContext ,
1122
- ) -> Result < Arc < dyn ExecutionPlan > > {
1123
- let DistributionContext {
1124
- plan,
1125
- distribution_onwards,
1126
- ..
1127
- } = dist_context;
1128
- let new_children = izip ! ( plan. children( ) , distribution_onwards)
1129
- . map ( |( mut child, mut dist_onward) | {
1130
- replace_order_preserving_variants ( & mut child, & mut dist_onward) ?;
1131
- Ok ( child)
1132
- } )
1133
- . collect :: < Result < Vec < _ > > > ( ) ?;
1134
- if !new_children. is_empty ( ) {
1135
- plan. with_new_children ( new_children)
1136
- } else {
1137
- Ok ( plan)
1138
- }
1139
- }
1117
+ // // / Changes each child of the `dist_context.plan` such that they no longer
1118
+ // // / use order preserving variants, if no ordering is required at the output
1119
+ // // / of the physical plan (there is no global ordering requirement by the query).
1120
+ // fn update_plan_to_remove_unnecessary_final_order(
1121
+ // dist_context: DistributionContext,
1122
+ // ) -> Result<Arc<dyn ExecutionPlan>> {
1123
+ // let DistributionContext {
1124
+ // plan,
1125
+ // distribution_onwards,
1126
+ // ..
1127
+ // } = dist_context;
1128
+ // let new_children = izip!(plan.children(), distribution_onwards)
1129
+ // .map(|(mut child, mut dist_onward)| {
1130
+ // replace_order_preserving_variants(&mut child, &mut dist_onward)?;
1131
+ // Ok(child)
1132
+ // })
1133
+ // .collect::<Result<Vec<_>>>()?;
1134
+ // if !new_children.is_empty() {
1135
+ // plan.with_new_children(new_children)
1136
+ // } else {
1137
+ // Ok(plan)
1138
+ // }
1139
+ // }
1140
1140
1141
1141
/// Updates the physical plan `input` by using `dist_onward` replace order preserving operator variants
1142
1142
/// with their corresponding operators that do not preserve order. It is a wrapper for `replace_order_preserving_variants_helper`
@@ -1228,7 +1228,7 @@ fn ensure_distribution(
1228
1228
mut plan,
1229
1229
mut distribution_onwards,
1230
1230
has_recursive_ancestor,
1231
- } = remove_unnecessary_repartition ( dist_context) ?;
1231
+ } = remove_dist_changing_operators ( dist_context) ?;
1232
1232
1233
1233
if let Some ( exec) = plan. as_any ( ) . downcast_ref :: < WindowAggExec > ( ) {
1234
1234
if let Some ( updated_window) = get_best_fitting_window (
0 commit comments