Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions open-api/rest-catalog-open-api.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,18 @@ class TableIdentifier(BaseModel):
name: str


class CatalogObjectIdentifier(RootModel[list[str]]):
"""
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 type discriminator), not by the identifier structure alone.
"""

root: list[str] = Field(
...,
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 type discriminator), not by the identifier structure alone.',
examples=[['accounting', 'tax', 'paid']],
)


class PrimitiveType(RootModel[str]):
root: str = Field(..., examples=[['long', 'string', 'fixed[16]', 'decimal(10,2)']])

Expand Down
11 changes: 11 additions & 0 deletions open-api/rest-catalog-open-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2267,6 +2267,17 @@ components:
type: string
nullable: false

CatalogObjectIdentifier:
description:
Reference to a catalog object (table, view, or namespace) as an
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add "for example" to the list, so we don't need to maintain it if we add functions, indexes etc.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Reworded to "Reference to a catalog object (for example, table, view, or namespace)" so the list reads as illustrative and doesn't need to be maintained as new kinds (functions, indexes, etc.) are added. Pushed in 9c2ed0a.

ordered list of hierarchical levels.
The object kind is determined by context (e.g. the endpoint or a
companion type discriminator), not by the identifier structure alone.
type: array
items:
type: string
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we apply any constraints on the table/view/namespace name? For example, no slash(/) is allowed. Given we didn't specify any constraint on the table identifier, it's not a blocker for this PR. We can work on that as a followup. We can also discuss whether we could avoid any constraints in IRC, and relying on the implementations(catalogs, engines) to cast their options.

Copy link
Copy Markdown
Member

@RussellSpitzer RussellSpitzer May 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have previously let folks do whatever they want in string fields and left it up to the implementation to decide whether or not that string is invalid.

example: [ "accounting", "tax", "paid" ]

PrimitiveType:
type: string
example:
Expand Down