Skip to content

Commit fbb9e56

Browse files
committed
fix bug
1 parent eec2634 commit fbb9e56

1 file changed

Lines changed: 2 additions & 14 deletions

File tree

  • datafusion/physical-plan/src/sorts

datafusion/physical-plan/src/sorts/sort.rs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,22 +1114,10 @@ impl ExecutionPlan for SortExec {
11141114
self: Arc<Self>,
11151115
children: Vec<Arc<dyn ExecutionPlan>>,
11161116
) -> Result<Arc<dyn ExecutionPlan>> {
1117-
let input = Arc::clone(&children[0]);
1118-
let preserve_partitioning = self.preserve_partitioning;
1119-
let mut new_sort = SortExec {
1120-
input,
1121-
expr: self.expr.clone(),
1122-
metrics_set: self.metrics_set.clone(),
1123-
preserve_partitioning,
1124-
fetch: self.fetch,
1125-
common_sort_prefix: self.common_sort_prefix.clone(),
1126-
cache: self.cache.clone(),
1127-
filter: self.filter.clone(),
1128-
};
1129-
1130-
new_sort = new_sort
1117+
let mut new_sort = SortExec::new(self.expr.clone(), Arc::clone(&children[0]))
11311118
.with_fetch(self.fetch)
11321119
.with_preserve_partitioning(self.preserve_partitioning);
1120+
new_sort.filter = self.filter.clone();
11331121

11341122
Ok(Arc::new(new_sort))
11351123
}

0 commit comments

Comments
 (0)