Skip to content

Commit d0b6daf

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

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

src/query/service/src/servers/http/clickhouse_handler.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -314,11 +314,6 @@ pub async fn clickhouse_handler_post(
314314
.await
315315
.map_err(InternalServerError)?;
316316

317-
// override settings
318-
settings
319-
.set_file_format_options(option_settings)
320-
.map_err(InternalServerError)?;
321-
322317
let input_context = Arc::new(
323318
InputContext::try_create_from_insert_v2(
324319
rx,

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

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,6 @@ pub async fn streaming_load(
179179
start,
180180
input_context_ref,
181181
) => {
182-
// override settings with file format options
183-
settings
184-
.set_file_format_options(option_settings)
185-
.map_err(InternalServerError)?;
186-
187182
let sql_rest = &insert_sql[*start..].trim();
188183
if !sql_rest.is_empty() {
189184
return Err(poem::Error::from_string(
@@ -198,13 +193,13 @@ pub async fn streaming_load(
198193
let (tx, rx) = tokio::sync::mpsc::channel(2);
199194

200195
let input_context = Arc::new(
201-
InputContext::try_create_from_insert(
202-
option_settings.format.to_string().as_str(),
196+
InputContext::try_create_from_insert_v2(
203197
rx,
204-
context.get_settings(),
198+
ctx.get_settings(),
199+
option_settings.clone(),
205200
schema,
206-
context.get_scan_progress(),
207-
true,
201+
ctx.get_scan_progress(),
202+
false,
208203
to_table.get_block_compact_thresholds(),
209204
)
210205
.await

0 commit comments

Comments
 (0)