szehon-ho commented on a change in pull request #2240:
URL: https://github.com/apache/iceberg/pull/2240#discussion_r701599134



##########
File path: core/src/main/java/org/apache/iceberg/MetricsConfig.java
##########
@@ -77,6 +79,14 @@ public static MetricsConfig getDefault() {
   }
 
   public static MetricsConfig fromProperties(Map<String, String> props) {
+    return from(props, null);
+  }

Review comment:
       Done

##########
File path: core/src/test/java/org/apache/iceberg/TestMetrics.java
##########
@@ -613,6 +626,99 @@ public void testTruncateBinaryMetricsMode() throws 
IOException {
     assertBounds(1, Types.BinaryType.get(), expectedMinBounds, 
expectedMaxBounds, metrics);
   }
 
+  @Test
+  public void testSortedColumnMetrics() throws IOException {
+    File tableDir = temp.newFolder();
+    tableDir.delete(); // created by table create
+
+    SortOrder sortOrder = SortOrder.builderFor(SIMPLE_SCHEMA)
+        .asc("booleanCol")
+        .asc("intCol")
+        .asc("longCol")
+        .asc("decimalCol")
+        .asc("stringCol")
+        .asc("dateCol").build();
+    PartitionSpec spec = PartitionSpec.unpartitioned();
+    Table table = TestTables.create(tableDir, "test", SIMPLE_SCHEMA, spec, 
sortOrder, FORMAT_V2);

Review comment:
       Originally I wanted to not increase test runtime that much, as metrics 
seemed pretty independent of formatVersion.
   
   Changed to make the tests parameterized to run with v1 and v2, or let me 
know if prefer the original.




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