From baa06af6080ac9a3b129f7f19c213fa116fd1be9 Mon Sep 17 00:00:00 2001 From: morningman Date: Fri, 6 Sep 2024 15:04:55 +0800 Subject: [PATCH] 2 --- .../org/apache/doris/tablefunction/MetadataGenerator.java | 1 + .../data/query_p0/system/test_partitions_schema.out | 2 +- .../suites/query_p0/system/test_partitions_schema.groovy | 6 ++++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/tablefunction/MetadataGenerator.java b/fe/fe-core/src/main/java/org/apache/doris/tablefunction/MetadataGenerator.java index 4bd0610ab925cd..7b588804ec4684 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/tablefunction/MetadataGenerator.java +++ b/fe/fe-core/src/main/java/org/apache/doris/tablefunction/MetadataGenerator.java @@ -1470,6 +1470,7 @@ private static TRow generatePartitionsRowForUnpartitionedTable(String ctlName, S trow.addToColumnValue(new TCell().setStringVal("")); // PARTITION_COMMENT (not available) trow.addToColumnValue(new TCell().setStringVal("")); // NODEGROUP (not available) trow.addToColumnValue(new TCell().setStringVal("")); // TABLESPACE_NAME (not available) + return trow; } private static TFetchSchemaTableDataResult partitionsMetadataResult(TSchemaTableRequestParams params) { 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 ea82818d2ab2b0..9df87f3003e232 100644 --- a/regression-test/data/query_p0/system/test_partitions_schema.out +++ b/regression-test/data/query_p0/system/test_partitions_schema.out @@ -42,7 +42,7 @@ internal test_partitions_schema_db test_row_column_page_size1 test_row_column_pa -- !select_check_3 -- -- !select_check_4 -- -internal test_partitions_schema_db duplicate_table duplicate_table NULL 0 0 UNPARTITIONED NULL NULL NULL NULL -1 0 0 0 0 0 0 +duplicate_table -- !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 ac73d3315d0dfb..cc830835ec9511 100644 --- a/regression-test/suites/query_p0/system/test_partitions_schema.groovy +++ b/regression-test/suites/query_p0/system/test_partitions_schema.groovy @@ -63,6 +63,8 @@ suite("test_partitions_schema") { sql """ sync """ + sql """analyze table test_range_table with sync""" + // check row count here will wait 1 min before BE report checkRowCount(9); qt_select_check_0 """select table_name,partition_name,table_rows from information_schema.partitions where table_schema=\"${dbName}\" order by $listOfColum""" @@ -184,12 +186,12 @@ suite("test_partitions_schema") { sql "GRANT SELECT_PRIV ON ${dbName}.duplicate_table TO ${user}" connect(user=user, password='123abc!@#', url=url) { - qt_select_check_4 """select $listOfColum from information_schema.partitions where table_schema=\"${dbName}\" order by $listOfColum""" + qt_select_check_4 """select TABLE_NAME from information_schema.partitions where table_schema=\"${dbName}\" order by $listOfColum""" } sql "REVOKE SELECT_PRIV ON ${dbName}.duplicate_table FROM ${user}" connect(user=user, password='123abc!@#', url=url) { - qt_select_check_5 """select $listOfColum from information_schema.partitions where table_schema=\"${dbName}\" order by $listOfColum""" + qt_select_check_5 """select TABLE_NAME from information_schema.partitions where table_schema=\"${dbName}\" order by $listOfColum""" } }