Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions regression-test/data/query_p0/system/test_partitions_schema.out
Original file line number Diff line number Diff line change
Expand Up @@ -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 --

Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down Expand Up @@ -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}"
Expand All @@ -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}"
Expand Down