Fokko commented on code in PR #5275:
URL: https://github.com/apache/iceberg/pull/5275#discussion_r922395078
##########
core/src/main/java/org/apache/iceberg/rest/responses/LoadTableResponse.java:
##########
@@ -37,6 +42,56 @@
*/
public class LoadTableResponse implements RESTResponse {
+ private static final String METADATA_LOCATION = "metadata-location";
+ private static final String METADATA = "metadata";
+ private static final String CONFIG = "config";
+
+ public static void toJson(LoadTableResponse loadTable, JsonGenerator
generator) throws IOException {
+ generator.writeStartObject();
+
+ generator.writeStringField(METADATA_LOCATION, loadTable.metadataLocation);
+
+ generator.writeFieldName(METADATA);
+ TableMetadataParser.toJson(loadTable.metadata, generator);
+
+ generator.writeObjectFieldStart(CONFIG);
+ for (Map.Entry<String, String> keyValue : loadTable.config.entrySet()) {
+ generator.writeStringField(keyValue.getKey(), keyValue.getValue());
Review Comment:
I copied this from the `TableMetadataParser` 🙈 Browsing through the code, I
don't see any null checks.
--
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]