This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new c68dce1dc91 [fix](local shuffle) Set serial execution for schema scan
operator (#47498)
c68dce1dc91 is described below
commit c68dce1dc91ba8a8ee1279c34b28bcd42a63a371
Author: Gabriel <[email protected]>
AuthorDate: Thu Feb 6 09:39:34 2025 +0800
[fix](local shuffle) Set serial execution for schema scan operator (#47498)
`select * from information_schema.workload_group_resource_usage;` got
duplicate rows if `enable_local_shuffle` is true. This is caused by a
serial schema scan operator which is not set correctly.
A regression test case could not be used because the
`workload_group_resource_usage` will not get a stable result.
---
be/src/pipeline/exec/schema_scan_operator.cpp | 4 +++-
regression-test/suites/query_p0/system/test_query_sys.groovy | 8 ++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/be/src/pipeline/exec/schema_scan_operator.cpp
b/be/src/pipeline/exec/schema_scan_operator.cpp
index ea6f122df95..cac44c9e3a5 100644
--- a/be/src/pipeline/exec/schema_scan_operator.cpp
+++ b/be/src/pipeline/exec/schema_scan_operator.cpp
@@ -71,7 +71,9 @@ SchemaScanOperatorX::SchemaScanOperatorX(ObjectPool* pool,
const TPlanNode& tnod
_common_scanner_param(new SchemaScannerCommonParam()),
_tuple_id(tnode.schema_scan_node.tuple_id),
_tuple_idx(0),
- _slot_num(0) {}
+ _slot_num(0) {
+ Base::_is_serial_operator = tnode.__isset.is_serial_operator &&
tnode.is_serial_operator;
+}
Status SchemaScanOperatorX::init(const TPlanNode& tnode, RuntimeState* state) {
RETURN_IF_ERROR(Base::init(tnode, state));
diff --git a/regression-test/suites/query_p0/system/test_query_sys.groovy
b/regression-test/suites/query_p0/system/test_query_sys.groovy
index 7b6ca1027b4..b192a87ca30 100644
--- a/regression-test/suites/query_p0/system/test_query_sys.groovy
+++ b/regression-test/suites/query_p0/system/test_query_sys.groovy
@@ -54,4 +54,12 @@ suite("test_query_sys", "query,p0") {
sql "select * from http_stream('format'='csv');"
exception "No Alive backends"
}
+
+ // `workload_group_resource_usage` will be refresh 30s after BE startup so
sleep 30s to get a stable result
+ sleep(30000)
+ sql """set parallel_pipeline_task_num=8"""
+ def rows1 = sql """ select count(*) from
information_schema.workload_group_resource_usage; """
+ sql """set parallel_pipeline_task_num=1"""
+ def rows2 = sql """ select count(*) from
information_schema.workload_group_resource_usage; """
+ assertEquals(rows1, rows2)
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]