Skip to content

Commit c913b2a

Browse files
committed
[fix](regression) Isolate Paimon metadata column fixture
### What problem does this PR solve? Issue Number: close apache#66816 Related PR: apache#67207 Problem Summary: The Paimon metadata-column regression created its cross-file fixture in the shared db1 database before creating the Doris catalog. In parallel External Regression runs, Doris could not discover the newly created table and the suite failed with a table-not-found error. Create the fixture in a suite-owned database, disable Paimon table metadata caching for this catalog, refresh the catalog after Spark commits the files, and query the isolated table with a qualified name while preserving the shared db1 fixtures. ### Release note None ### Check List (For Author) - Test: Regression test - External Regression requires the community Paimon Docker environment and will be rerun in CI - Behavior changed: No - Does this need documentation: No
1 parent a167f4b commit c913b2a

1 file changed

Lines changed: 16 additions & 12 deletions

File tree

‎regression-test/suites/external_table_p0/paimon/test_paimon_file_metadata_columns.groovy‎

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ suite("test_paimon_file_metadata_columns", "p0,external") {
2323
}
2424

2525
String catalogName = "test_paimon_file_metadata_columns"
26+
String dbName = "paimon_file_metadata_columns_db"
2627
String hdfsPort = context.config.otherConfigs.get("hive2HdfsPort")
2728
String externalEnvIp = context.config.otherConfigs.get("externalEnvIp")
2829
String crossFileTable = "file_metadata_cross_file_positions"
@@ -71,31 +72,34 @@ suite("test_paimon_file_metadata_columns", "p0,external") {
7172
}
7273
}
7374

75+
sql """drop catalog if exists ${catalogName}"""
76+
sql """create catalog ${catalogName} properties (
77+
"type" = "paimon",
78+
"paimon.catalog.type" = "filesystem",
79+
"warehouse" = "hdfs://${externalEnvIp}:${hdfsPort}/user/doris/paimon1",
80+
"meta.cache.paimon.table.ttl-second" = "0"
81+
)"""
82+
7483
try {
7584
// Two independent append commits create two physical data files. The selected rows omit
7685
// the first row in each file, so their reported positions must remain physical 1/2 rather
7786
// than being renumbered after filtering or scanner-range splitting.
7887
spark_paimon_multi """
79-
create database if not exists paimon.db1;
80-
drop table if exists paimon.db1.${crossFileTable};
81-
create table paimon.db1.${crossFileTable} (id int, payload string)
88+
create database if not exists paimon.${dbName};
89+
drop table if exists paimon.${dbName}.${crossFileTable};
90+
create table paimon.${dbName}.${crossFileTable} (id int, payload string)
8291
using paimon tblproperties (
8392
'bucket'='1',
8493
'bucket-key'='id',
8594
'file.format'='parquet'
8695
);
87-
insert into paimon.db1.${crossFileTable} values
96+
insert into paimon.${dbName}.${crossFileTable} values
8897
(1, 'first-1'), (2, 'first-2'), (3, 'first-3');
89-
insert into paimon.db1.${crossFileTable} values
98+
insert into paimon.${dbName}.${crossFileTable} values
9099
(4, 'second-1'), (5, 'second-2'), (6, 'second-3');
91100
"""
92101

93-
sql """drop catalog if exists ${catalogName}"""
94-
sql """create catalog ${catalogName} properties (
95-
"type" = "paimon",
96-
"paimon.catalog.type" = "filesystem",
97-
"warehouse" = "hdfs://${externalEnvIp}:${hdfsPort}/user/doris/paimon1"
98-
)"""
102+
sql """refresh catalog ${catalogName}"""
99103
sql """switch ${catalogName}"""
100104
sql """use db1"""
101105
sql """set enable_file_scanner_v2=true"""
@@ -108,7 +112,7 @@ suite("test_paimon_file_metadata_columns", "p0,external") {
108112

109113
def crossFileRows = sql """
110114
select id, `__paimon_file_path`, `__paimon_row_index`
111-
from ${crossFileTable}
115+
from ${dbName}.${crossFileTable}
112116
where id in (2, 3, 5, 6)
113117
order by id
114118
"""

0 commit comments

Comments
 (0)