This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.2
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.2 by this push:
new 3d131d197e4 branch-4.2: [fix](regression) Wait row count before hot
value analyze #63758 (#68341)
3d131d197e4 is described below
commit 3d131d197e4f25b0b390a32211d7916fb158ead7
Author: yujun <[email protected]>
AuthorDate: Tue Sep 22 10:10:57 2026 +0800
branch-4.2: [fix](regression) Wait row count before hot value analyze
#63758 (#68341)
cherry-pick: #63758
---
.../statistics/test_full_analyze_hot_value.groovy | 32 ++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git
a/regression-test/suites/statistics/test_full_analyze_hot_value.groovy
b/regression-test/suites/statistics/test_full_analyze_hot_value.groovy
index f2e5031eb19..ad7df099e8d 100644
--- a/regression-test/suites/statistics/test_full_analyze_hot_value.groovy
+++ b/regression-test/suites/statistics/test_full_analyze_hot_value.groovy
@@ -16,6 +16,35 @@
// under the License.
suite("test_full_analyze_hot_value") {
+ def wait_row_count_reported = { db, table, row, column, expected ->
+ def result = sql """show frontends;"""
+ logger.info("show frontends result origin: " + result)
+ def host
+ def port
+ for (int i = 0; i < result.size(); i++) {
+ if (result[i][8] == "true") {
+ host = result[i][1]
+ port = result[i][4]
+ }
+ }
+ def tokens = context.config.jdbcUrl.split('/')
+ def url = tokens[0] + "//" + host + ":" + port
+ logger.info("Master url is " + url)
+ connect(context.config.jdbcUser, context.config.jdbcPassword, url) {
+ sql """use ${db}"""
+ result = sql """show frontends;"""
+ logger.info("show frontends result master: " + result)
+ for (int i = 0; i < 120; i++) {
+ Thread.sleep(5000)
+ result = sql """SHOW DATA FROM ${table};"""
+ logger.info("result " + result)
+ if (result[row][column] == expected) {
+ return;
+ }
+ }
+ throw new Exception("Row count report timeout.")
+ }
+ }
sql """drop database if exists test_full_analyze_hot_value"""
sql """create database test_full_analyze_hot_value"""
@@ -37,6 +66,7 @@ suite("test_full_analyze_hot_value") {
"""
// Insert 100 rows: value1 has 2 values, "0" and "1", each appearing 50
times
sql """insert into full_hot_skew select number, number % 2 from
numbers("number"="100")"""
+ wait_row_count_reported("test_full_analyze_hot_value", "full_hot_skew", 0,
4, "100")
sql """analyze table full_hot_skew with sync"""
def result = sql """show column stats full_hot_skew(value1)"""
@@ -94,6 +124,7 @@ suite("test_full_analyze_hot_value") {
)
"""
sql """insert into full_hot_special select number, " : ;a" from
numbers("number"="100")"""
+ wait_row_count_reported("test_full_analyze_hot_value", "full_hot_special",
0, 4, "100")
sql """analyze table full_hot_special with sync with hot value"""
result = sql """show column stats full_hot_special(value1)"""
@@ -173,6 +204,7 @@ suite("test_full_analyze_hot_value") {
)
"""
sql """insert into full_hot_all_null select number, null from
numbers("number"="100")"""
+ wait_row_count_reported("test_full_analyze_hot_value",
"full_hot_all_null", 0, 4, "100")
sql """analyze table full_hot_all_null with sync with hot value"""
result = sql """show column stats full_hot_all_null(value1)"""
logger.info("Test9 all-null result: " + result)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]