This is an automated email from the ASF dual-hosted git repository. kxiao pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/doris.git
commit 2bc34538cfa938508f253ba90b6802fdaaa45b98 Author: Yongqiang YANG <98214048+dataroar...@users.noreply.github.com> AuthorDate: Sun Sep 3 15:08:10 2023 +0800 [enhancement](load) support dry_run_query for load (#23680) If dry_run_query is set, a sink just discards blocks and do not send them to destination. --- be/src/vec/sink/vtablet_sink.cpp | 4 ++++ docs/en/docs/advanced/variables.md | 2 +- docs/zh-CN/docs/advanced/variables.md | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/be/src/vec/sink/vtablet_sink.cpp b/be/src/vec/sink/vtablet_sink.cpp index 7d29668568..a8c0044218 100644 --- a/be/src/vec/sink/vtablet_sink.cpp +++ b/be/src/vec/sink/vtablet_sink.cpp @@ -1264,6 +1264,10 @@ Status VOlapTableSink::send(RuntimeState* state, vectorized::Block* input_block, SCOPED_CONSUME_MEM_TRACKER(_mem_tracker.get()); Status status = Status::OK(); + if (state->query_options().dry_run_query) { + return status; + } + auto rows = input_block->rows(); auto bytes = input_block->bytes(); if (UNLIKELY(rows == 0)) { diff --git a/docs/en/docs/advanced/variables.md b/docs/en/docs/advanced/variables.md index 5829d63cf6..ab5d4abcf4 100644 --- a/docs/en/docs/advanced/variables.md +++ b/docs/en/docs/advanced/variables.md @@ -646,7 +646,7 @@ Translated with www.DeepL.com/Translator (free version) <version since="dev"></version> - If set to true, for query requests, the actual result set will no longer be returned, but only the number of rows. The default is false. + If set to true, for query requests, the actual result set will no longer be returned, but only the number of rows, while for load and insert, the data is discarded by sink node, no writing happens. The default is false. This parameter can be used to avoid the time-consuming result set transmission when testing a large number of data sets, and focus on the time-consuming underlying query execution. diff --git a/docs/zh-CN/docs/advanced/variables.md b/docs/zh-CN/docs/advanced/variables.md index 315fc04355..3a6ab49bdc 100644 --- a/docs/zh-CN/docs/advanced/variables.md +++ b/docs/zh-CN/docs/advanced/variables.md @@ -633,7 +633,7 @@ try (Connection conn = DriverManager.getConnection("jdbc:mysql://127.0.0.1:9030/ <version since="dev"></version> - 如果设置为true,对于查询请求,将不再返回实际结果集,而仅返回行数。默认为 false。 + 如果设置为true,对于查询请求,将不再返回实际结果集,而仅返回行数。对于导入和insert,Sink 丢掉了数据,不会有实际的写发生。额默认为 false。 该参数可以用于测试返回大量数据集时,规避结果集传输的耗时,重点关注底层查询执行的耗时。 --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org