Skip to content

Commit ef514e3

Browse files
committed
fix: do not check stage file for need_copied_file
1 parent 6929468 commit ef514e3

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

src/query/service/src/interpreters/interpreter_insert_v2.rs

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ use common_ast::parser::parse_comma_separated_exprs;
2727
use common_ast::parser::tokenize_sql;
2828
use common_ast::Backtrace;
2929
use common_base::runtime::GlobalIORuntime;
30-
use common_catalog::plan::StageFileStatus;
3130
use common_catalog::plan::StageTableInfo;
3231
use common_catalog::table::AppendMode;
3332
use common_catalog::table_context::StageAttachment;
@@ -212,25 +211,13 @@ impl InsertInterpreterV2 {
212211

213212
// TODO:(everpcpc) color_copied_files
214213

215-
let mut need_copied_file_infos = vec![];
216-
for file in &all_source_file_infos {
217-
if file.status == StageFileStatus::NeedCopy {
218-
need_copied_file_infos.push(file.clone());
219-
}
220-
}
221-
222214
tracing::info!(
223-
"insert: read all stage attachment files finished, all:{}, need copy:{}, elapsed:{}",
215+
"insert: read all stage attachment files finished: {}, elapsed:{}",
224216
all_source_file_infos.len(),
225-
need_copied_file_infos.len(),
226217
start.elapsed().as_secs()
227218
);
228219

229-
if need_copied_file_infos.is_empty() {
230-
return Ok(());
231-
}
232-
233-
stage_table_info.files_to_copy = Some(need_copied_file_infos.clone());
220+
stage_table_info.files_to_copy = Some(all_source_file_infos.clone());
234221
let stage_table = StageTable::try_create(stage_table_info.clone())?;
235222
let read_source_plan = {
236223
stage_table

0 commit comments

Comments
 (0)