Skip to content

Commit 5c4dafb

Browse files
committed
make lint
1 parent e8da229 commit 5c4dafb

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/query/sql/src/planner/binder/copy_into_table.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -268,15 +268,13 @@ impl<'a> Binder {
268268
) -> Result<Plan> {
269269
let use_query = matches!(&stage_table_info.stage_info.file_format_params,
270270
FileFormatParams::Parquet(fmt) if fmt.missing_field_as == NullAs::Error);
271+
let case_sensitive = stage_table_info.copy_into_table_options.column_match_mode
272+
== Some(ColumnMatchMode::CaseSensitive);
271273

272274
if use_query {
273275
let mut select_list =
274276
Vec::with_capacity(copy_into_table_plan.required_source_schema.num_fields());
275-
let case_sensitive = plan
276-
.stage_table_info
277-
.copy_into_table_options
278-
.column_match_mode
279-
== Some(ColumnMatchMode::CaseSensitive);
277+
280278
for dest_field in copy_into_table_plan.required_source_schema.fields().iter() {
281279
let column = Expr::ColumnRef {
282280
span: None,
@@ -331,6 +329,7 @@ impl<'a> Binder {
331329
stage_table_info.files_info.clone(),
332330
&None,
333331
stage_table_info.files_to_copy.clone(),
332+
case_sensitive,
334333
)
335334
.await?;
336335
copy_into_table_plan.project_columns = Some(bind_context.columns.clone());
@@ -486,6 +485,8 @@ impl<'a> Binder {
486485
alias: &Option<TableAlias>,
487486
) -> Result<Plan> {
488487
let table_ctx = self.ctx.clone();
488+
let case_sensitive = stage_table_info.copy_into_table_options.column_match_mode
489+
== Some(ColumnMatchMode::CaseSensitive);
489490
let (s_expr, mut from_context) = self
490491
.bind_stage_table(
491492
table_ctx,
@@ -494,6 +495,7 @@ impl<'a> Binder {
494495
stage_table_info.files_info.clone(),
495496
alias,
496497
stage_table_info.files_to_copy.clone(),
498+
case_sensitive,
497499
)
498500
.await?;
499501

0 commit comments

Comments
 (0)