Skip to content

Commit c5764f3

Browse files
committed
return error when no file to copy.
1 parent a50856a commit c5764f3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/query/pipeline/sources/src/processors/sources/input_formats/input_context.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ impl InputContext {
9494
files: Vec<String>,
9595
scan_progress: Arc<Progress>,
9696
) -> Result<Self> {
97+
if files.is_empty() {
98+
return Err(ErrorCode::BadArguments("no file to copy"));
99+
}
97100
let plan = Box::new(CopyIntoPlan { stage_info, files });
98101
let read_batch_size = 1024 * 1024;
99102
let split_size = 128usize * 1024 * 1024;

0 commit comments

Comments
 (0)