This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.1 by this push:
     new d993f75ce42 branch-4.1: [fix](regression) Wait row count before 
partition stats check (#63759)
d993f75ce42 is described below

commit d993f75ce425f5efc25f6d6625b713dabf9b92d8
Author: yujun <[email protected]>
AuthorDate: Thu May 28 14:14:34 2026 +0800

    branch-4.1: [fix](regression) Wait row count before partition stats check 
(#63759)
    
    ### What problem does this PR solve?
    
    The partition row count regression asserts selected partition stats from
    BE-reported row counts. In Cloud, this row count can be stale
    immediately after insert, so wait until SHOW DATA reports the expected
    table row count before analyze and explain.
    
    ### Check List
    
    - Test: `git diff --check`
    - Behavior changed: No
    - Does this need documentation: No
---
 .../suites/nereids_p0/stats/partitionRowCount.groovy       | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/regression-test/suites/nereids_p0/stats/partitionRowCount.groovy 
b/regression-test/suites/nereids_p0/stats/partitionRowCount.groovy
index d490ee52d77..7fab6298d67 100644
--- a/regression-test/suites/nereids_p0/stats/partitionRowCount.groovy
+++ b/regression-test/suites/nereids_p0/stats/partitionRowCount.groovy
@@ -29,6 +29,18 @@ suite("partitionRowCount") {
         distributed by hash(a) properties("replication_num"="1");
         insert into partitionRowCountTable values (5, 3, 0), (22, 150, 1), 
(333, 1, 2);
         insert into partitionRowCountTable values (5, 3, 10), (22, 150, 11), 
(333, 1, 12);
+    """
+    def tableData = sql "show data from partitionRowCountTable;"
+    def retry = 0
+    while (tableData[0][4] != "6" && retry < 120) {
+        sleep(1000)
+        tableData = sql "show data from partitionRowCountTable;"
+        retry++
+        logger.info("wait partitionRowCountTable row count, retry " + retry + 
" times, tableData: " + tableData)
+    }
+    assertEquals("6", tableData[0][4], "partitionRowCountTable row count is 
not reported: " + tableData)
+
+    sql """
         analyze table partitionRowCountTable with sync;
     """
     explain {
@@ -38,4 +50,4 @@ suite("partitionRowCount") {
         contains("PhysicalOlapScan[partitionRowCountTable partitions(2/3)]@0 ( 
stats=4, operativeSlots=[a#0]")
     }
 
-}
\ No newline at end of file
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to