Skip to content

Commit b182a49

Browse files
committed
improve with reviewers suggestion
1 parent d0b6daf commit b182a49

File tree

2 files changed

+2
-35
lines changed

2 files changed

+2
-35
lines changed

src/query/service/src/servers/http/v1/load.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,10 @@ pub async fn streaming_load(
195195
let input_context = Arc::new(
196196
InputContext::try_create_from_insert_v2(
197197
rx,
198-
ctx.get_settings(),
198+
context.get_settings(),
199199
option_settings.clone(),
200200
schema,
201-
ctx.get_scan_progress(),
201+
context.get_scan_progress(),
202202
false,
203203
to_table.get_block_compact_thresholds(),
204204
)

src/query/settings/src/lib.rs

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ use common_base::runtime::TrySpawn;
2727
use common_config::Config;
2828
use common_exception::ErrorCode;
2929
use common_exception::Result;
30-
use common_meta_types::FileFormatOptions;
3130
use common_meta_types::UserSetting;
3231
use common_meta_types::UserSettingValue;
3332
use common_users::UserApiProvider;
@@ -492,38 +491,6 @@ impl Settings {
492491
}))
493492
}
494493

495-
pub fn set_file_format_options(&self, opts: &FileFormatOptions) -> Result<()> {
496-
// hack here for associate args in streaming load with file_format_option in copy into.
497-
// format_skip_header -> skip_header
498-
// format_compression -> compression
499-
// format_field_delimiter -> field_delimiter
500-
// format_record_delimiter -> record_delimiter
501-
// format_quote -> escape
502-
self.set_settings(
503-
"format_skip_header".to_string(),
504-
opts.skip_header.to_string(),
505-
false,
506-
)?;
507-
self.set_settings(
508-
"format_compression".to_string(),
509-
opts.compression.to_string(),
510-
false,
511-
)?;
512-
self.set_settings(
513-
"format_field_delimiter".to_string(),
514-
opts.field_delimiter.clone(),
515-
false,
516-
)?;
517-
self.set_settings(
518-
"format_record_delimiter".to_string(),
519-
opts.record_delimiter.clone(),
520-
false,
521-
)?;
522-
self.set_settings("format_quote".to_string(), opts.escape.clone(), false)?;
523-
524-
Ok(())
525-
}
526-
527494
// Get max_block_size.
528495
pub fn get_max_block_size(&self) -> Result<u64> {
529496
let key = "max_block_size";

0 commit comments

Comments
 (0)