stevenzwu commented on code in PR #16144:
URL: https://github.com/apache/iceberg/pull/16144#discussion_r3209651146
##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -2267,6 +2267,27 @@ components:
type: string
nullable: false
+ CatalogObjectIdentifier:
+ description:
+ Reference to a catalog object (table, view, or namespace) as an
+ ordered list of hierarchical levels.
+ The object kind is determined by context (e.g. the endpoint or a
+ companion CatalogObjectType discriminator), not by the identifier
+ structure alone.
+ type: array
+ items:
+ type: string
+ example: [ "accounting", "tax", "paid" ]
+
+ CatalogObjectType:
+ type: string
+ description: |
+ The type of a catalog object.
+ enum:
+ - table
+ - view
+ - namespace
Review Comment:
Updated proposal: drop the shared `CatalogObjectType` and split it into two
narrower closed enums, one per use case.
**Resolve response:** closed enum `[table, view, materialized-view]`. The
relations universe is small enough to enumerate, and pre-listing
`materialized-view` even before MV is implemented means clients ship with the
value already in their schema — no breakage when a server starts returning it.
Trade-off is a maintenance commitment: adding a 4th relational type later (e.g.
`external-table`, `streaming-view`) becomes a coordinated spec change rather
than a transparent extension.
**Events filter:** closed enum on the request body. Client picks values from
its own schema; server rejects unknowns with a clear error. No codegen-breakage
concern, since the field never carries server-originated values back to old
clients.
**Events response:** no separate `object-type` discriminator needed. The
events spec ([#12584](https://github.com/apache/iceberg/pull/12584)) already
defines an operation-type enum (`create-table`, `drop-view`, etc.) on each
event, which implicitly encodes the kind of object the event is about.
**Naming:** two independent named schemas — `RelationType` near the resolve
endpoint, `EventObjectType` (or similar) near events. Decoupling is the point:
each enum evolves on its own schedule, which is the property the shared
`CatalogObjectType` couldn't deliver.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]