laskoviymishka opened a new pull request, #17337:
URL: https://github.com/apache/iceberg/pull/17337

   Reference client implementation for the IRC labels read path, the Java-side 
counterpart to the spec change in #15750.
   
   ## Why
   
   The spec PR (#15750) adds an optional `labels` field to `LoadTableResult` 
and `LoadViewResult`. Without a corresponding client change, `RESTObjectMapper` 
(which sets `FAIL_ON_UNKNOWN_PROPERTIES = false`) silently drops the field on 
deserialization, so labels returned by a catalog are invisible to the Java 
client. This PR makes the reference client able to read and round-trip them.
   
   ## What changed
   
   New `org.apache.iceberg.rest.labels` package (laid out like 
`rest.credentials`):
   
   - `Labels` — `object` (catalog-object-level, flat string map) and `fields` 
(per-field labels).
   - `FieldLabels` — a single field's labels, identified by `field-id`.
   - `LabelsParser` / `FieldLabelsParser` — JSON serialization, symmetric with 
the spec schemas.
   
   Wired an optional `labels` field into `LoadTableResponse` and 
`LoadViewResponse` and their parsers. Labels are omitted from the wire when 
absent, so the change is backward compatible — existing responses serialize 
identically.
   
   ## Tests
   
   - `TestLabelsParser`: round-trips (object-only, fields-only, both), empty 
labels, and `field-id` validation.
   - `roundTripSerdeWithLabels` and `labelsAreOptional` added to 
`TestLoadTableResponseParser` and `TestLoadViewResponseParser`.
   
   ## Notes
   
   - Draft, opened primarily to exercise CI.
   - Depends on the wire shape in #15750; the `object` / `fields` naming 
follows the structure agreed on that PR.
   - Scope is the read path only. The write path (`UpdateLabels`) is a separate 
follow-up, consistent with the spec PR.
   


-- 
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]

Reply via email to