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

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


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 4511d3e9008 [cherry-pick](branch2.1) fix unstable case of partitions 
(#40886)
4511d3e9008 is described below

commit 4511d3e9008b63ee0eb48bcd5e6cbd574860eb05
Author: Vallish Pai <vallish...@gmail.com>
AuthorDate: Wed Sep 18 07:19:24 2024 +0530

    [cherry-pick](branch2.1) fix unstable case of partitions (#40886)
    
    ## Proposed changes
    
    Issue Number: close #xxx
    backport #40861
---
 .../query_p0/system/test_partitions_schema.out     | 56 +++++++++++-----------
 .../query_p0/system/test_partitions_schema.groovy  | 14 ++++--
 2 files changed, 38 insertions(+), 32 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 ffe2a9cb667..898384e7793 100644
--- a/regression-test/data/query_p0/system/test_partitions_schema.out
+++ b/regression-test/data/query_p0/system/test_partitions_schema.out
@@ -9,40 +9,40 @@ 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    0       
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"))    0       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"))    0       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"))    0       0       0       0       0       0       0               
        
-internal       test_partitions_schema_db       randomtable     randomtable     
NULL    0       0       UNPARTITIONED   NULL    NULL    NULL    NULL    0       
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    0       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    0       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    0       
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"))    0       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"))    0       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"))    0       0       0       0       0       0       0               
        
-internal       test_partitions_schema_db       randomtable     randomtable     
NULL    0       0       UNPARTITIONED   NULL    NULL    NULL    NULL    0       
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    0       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 --
 
 -- !select_check_4 --
-internal       test_partitions_schema_db       duplicate_table duplicate_table 
NULL    0       0       UNPARTITIONED   NULL    NULL    NULL    NULL    0       
0       0       0       0       0       0                       
+internal       test_partitions_schema_db       duplicate_table duplicate_table 
NULL    0       0       UNPARTITIONED   NULL    NULL    NULL    NULL
 
 -- !select_check_5 --
 
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 ac73d3315d0..41446d2d0e1 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