amogh-jahagirdar commented on code in PR #8723: URL: https://github.com/apache/iceberg/pull/8723#discussion_r1347411761
########## core/src/main/java/org/apache/iceberg/view/ViewMetadataParser.java: ########## @@ -66,7 +67,9 @@ static void toJson(ViewMetadata metadata, JsonGenerator gen) throws IOException gen.writeStringField(VIEW_UUID, metadata.uuid()); gen.writeNumberField(FORMAT_VERSION, metadata.formatVersion()); gen.writeStringField(LOCATION, metadata.location()); - JsonUtil.writeStringMap(PROPERTIES, metadata.properties(), gen); + if (!metadata.properties().isEmpty()) { Review Comment: > We could still send an empty collection here for views, but we still need to adjust the read-side to not require properties Yeah I'm on board with this @nastra. Checking on the read side is expected since properties is optional as per the spec. I think any Iceberg library parser should write out "richer" metadata even if it's empty. It makes it easy for someone to look at the metadata file and see the state (rather than determine a field is missing). Also minor point in this case, it simplifies the code to just write out the field. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org