pvary commented on code in PR #17337:
URL: https://github.com/apache/iceberg/pull/17337#discussion_r3645607340
##########
core/src/test/java/org/apache/iceberg/rest/responses/TestLoadTableResponse.java:
##########
@@ -162,6 +165,40 @@ public void testRoundTripSerdeWithV3TableMetadata() throws
Exception {
assertRoundTripSerializesEquallyFrom(json, resp);
}
+ @Test
+ public void testRoundTripSerdeWithLabels() throws Exception {
+ String tableMetadataJson =
readTableMetadataInputFile("TableMetadataV2Valid.json");
+ TableMetadata metadata =
+ TableMetadataParser.fromJson(TEST_METADATA_LOCATION,
tableMetadataJson);
+ Labels labels =
+ ImmutableLabels.builder()
+ .object(ImmutableMap.of("owner", "team-a"))
+ .addFields(
+ ImmutableFieldLabels.builder()
+ .fieldId(1)
+ .labels(ImmutableMap.of("classification", "pii"))
+ .build())
+ .build();
+ String json =
+ String.format(
+
"{\"metadata-location\":\"%s\",\"metadata\":%s,\"config\":{\"foo\":\"bar\"},"
Review Comment:
Maybe use text blocks for long json constants here too?
--
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]