Skip to content

OpenAI: IRC spec changes for v4 [WIP][Discuss] - #17543

Draft
dhruvarya-db wants to merge 2 commits into
apache:mainfrom
dhruvarya-db:rest-spec-v4-support
Draft

OpenAI: IRC spec changes for v4 [WIP][Discuss]#17543
dhruvarya-db wants to merge 2 commits into
apache:mainfrom
dhruvarya-db:rest-spec-v4-support

Conversation

@dhruvarya-db

@dhruvarya-db dhruvarya-db commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

[WIP] PR to drive discussion around the changes needed in the IRC spec for V4 tables.

These changes are needed because:

  1. A V4 table has an Adaptive Metadata node at the root instead of the manifest-list. The Snapshot must contain one of manifest-list or content-root now.
  2. metadata-location is now optional because it won't be set for catalog-managed tables
  3. table-location -- metadata can contain relative paths now, this field will be used to specify the absolute path of the table.

Opening this to drive discussion on what the REST catalog spec needs for
format version 4. It is a proposal rather than a merge candidate: parts of it
depend on table spec changes that are still in review, and one change is
deliberately breaking. Details and open questions below.

Format version 4 restructures table metadata, and three constraints in the
current spec prevent a catalog from serving a v4 table at all: format-version
is capped at 3, Snapshot requires manifest-list, and CommitTableResponse
requires metadata-location.

Changes:

- TableMetadata: raise the format-version maximum to 4, and document that
  location is optional in v4, where it may be supplied by the catalog rather
  than carried in metadata.

- Snapshot: add root-manifest and make manifest-list optional, with a oneOf
  requiring exactly one of the two. A snapshot with neither is invalid and must
  not be read as a snapshot with no files. Which of the two applies is
  determined by format-version, which cannot be expressed here because that
  field lives in the enclosing TableMetadata, so it is stated normatively.

- LoadTableResult and CommitTableResponse: add table-location, which carries the
  table's base location for resolving relative paths. Format version 4 makes
  TableMetadata.location optional while allowing relative paths, so a table can
  have metadata that is unreadable without a catalog-supplied base.
  CommitTableResponse no longer requires metadata-location, and both responses
  document that it may be absent when the catalog is the source of truth for
  table state and no client-visible metadata pointer exists.

- UnregisterTableResult: add table-location, so the endpoint that hands back a
  metadata location cannot return metadata with no base to resolve against.

- Move the table endpoints to /v2. Every path whose response can carry table
  metadata moves: tables, tables/{table}, register, and tables/{table}/unregister.

Open questions:

- root-manifest is not in the ratified spec. It comes from the adaptive metadata
  tree proposal (apache#16025), which is still open, so the field name and shape may
  change. Note also that SnapshotParser currently writes manifest-list for v4
  tables, so the oneOf as written would reject snapshots this repository
  produces today. Whether to keep the field, defer it, or make it purely
  additive is the main thing worth discussing.

- Moving the table endpoints to /v2 rather than adding /v2 alongside /v1 is a
  breaking change, and assumes v1 is no longer supported. An additive version
  that leaves /v1 in place is the obvious alternative if that assumption does
  not hold.

- Whether path versioning is the right mechanism at all, versus a header or a
  content-type parameter.

- Relative path support and the typed content stats are already in the spec for
  v4; snapshot offloading is not yet, and would interact with the snapshots
  query parameter on loadTable if it lands later.

make lint and make generate both pass.
Renames the field from root-manifest to content-root, and follows the name in
the surrounding descriptions so the prose matches ("the snapshot's content
root" rather than "the snapshot's root manifest").

make lint and make generate both pass, and the generated model picks up the
rename in both oneOf branches.
@dhruvarya-db dhruvarya-db changed the title OpenAPI: REST catalog support for table format version 4 [WIP][Discuss] IRC spec changes for v4 Aug 7, 2026
@dhruvarya-db dhruvarya-db changed the title [WIP][Discuss] IRC spec changes for v4 OpenAI: IRC spec changes for v4 [WIP][Discuss] Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant