Skip to content

Commit 7550b29

Browse files
committed
refactor fixes
1 parent 2e58eaa commit 7550b29

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

datafusion/core/src/physical_optimizer/enforce_distribution.rs

+24-24
Original file line numberDiff line numberDiff line change
@@ -1114,29 +1114,29 @@ fn remove_dist_changing_operators(
11141114
})
11151115
}
11161116

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+
// }
11401140

11411141
/// Updates the physical plan `input` by using `dist_onward` replace order preserving operator variants
11421142
/// 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(
12281228
mut plan,
12291229
mut distribution_onwards,
12301230
has_recursive_ancestor,
1231-
} = remove_unnecessary_repartition(dist_context)?;
1231+
} = remove_dist_changing_operators(dist_context)?;
12321232

12331233
if let Some(exec) = plan.as_any().downcast_ref::<WindowAggExec>() {
12341234
if let Some(updated_window) = get_best_fitting_window(

0 commit comments

Comments
 (0)