rluvaton commented on code in PR #23702:
URL: https://github.com/apache/datafusion/pull/23702#discussion_r3653053917
##########
datafusion/physical-plan/src/sorts/streaming_merge.rs:
##########
@@ -195,13 +195,22 @@ impl<'a> StreamingMergeBuilder<'a> {
let Some(expressions) = expressions else {
return internal_err!("Sort expressions cannot be empty for
streaming merge");
};
+ let schema = schema.expect("Schema cannot be empty for streaming
merge");
+
+ if fetch.is_some_and(|fetch| fetch == 0) {
+ return Ok(Box::pin(EmptyRecordBatchStream::new(schema)));
Review Comment:
I will test `StreamingMergeBuilder` directly since it is public so we can
test the 1 and 2 partitions + sorted spill files
--
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]