You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/11/21 22:37:42 UTC
[GitHub] [iceberg] danielcweeks commented on a change in pull request #3592: Core: Add methods to parse TableMetadata from JSON strings
danielcweeks commented on a change in pull request #3592:
URL: https://github.com/apache/iceberg/pull/3592#discussion_r753864659
##########
File path: core/src/main/java/org/apache/iceberg/TableMetadataParser.java
##########
@@ -253,8 +254,42 @@ public static TableMetadata read(FileIO io, InputFile file) {
}
}
- @SuppressWarnings("checkstyle:CyclomaticComplexity")
+ /**
+ * Read TableMetadata from a JSON string.
+ * <p>
+ * The TableMetadata's metadata file location will be unset.
+ *
+ * @param io a FileIO used by {@link Snapshot} instances
+ * @param json a JSON string of table metadata
+ * @return a TableMetadata object
+ */
+ public static TableMetadata fromJson(FileIO io, String json) {
Review comment:
For serializing/deserializing with REST catalog, it would be nice to have an option to parse the metadata and then later bind in the FileIO.
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org