This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git
The following commit(s) were added to refs/heads/master by this push:
new ef1715e9e9 [test] refactor test in
RESTCatalogTestBase#testListPartitionsWhenMetastorePartitionedIsTrue (#5333)
ef1715e9e9 is described below
commit ef1715e9e9a94b58ade227607edb8312133b214f
Author: Xiaohu <[email protected]>
AuthorDate: Mon Mar 24 13:01:39 2025 +0800
[test] refactor test in
RESTCatalogTestBase#testListPartitionsWhenMetastorePartitionedIsTrue (#5333)
Co-authored-by: xiaohu <[email protected]>
---
.../src/test/java/org/apache/paimon/rest/RESTCatalogServer.java | 6 +++---
.../src/test/java/org/apache/paimon/rest/RESTCatalogTestBase.java | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git
a/paimon-core/src/test/java/org/apache/paimon/rest/RESTCatalogServer.java
b/paimon-core/src/test/java/org/apache/paimon/rest/RESTCatalogServer.java
index 98e11830a2..373d830019 100644
--- a/paimon-core/src/test/java/org/apache/paimon/rest/RESTCatalogServer.java
+++ b/paimon-core/src/test/java/org/apache/paimon/rest/RESTCatalogServer.java
@@ -960,7 +960,7 @@ public class RESTCatalogServer {
response =
new GetTableResponse(
tableMetadata.uuid(),
- identifier.getTableName(),
+ identifier.getObjectName(),
path,
tableMetadata.isExternal(),
tableMetadata.schema().id(),
@@ -1020,8 +1020,8 @@ public class RESTCatalogServer {
case "GET":
List<Partition> partitions = new ArrayList<>();
for (Map.Entry<String, List<Partition>> entry :
tablePartitionsStore.entrySet()) {
- String tableName =
Identifier.fromString(entry.getKey()).getTableName();
- if (tableName.equals(tableIdentifier.getTableName())) {
+ String objectName =
Identifier.fromString(entry.getKey()).getObjectName();
+ if (objectName.equals(tableIdentifier.getObjectName())) {
partitions.addAll(entry.getValue());
}
}
diff --git
a/paimon-core/src/test/java/org/apache/paimon/rest/RESTCatalogTestBase.java
b/paimon-core/src/test/java/org/apache/paimon/rest/RESTCatalogTestBase.java
index 3c8e7938a4..11beccb2a8 100644
--- a/paimon-core/src/test/java/org/apache/paimon/rest/RESTCatalogTestBase.java
+++ b/paimon-core/src/test/java/org/apache/paimon/rest/RESTCatalogTestBase.java
@@ -627,7 +627,7 @@ public abstract class RESTCatalogTestBase extends
CatalogTestBase {
}
commit.commit(write.prepareCommit());
}
-
assertThat(catalog.listPartitions(identifier).stream().map(Partition::spec))
+
assertThat(catalog.listPartitions(branchIdentifier).stream().map(Partition::spec))
.containsExactlyInAnyOrder(partitionSpecs.get(0),
partitionSpecs.get(1));
}