Support key-value tag on namespace/table/column
- Dominant language
- Java
- Stars
- 2.1k
- Forks
- 522
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 137
Description
### Is your feature request related to a problem? Please describe.
This proposal defines the initial revision, v1, spec of the Polaris tag contract. v1 is a spec revision, not a wire or protocol version.
Polaris tags classify catalog data for discovery and governance. Each supported catalog object or top-level Iceberg column is a target. v1 supports four target kinds: catalog, namespace, table, and column. A tag definition has a catalog-wide name, allowed values, and the target kinds it may classify. A tag assignment puts one selected value on one target.
API requests use names, but Polaris stores IDs. Renaming a tag definition or target does not move an assignment when its ID stays the same. Columns use the containing table ID together with the Iceberg field ID. V1 does not support column tagging on Iceberg View due to its ephemeral column tracking.
A caller can read assignments stored on one target or ask for the final tags that apply after inheritance. A tag applies only to target kinds listed in its definition. An excluded intermediate kind is skipped; it does not stop inheritance to an allowed descendant. When several assignments for the same tag apply, the closest one wins.
Tags do not decide access in v1. An authorizer is a built-in or external component that returns allow or deny. A later authorizer could reuse the same definitions, assignments, and inheritance rules.
### Describe the solution you'd like
Google Doc: https://docs.google.com/document/d/1rIJGzcsmGhfrBiRXPac51hr-jeJuuKQQBYjgBdOb9-k/edit?tab=t.0#heading=h.f5t9zwllv9kx
Dev ML: https://lists.apache.org/list?dev@polaris.apache.org:lte=1M:[DISCUSS]%20Polaris%20Tag%20Spec%20design%20proposal%20for%20community%20review
### Describe alternatives you've considered
_No response_
### Additional context
Last updates:
- PR1: API contract (https://github.com/apache/polaris/pull/5366): **ready for review**
- PR2: Definition CRUD (https://github.com/apache/polaris/pull/5391): **open as Draft, ready for review if PR1 LGTY**
- **LATEST!** PR3: Assignment writes and storage (https://github.com/apache/polaris/pull/5469): **open as Draft, ready for review if PR2 LGTY**
- PR4: Reads, inheritance, and reverse lookup: **planned**
Contributor guide
Assessment
This issue has not been assessed yet.