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


##########
datafusion/physical-plan/src/sorts/multi_level_merge.rs:
##########
@@ -412,7 +447,24 @@ impl MultiLevelMergeBuilder {
                             );
                         }
 
-                        return Err(err);
+                        // buffer_len == 1 and we still can't seat the minimum 
of 2 streams.
+                        if number_of_spills_to_read_for_current_phase == 0 {

Review Comment:
   this can happen if we have 1 sorted stream and the first spill file is very 
large, why can't we split it in those cases? (but propagate the error when 
`minimum_number_of_required_streams` is greater than 1)



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to