EmilyMatt commented on code in PR #22945:
URL: https://github.com/apache/datafusion/pull/22945#discussion_r3412812174
##########
datafusion/physical-plan/src/sorts/multi_level_merge.rs:
##########
@@ -412,7 +438,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 {
+ // We couldn't even reserve a single stream - one
record batch
+ // is larger than the whole merge budget. That's
the lone-batch
+ // case, not the 2-stream merge skew we rescue
here - surface it.
+ return Err(err);
+ }
Review Comment:
Worst case is still 2
--
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]