Core: expose labels on the loaded table via SupportsLabels - #17410
Draft
laskoviymishka wants to merge 2 commits into
Draft
Core: expose labels on the loaded table via SupportsLabels#17410laskoviymishka wants to merge 2 commits into
laskoviymishka wants to merge 2 commits into
Conversation
Reference client implementation for the IRC labels read-path spec change (apache#15750). Without it, RESTObjectMapper (which sets FAIL_ON_UNKNOWN_PROPERTIES = false) silently drops the labels field on deserialization, so labels returned by a catalog are invisible to the Java client. New rest.labels package (mirroring rest.credentials): Labels (object + fields sub-scopes, with a shared empty instance) and FieldLabels (per-field, keyed by field-id) value types as immutables interfaces, each with a JSON parser. FieldLabels validates field-id >= 1 and a non-empty labels map, matching Credential. Wire an optional labels field into LoadTableResponse / LoadViewResponse and their parsers. labels() never returns null (empty instance when absent), on LoadViewResponse via a @Value.Default default method so no interface API break is introduced. Labels are omitted from the wire when absent (or empty), so the change is additive and backward compatible.
Builds on the labels read-path serde: make the catalog-provided labels from the load response reachable by consumers. - New SupportsLabels mixin interface (mirroring SupportsDistributedScanPlanning) with a single labels() accessor. - BaseTable implements SupportsLabels via a new constructor that carries an optional Labels; existing constructors default to an empty instance. The field is transient and not copied into SerializableTable, so labels are ephemeral catalog enrichment and are not preserved across table serialization. - RESTSessionCatalog populates labels from the load response for both the plain BaseTable and the server-side scan-planning RESTTable paths, across loadTable, registerTable, and createTable.
laskoviymishka
force-pushed
the
labels-catalog
branch
from
July 29, 2026 11:50
79e2747 to
77ddd7c
Compare
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.
Exposes the catalog-provided labels obtained from the load response on the loaded
Table, so engines and tooling can read them.Stacked on #17337 (the labels read-path serde). Review the top commit — the serde layer belongs to #17337.
What changed
SupportsLabelsmixin interface (mirroringSupportsDistributedScanPlanning) with a singlelabels()accessor.BaseTableimplementsSupportsLabelsvia a new constructor carrying an optionalLabels; existing constructors default to an empty instance. The field is transient and is not copied intoSerializableTable, so labels are ephemeral catalog enrichment and are not preserved across table serialization (driver-side only).RESTSessionCatalogpopulates labels from the load response for both the plainBaseTableand the server-side scan-planningRESTTablepaths, acrossloadTable,registerTable, andcreateTable.Read-only; the write path is out of scope.