Skip to content

Commit

Permalink
Revert a change
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrove committed Sep 24, 2024
1 parent 0e139e9 commit cae1100
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions native/core/src/execution/datafusion/planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -917,15 +917,16 @@ impl PhysicalPlanner {

let fetch = sort.fetch.map(|num| num as usize);

let child: Arc<dyn ExecutionPlan> = if can_reuse_input_batch(&child) {
let copy_exec = if can_reuse_input_batch(&child) {
Arc::new(CopyExec::new(child, CopyMode::UnpackOrDeepCopy))
} else {
child
Arc::new(CopyExec::new(child, CopyMode::UnpackOrClone))
};

let sort_exec = Arc::new(SortExec::new(exprs?, child).with_fetch(fetch));

Ok((scans, sort_exec))
Ok((
scans,
Arc::new(SortExec::new(exprs?, copy_exec).with_fetch(fetch)),
))
}
OpStruct::Scan(scan) => {
let data_types = scan.fields.iter().map(to_arrow_datatype).collect_vec();
Expand Down

0 comments on commit cae1100

Please sign in to comment.