aokolnychyi commented on a change in pull request #2403:
URL: https://github.com/apache/iceberg/pull/2403#discussion_r605842258
##########
File path:
core/src/test/java/org/apache/iceberg/hadoop/TestTableSerialization.java
##########
@@ -140,4 +194,21 @@ private static Table getMetaDataTable(Table table,
MetadataTableType type) {
throw new RuntimeException("Could not read object ", e);
}
}
+
+ private void checkTable(Table expected, Table actual, boolean completeCheck)
{
Review comment:
Fixed.
##########
File path: core/src/main/java/org/apache/iceberg/SortOrderParser.java
##########
@@ -50,6 +52,26 @@ public static void toJson(SortOrder sortOrder, JsonGenerator
generator) throws I
generator.writeEndObject();
}
+ public static String toJson(SortOrder sortOrder) {
+ return toJson(sortOrder, false);
+ }
+
+ public static String toJson(SortOrder sortOrder, boolean pretty) {
+ try {
+ StringWriter writer = new StringWriter();
+ JsonGenerator generator = JsonUtil.factory().createGenerator(writer);
+ if (pretty) {
+ generator.useDefaultPrettyPrinter();
+ }
+ toJson(sortOrder, generator);
+ generator.flush();
+ return writer.toString();
+
+ } catch (IOException e) {
+ throw new RuntimeIOException(e);
Review comment:
Fixed.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]