rluvaton commented on code in PR #15608:
URL: https://github.com/apache/datafusion/pull/15608#discussion_r2030275648


##########
datafusion/physical-plan/src/sorts/streaming_merge.rs:
##########
@@ -143,8 +170,27 @@ impl<'a> StreamingMergeBuilder<'a> {
             fetch,
             expressions,
             enable_round_robin_tie_breaker,
+            spill_manager,
+            sorted_spill_files,
+            max_blocking_threads,
         } = self;
 
+        if spill_manager.is_some() && !sorted_spill_files.is_empty() {
+            return Ok(Box::pin(MultiLevelSortPreservingMergeStream::new(
+                spill_manager.unwrap(),
+                schema.clone().unwrap(),
+                sorted_spill_files,
+                streams,
+                expressions.clone(),
+                metrics.clone().unwrap(),
+                batch_size.unwrap(),
+                reservation.unwrap(),
+                max_blocking_threads,
+                fetch,
+                enable_round_robin_tie_breaker,
+            )?));
+        }

Review Comment:
   Will remove all the unwrap. first want to know what do you think about the 
solution



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to