Skip to content

Commit 373f969

Browse files
author
Bert Vermeiren
committed
Fix COPY TO does not produce an output file for the empty set (rephrase comments)
1 parent 596509d commit 373f969

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

datafusion/datasource/src/write/demux.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@ async fn row_count_demuxer(
172172
};
173173

174174
// Single-file output requires creating at least one file stream in advance.
175-
// If no record batches are present in the input stream (zero-row scenario),
175+
// If no record batches are present in the input stream,
176+
// the file stream must still be created to produce a valid output file.
176177
if single_file_output {
177178
open_file_streams.push(create_new_file_stream(
178179
&base_output_path,

0 commit comments

Comments
 (0)