wgtmac commented on code in PR #1169:
URL: https://github.com/apache/iceberg-cpp/pull/1169#discussion_r4732076648


##########
src/iceberg/json_serde.cc:
##########
@@ -1349,6 +1350,9 @@ Result<EncryptedKey> EncryptedKeyFromJson(const 
nlohmann::json& json) {
 }
 
 Result<nlohmann::json> ToJson(const TableMetadata& table_metadata) {
+  if (auto status = table_metadata.Validate(); !status) {

Review Comment:
   Do we actually need to call this inside `ToJson`? I was supposed to call 
`Validate` inside `FromJson` but ask users to call it out of `ToJson`. Not a 
strong opinion though.



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