From fa91d2ec7f7934320b4b7377dd20b3003de03e9c Mon Sep 17 00:00:00 2001 From: Jay Chia Date: Mon, 4 Dec 2023 13:53:47 -0800 Subject: [PATCH] fix ordering of merge --- src/daft-scan/src/scan_task_iters.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/daft-scan/src/scan_task_iters.rs b/src/daft-scan/src/scan_task_iters.rs index 1ea965e3a8..c142236fdd 100644 --- a/src/daft-scan/src/scan_task_iters.rs +++ b/src/daft-scan/src/scan_task_iters.rs @@ -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()