Skip to content

Commit

Permalink
fix ordering of merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay Chia committed Dec 4, 2023
1 parent 378280a commit fa91d2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/daft-scan/src/scan_task_iters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ impl Iterator for MergeByFileSize {
match (should_merge, should_yield_merged_result) {
// Merge and yield the merged result immediately
(true, true) => Some(Ok(Arc::new(
ScanTask::merge(child_item.as_ref(), accumulator.as_ref())
ScanTask::merge(accumulator.as_ref(), child_item.as_ref())
.expect("ScanTasks should be mergeable in MergeByFileSize"),
))),
// Merge and continue iterating and accumulating without yielding a result right now
(true, false) => {
self.accumulator = Some(Arc::new(
ScanTask::merge(child_item.as_ref(), accumulator.as_ref())
ScanTask::merge(accumulator.as_ref(), child_item.as_ref())
.expect("ScanTasks should be mergeable in MergeByFileSize"),
));
self.next()
Expand Down

0 comments on commit fa91d2e

Please sign in to comment.