This is an automated email from the ASF dual-hosted git repository.
lijibing 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 04d27adfe0f Fix analyze mv and mtmv p0 case. (#31191)
04d27adfe0f is described below
commit 04d27adfe0f9283c0d53bdb68b3e38d575a72568
Author: Jibing-Li <[email protected]>
AuthorDate: Wed Feb 21 13:59:19 2024 +0800
Fix analyze mv and mtmv p0 case. (#31191)
---
.../suites/statistics/test_analyze_mtmv.groovy | 20 +++++++-------------
.../suites/statistics/test_analyze_mv.groovy | 20 +++++++-------------
2 files changed, 14 insertions(+), 26 deletions(-)
diff --git a/regression-test/suites/statistics/test_analyze_mtmv.groovy
b/regression-test/suites/statistics/test_analyze_mtmv.groovy
index fca40910aef..6b8c606ac49 100644
--- a/regression-test/suites/statistics/test_analyze_mtmv.groovy
+++ b/regression-test/suites/statistics/test_analyze_mtmv.groovy
@@ -17,22 +17,16 @@
suite("test_analyze_mtmv") {
- def wait_row_count_reported = { ->
- while(true) {
+ def wait_row_count_reported = { table, expected ->
+ for (int i = 0; i < 120; i++) {
Thread.sleep(5000)
- boolean reported = true;
- def result = sql """SHOW DATA;"""
+ def result = sql """SHOW DATA FROM ${table};"""
logger.info("result " + result)
- for (int i = 0; i < result.size(); i++) {
- if (result[i][1] == "0.000 ") {
- reported = false;
- break;
- }
- }
- if (reported) {
- break;
+ if (result[0][4] == expected) {
+ return;
}
}
+ throw new Exception("Row count report timeout.")
}
sql """drop database if exists test_analyze_mtmv"""
@@ -273,7 +267,7 @@ suite("test_analyze_mtmv") {
result_sample = sql """show column cached stats mv1(sum_total)"""
assertEquals(0, result_sample.size())
- wait_row_count_reported()
+ wait_row_count_reported("mv1", "3")
sql """analyze table mv1 with sync with sample rows 4000000"""
result_sample = sql """show column stats mv1(l_shipdate)"""
assertEquals(1, result_sample.size())
diff --git a/regression-test/suites/statistics/test_analyze_mv.groovy
b/regression-test/suites/statistics/test_analyze_mv.groovy
index d868b02768d..34c5736035e 100644
--- a/regression-test/suites/statistics/test_analyze_mv.groovy
+++ b/regression-test/suites/statistics/test_analyze_mv.groovy
@@ -34,22 +34,16 @@ suite("test_analyze_mv") {
}
}
- def wait_row_count_reported = { ->
- while(true) {
+ def wait_row_count_reported = { table, expected ->
+ for (int i = 0; i < 120; i++) {
Thread.sleep(5000)
- boolean reported = true;
- def result = sql """SHOW DATA;"""
+ def result = sql """SHOW DATA FROM ${table};"""
logger.info("result " + result)
- for (int i = 0; i < result.size(); i++) {
- if (result[i][1] == "0.000 ") {
- reported = false;
- break;
- }
- }
- if (reported) {
- break;
+ if (result[3][4] == expected) {
+ return;
}
}
+ throw new Exception("Row count report timeout.")
}
def wait_analyze_finish = { table ->
@@ -305,12 +299,12 @@ suite("test_analyze_mv") {
assertEquals("4001", result_sample[0][8])
assertEquals("FULL", result_sample[0][9])
- wait_row_count_reported()
sql """drop stats mvTestDup"""
result_sample = sql """show column stats mvTestDup"""
assertEquals(0, result_sample.size())
// Test sample
+ wait_row_count_reported("mvTestDup", "6")
sql """analyze table mvTestDup with sample rows 4000000"""
wait_analyze_finish("mvTestDup")
result_sample = sql """SHOW ANALYZE mvTestDup;"""
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]