Skip to content

Commit e5185ab

Browse files
sundapengclaude
andcommitted
[core] Fix RestPartitionsTableTest by creating table through catalog API
testPartitionPredicateFilterMultiColumnKeys created MultiPartTable directly via filesystem (SchemaUtils.forceCommit), which works for local catalog but fails for REST catalog since it's unaware of tables created outside its API. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6ab7f9c commit e5185ab

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

paimon-core/src/test/java/org/apache/paimon/table/system/PartitionsTableTest.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,6 @@ public void testPartitionPredicateFilterNonPartitionColumn() throws Exception {
226226
@Test
227227
public void testPartitionPredicateFilterMultiColumnKeys() throws Exception {
228228
String testTableName = "MultiPartTable";
229-
FileIO fileIO = LocalFileIO.create();
230-
Path tablePath = new Path(String.format("%s/%s.db/%s", warehouse, database, testTableName));
231229
Schema schema =
232230
Schema.newBuilder()
233231
.column("pk", DataTypes.INT())
@@ -239,10 +237,9 @@ public void testPartitionPredicateFilterMultiColumnKeys() throws Exception {
239237
.option(CoreOptions.CHANGELOG_PRODUCER.key(), "input")
240238
.option("bucket", "1")
241239
.build();
242-
TableSchema tableSchema =
243-
SchemaUtils.forceCommit(new SchemaManager(fileIO, tablePath), schema);
244-
FileStoreTable multiTable =
245-
FileStoreTableFactory.create(LocalFileIO.create(), tablePath, tableSchema);
240+
Identifier multiTableId = identifier(testTableName);
241+
catalog.createTable(multiTableId, schema, true);
242+
FileStoreTable multiTable = (FileStoreTable) catalog.getTable(multiTableId);
246243

247244
Identifier multiPartitionsTableId =
248245
identifier(testTableName + SYSTEM_TABLE_SPLITTER + PartitionsTable.PARTITIONS);

0 commit comments

Comments
 (0)