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 8fe3a363c51 [fix](test) fix unstable case of partitions (#40861)
8fe3a363c51 is described below

commit 8fe3a363c51e6159f39e8d362614bd60031aed8f
Author: Vallish Pai <vallish...@gmail.com>
AuthorDate: Sun Sep 15 17:38:50 2024 +0530

    [fix](test) fix unstable case of partitions (#40861)
    
    ## Proposed changes
    
    Issue Number: close #xxx
       row count skipped in common validation
       if table report not done for the all tablet
        row count will be -1 if done can get actual data.
    So row count can cause timing issue and make testcase unstable.
    we already have a checkpoint for rowcount with waiting . in common
    validation we have skiped rowcount.
---
 .../query_p0/system/test_partitions_schema.out     | 54 +++++++++++-----------
 .../query_p0/system/test_partitions_schema.groovy  | 14 ++++--
 2 files changed, 37 insertions(+), 31 deletions(-)

diff --git a/regression-test/data/query_p0/system/test_partitions_schema.out 
b/regression-test/data/query_p0/system/test_partitions_schema.out
index 781be7e41ee..a6c379ffc5b 100644
--- a/regression-test/data/query_p0/system/test_partitions_schema.out
+++ b/regression-test/data/query_p0/system/test_partitions_schema.out
@@ -9,35 +9,35 @@ test_range_table      p4      3
 test_range_table       p5      0
 
 -- !select_check_1 --
-internal       test_partitions_schema_db       duplicate_table duplicate_table 
NULL    0       0       UNPARTITIONED   NULL    NULL    NULL    NULL    -1      
0       0       0       0       0       0                       
-internal       test_partitions_schema_db       listtable       p1_city NULL    
0       0       LIST    NULL    user_id, city   NULL    (("1", "Beijing"),("1", 
"Shanghai"))    -1      0       0       0       0       0       0               
        
-internal       test_partitions_schema_db       listtable       p2_city NULL    
0       0       LIST    NULL    user_id, city   NULL    (("2", "Beijing"),("2", 
"Shanghai"))    -1      0       0       0       0       0       0               
        
-internal       test_partitions_schema_db       listtable       p3_city NULL    
0       0       LIST    NULL    user_id, city   NULL    (("3", "Beijing"),("3", 
"Shanghai"))    -1      0       0       0       0       0       0               
        
-internal       test_partitions_schema_db       randomtable     randomtable     
NULL    0       0       UNPARTITIONED   NULL    NULL    NULL    NULL    -1      
0       0       0       0       0       0                       
-internal       test_partitions_schema_db       test_range_table        p0      
NULL    0       0       RANGE   NULL    col_1   NULL    [('-2147483648'), 
('4'))        9       636     5728    0       0       0       0                 
      
-internal       test_partitions_schema_db       test_range_table        p1      
NULL    0       0       RANGE   NULL    col_1   NULL    [('4'), ('6'))  2       
959     1919    0       0       0       0                       
-internal       test_partitions_schema_db       test_range_table        p100    
NULL    0       0       RANGE   NULL    col_1   NULL    [('83647'), 
('2147483647'))     4       735     2941    0       0       0       0           
            
-internal       test_partitions_schema_db       test_range_table        p2      
NULL    0       0       RANGE   NULL    col_1   NULL    [('6'), ('7'))  1       
975     975     0       0       0       0                       
-internal       test_partitions_schema_db       test_range_table        p3      
NULL    0       0       RANGE   NULL    col_1   NULL    [('7'), ('8'))  1       
959     959     0       0       0       0                       
-internal       test_partitions_schema_db       test_range_table        p4      
NULL    0       0       RANGE   NULL    col_1   NULL    [('8'), ('10')) 3       
948     2846    0       0       0       0                       
-internal       test_partitions_schema_db       test_range_table        p5      
NULL    0       0       RANGE   NULL    col_1   NULL    [('10'), ('83647'))     
0       0       0       0       0       0       0                       
-internal       test_partitions_schema_db       test_row_column_page_size1      
test_row_column_page_size1      NULL    0       0       UNPARTITIONED   NULL    
NULL    NULL    NULL    -1      0       0       0       0       0       0       
                
-internal       test_partitions_schema_db       test_row_column_page_size2      
test_row_column_page_size2      NULL    0       0       UNPARTITIONED   NULL    
NULL    NULL    NULL    -1      0       0       0       0       0       0       
                
+internal       test_partitions_schema_db       duplicate_table duplicate_table 
NULL    0       0       UNPARTITIONED   NULL    NULL    NULL    NULL
+internal       test_partitions_schema_db       listtable       p1_city NULL    
0       0       LIST    NULL    user_id, city   NULL    (("1", "Beijing"),("1", 
"Shanghai"))
+internal       test_partitions_schema_db       listtable       p2_city NULL    
0       0       LIST    NULL    user_id, city   NULL    (("2", "Beijing"),("2", 
"Shanghai"))
+internal       test_partitions_schema_db       listtable       p3_city NULL    
0       0       LIST    NULL    user_id, city   NULL    (("3", "Beijing"),("3", 
"Shanghai"))
+internal       test_partitions_schema_db       randomtable     randomtable     
NULL    0       0       UNPARTITIONED   NULL    NULL    NULL    NULL
+internal       test_partitions_schema_db       test_range_table        p0      
NULL    0       0       RANGE   NULL    col_1   NULL    [('-2147483648'), ('4'))
+internal       test_partitions_schema_db       test_range_table        p1      
NULL    0       0       RANGE   NULL    col_1   NULL    [('4'), ('6'))
+internal       test_partitions_schema_db       test_range_table        p100    
NULL    0       0       RANGE   NULL    col_1   NULL    [('83647'), 
('2147483647'))
+internal       test_partitions_schema_db       test_range_table        p2      
NULL    0       0       RANGE   NULL    col_1   NULL    [('6'), ('7'))
+internal       test_partitions_schema_db       test_range_table        p3      
NULL    0       0       RANGE   NULL    col_1   NULL    [('7'), ('8'))
+internal       test_partitions_schema_db       test_range_table        p4      
NULL    0       0       RANGE   NULL    col_1   NULL    [('8'), ('10'))
+internal       test_partitions_schema_db       test_range_table        p5      
NULL    0       0       RANGE   NULL    col_1   NULL    [('10'), ('83647'))
+internal       test_partitions_schema_db       test_row_column_page_size1      
test_row_column_page_size1      NULL    0       0       UNPARTITIONED   NULL    
NULL    NULL    NULL
+internal       test_partitions_schema_db       test_row_column_page_size2      
test_row_column_page_size2      NULL    0       0       UNPARTITIONED   NULL    
NULL    NULL    NULL
 
 -- !select_check_2 --
-internal       test_partitions_schema_db       duplicate_table duplicate_table 
NULL    0       0       UNPARTITIONED   NULL    NULL    NULL    NULL    -1      
0       0       0       0       0       0                       
-internal       test_partitions_schema_db       listtable       p1_city NULL    
0       0       LIST    NULL    user_id, city   NULL    (("1", "Beijing"),("1", 
"Shanghai"))    -1      0       0       0       0       0       0               
        
-internal       test_partitions_schema_db       listtable       p2_city NULL    
0       0       LIST    NULL    user_id, city   NULL    (("2", "Beijing"),("2", 
"Shanghai"))    -1      0       0       0       0       0       0               
        
-internal       test_partitions_schema_db       listtable       p3_city NULL    
0       0       LIST    NULL    user_id, city   NULL    (("3", "Beijing"),("3", 
"Shanghai"))    -1      0       0       0       0       0       0               
        
-internal       test_partitions_schema_db       randomtable     randomtable     
NULL    0       0       UNPARTITIONED   NULL    NULL    NULL    NULL    -1      
0       0       0       0       0       0                       
-internal       test_partitions_schema_db       test_range_table        p0      
NULL    0       0       RANGE   NULL    col_1   NULL    [('-2147483648'), 
('4'))        9       636     5728    0       0       0       0                 
      
-internal       test_partitions_schema_db       test_range_table        p1      
NULL    0       0       RANGE   NULL    col_1   NULL    [('4'), ('6'))  2       
959     1919    0       0       0       0                       
-internal       test_partitions_schema_db       test_range_table        p100    
NULL    0       0       RANGE   NULL    col_1   NULL    [('83647'), 
('2147483647'))     4       735     2941    0       0       0       0           
            
-internal       test_partitions_schema_db       test_range_table        p2      
NULL    0       0       RANGE   NULL    col_1   NULL    [('6'), ('7'))  1       
975     975     0       0       0       0                       
-internal       test_partitions_schema_db       test_range_table        p3      
NULL    0       0       RANGE   NULL    col_1   NULL    [('7'), ('8'))  1       
959     959     0       0       0       0                       
-internal       test_partitions_schema_db       test_range_table        p4      
NULL    0       0       RANGE   NULL    col_1   NULL    [('8'), ('10')) 3       
948     2846    0       0       0       0                       
-internal       test_partitions_schema_db       test_range_table        p5      
NULL    0       0       RANGE   NULL    col_1   NULL    [('10'), ('83647'))     
0       0       0       0       0       0       0                       
-internal       test_partitions_schema_db       test_row_column_page_size1      
test_row_column_page_size1      NULL    0       0       UNPARTITIONED   NULL    
NULL    NULL    NULL    -1      0       0       0       0       0       0       
                
+internal       test_partitions_schema_db       duplicate_table duplicate_table 
NULL    0       0       UNPARTITIONED   NULL    NULL    NULL    NULL
+internal       test_partitions_schema_db       listtable       p1_city NULL    
0       0       LIST    NULL    user_id, city   NULL    (("1", "Beijing"),("1", 
"Shanghai"))
+internal       test_partitions_schema_db       listtable       p2_city NULL    
0       0       LIST    NULL    user_id, city   NULL    (("2", "Beijing"),("2", 
"Shanghai"))
+internal       test_partitions_schema_db       listtable       p3_city NULL    
0       0       LIST    NULL    user_id, city   NULL    (("3", "Beijing"),("3", 
"Shanghai"))
+internal       test_partitions_schema_db       randomtable     randomtable     
NULL    0       0       UNPARTITIONED   NULL    NULL    NULL    NULL
+internal       test_partitions_schema_db       test_range_table        p0      
NULL    0       0       RANGE   NULL    col_1   NULL    [('-2147483648'), ('4'))
+internal       test_partitions_schema_db       test_range_table        p1      
NULL    0       0       RANGE   NULL    col_1   NULL    [('4'), ('6'))
+internal       test_partitions_schema_db       test_range_table        p100    
NULL    0       0       RANGE   NULL    col_1   NULL    [('83647'), 
('2147483647'))
+internal       test_partitions_schema_db       test_range_table        p2      
NULL    0       0       RANGE   NULL    col_1   NULL    [('6'), ('7'))
+internal       test_partitions_schema_db       test_range_table        p3      
NULL    0       0       RANGE   NULL    col_1   NULL    [('7'), ('8'))
+internal       test_partitions_schema_db       test_range_table        p4      
NULL    0       0       RANGE   NULL    col_1   NULL    [('8'), ('10'))
+internal       test_partitions_schema_db       test_range_table        p5      
NULL    0       0       RANGE   NULL    col_1   NULL    [('10'), ('83647'))
+internal       test_partitions_schema_db       test_row_column_page_size1      
test_row_column_page_size1      NULL    0       0       UNPARTITIONED   NULL    
NULL    NULL    NULL
 
 -- !select_check_3 --
 
diff --git 
a/regression-test/suites/query_p0/system/test_partitions_schema.groovy 
b/regression-test/suites/query_p0/system/test_partitions_schema.groovy
index 0215bc87567..0cf83d67e66 100644
--- a/regression-test/suites/query_p0/system/test_partitions_schema.groovy
+++ b/regression-test/suites/query_p0/system/test_partitions_schema.groovy
@@ -20,7 +20,12 @@ import static java.util.concurrent.TimeUnit.SECONDS
 
 suite("test_partitions_schema") {
     def dbName = "test_partitions_schema_db"
-    def listOfColum = 
"TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PARTITION_NAME,SUBPARTITION_NAME,PARTITION_ORDINAL_POSITION,SUBPARTITION_ORDINAL_POSITION,PARTITION_METHOD,SUBPARTITION_METHOD,PARTITION_EXPRESSION,SUBPARTITION_EXPRESSION,PARTITION_DESCRIPTION,TABLE_ROWS,AVG_ROW_LENGTH,DATA_LENGTH,MAX_DATA_LENGTH,INDEX_LENGTH,DATA_FREE,CHECKSUM,PARTITION_COMMENT,NODEGROUP,TABLESPACE_NAME";
+    // row count skipped in common validation
+    // if table report not done for the all tablet 
+    // row count will be -1 if done can get actual data.
+    // so we added one check waiting for rowcount and all other case we 
skipped row count
+    // checkpoint.
+    def listOfColum = 
"TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PARTITION_NAME,SUBPARTITION_NAME,PARTITION_ORDINAL_POSITION,SUBPARTITION_ORDINAL_POSITION,PARTITION_METHOD,SUBPARTITION_METHOD,PARTITION_EXPRESSION,SUBPARTITION_EXPRESSION,PARTITION_DESCRIPTION";
     sql "drop database if exists ${dbName}"
     sql "CREATE DATABASE IF NOT EXISTS ${dbName}"
     sql "use ${dbName}"
@@ -156,11 +161,12 @@ suite("test_partitions_schema") {
             "row_store_page_size" = "8190"
         );
     """
-    qt_select_check_1 """select  $listOfColum from 
information_schema.partitions where table_schema=\"${dbName}\" order by 
$listOfColum"""
+    
+    order_qt_select_check_1 """select $listOfColum from 
information_schema.partitions where table_schema=\"${dbName}\""""
     sql """
         drop table test_row_column_page_size2;
     """    
-    qt_select_check_2 """select  $listOfColum from 
information_schema.partitions where table_schema=\"${dbName}\" order by 
$listOfColum"""
+    order_qt_select_check_2 """select $listOfColum from 
information_schema.partitions where table_schema=\"${dbName}\""""
 
     def user = "partitions_user"
     sql "DROP USER IF EXISTS ${user}"
@@ -179,7 +185,7 @@ suite("test_partitions_schema") {
     def url=tokens[0] + "//" + tokens[2] + "/" + "information_schema" + "?"
 
     connect(user=user, password='123abc!@#', url=url) {
-           qt_select_check_3 """select  $listOfColum from 
information_schema.partitions where table_schema=\"${dbName}\" order by 
$listOfColum"""
+        order_qt_select_check_3 """select $listOfColum from 
information_schema.partitions where table_schema=\"${dbName}\""""
     }
 
     sql "GRANT SELECT_PRIV ON ${dbName}.duplicate_table  TO ${user}"


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to