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


##########
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:
   After further thought, I'd take @xndai's suggestion to split the `Validate` 
part into another PR, and move it out of `json_serde.cc` which should focus on 
json serde and is already quite bloated.



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