[core] Add catalog name to Catalog and Table fullName#7494
Open
Zouxxyy wants to merge 1 commit intoapache:masterfrom
Open
[core] Add catalog name to Catalog and Table fullName#7494Zouxxyy wants to merge 1 commit intoapache:masterfrom
Zouxxyy wants to merge 1 commit intoapache:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds catalog name propagation so Table.fullName() can include the catalog prefix (catalog.database.table), improving clarity in multi-catalog logs/UI while keeping some callers compatible.
Changes:
- Introduce
Catalog.name()and propagate catalog name throughCatalogContext→CatalogEnvironment→AbstractFileStoreTable.fullName(). - Update Spark/Flink catalog creation paths to pass catalog name into
CatalogContext. - Adjust identifier parsing and multiple tests to reflect/handle the new 3-part naming.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| paimon-spark/paimon-spark-ut/src/test/scala/org/apache/paimon/spark/sql/V2WriteRequireDistributionTest.scala | Update plan-string assertions to include catalog prefix in table full name. |
| paimon-spark/paimon-spark-ut/src/test/scala/org/apache/paimon/spark/sql/DescribeTableTestBase.scala | Add test validating FileStoreTable.fullName() includes catalog name. |
| paimon-spark/paimon-spark-ut/src/test/scala/org/apache/paimon/spark/sql/DDLWithHiveCatalogTestBase.scala | Update expectations to catalog.db.table full name. |
| paimon-spark/paimon-spark-common/src/main/java/org/apache/paimon/spark/SparkCatalog.java | Pass Spark catalog name into CatalogContext. |
| paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/sink/listener/MockCustomPartitionMarkDoneAction.java | Switch mock action from fullName() to name() to keep prior behavior. |
| paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/sink/listener/CustomPartitionMarkDoneActionTest.java | Update assertion to match mock using table name only. |
| paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/action/MarkPartitionDoneActionITCase.java | Update expected marked-done payload to use table name variable instead of fullName(). |
| paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/FlinkGenericCatalogFactory.java | Pass catalog name into CatalogContext for Flink generic catalog. |
| paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/FlinkCatalogFactory.java | Pass catalog name into CatalogContext for Flink catalog. |
| paimon-core/src/test/java/org/apache/paimon/rest/RESTCatalogServer.java | Include catalog name when constructing CatalogEnvironment in tests. |
| paimon-core/src/test/java/org/apache/paimon/operation/PartitionExpireTest.java | Update CatalogEnvironment constructor call to include new catalogName parameter. |
| paimon-core/src/test/java/org/apache/paimon/catalog/CatalogFactoryTest.java | Update CatalogContext.create call for new catalogName parameter. |
| paimon-core/src/main/java/org/apache/paimon/table/Table.java | Update fullName() JavaDoc to mention optional catalog prefix. |
| paimon-core/src/main/java/org/apache/paimon/table/CatalogEnvironment.java | Add catalogName field, accessor, copy behavior, and bump serialVersionUID. |
| paimon-core/src/main/java/org/apache/paimon/table/AbstractFileStoreTable.java | Implement fullName() to prefix catalog name when present. |
| paimon-core/src/main/java/org/apache/paimon/rest/RESTCatalog.java | Propagate catalog name into REST catalog context. |
| paimon-core/src/main/java/org/apache/paimon/partition/actions/HttpReportMarkDoneAction.java | Strip catalog prefix from fullName() to preserve old db.table behavior. |
| paimon-core/src/main/java/org/apache/paimon/catalog/DelegateCatalog.java | Delegate Catalog.name() to wrapped catalog. |
| paimon-core/src/main/java/org/apache/paimon/catalog/CatalogUtils.java | Pass catalog.name() into CatalogEnvironment when loading tables. |
| paimon-core/src/main/java/org/apache/paimon/catalog/Catalog.java | Add nullable default name() method to catalog interface. |
| paimon-core/src/main/java/org/apache/paimon/catalog/AbstractCatalog.java | Implement Catalog.name() via CatalogContext.catalogName(). |
| paimon-common/src/main/java/org/apache/paimon/rest/RESTTokenFileIO.java | Propagate catalog name into REST token file IO context creation. |
| paimon-common/src/main/java/org/apache/paimon/fs/ResolvingFileIO.java | Preserve catalog name when wrapping catalog context in resolving file IO. |
| paimon-common/src/main/java/org/apache/paimon/catalog/CatalogContext.java | Add catalogName field + overloads/accessor to carry catalog identity. |
| paimon-api/src/main/java/org/apache/paimon/catalog/Identifier.java | Extend Identifier.fromString() to accept 3-part names by ignoring catalog prefix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
paimon-api/src/main/java/org/apache/paimon/catalog/Identifier.java
Outdated
Show resolved
Hide resolved
e82e3db to
a3a81a2
Compare
a3a81a2 to
7740038
Compare
7740038 to
d8df515
Compare
JingsongLi
reviewed
Mar 21, 2026
|
|
||
| /** Full name of the table, default is database.tableName. */ | ||
| /** | ||
| * Full name of the table, default is database.tableName or catalog.database.tableName if |
Contributor
There was a problem hiding this comment.
I think this is a bit of a big change. It's not compatible and some systems already rely on it. Can we just modify the Spark side and pass the catalogName?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Add catalog name to
Table.fullName()so it returnscatalog.database.tableformat. This helps users identify which catalog a table belongs to in UI and logs, making it easier to diagnose issues in multi-catalog environments.Catalog.name(), propagated viaCatalogContext→CatalogEnvironment→AbstractFileStoreTable.fullName()CatalogContextTests
DescribeTableTestBase,DDLWithHiveCatalogTestBase,V2WriteRequireDistributionTestAPI and Format
Cataloginterface: added@Nullable String name()Table.fullName()may now return 3-part nameCatalogEnvironmentserialVersionUID bumped to 3Documentation
No.
Generative AI tooling
Generated-by: Kiro (Claude Opus 4.6)