rdblue commented on a change in pull request #2048:
URL: https://github.com/apache/iceberg/pull/2048#discussion_r558646291



##########
File path: 
spark/src/test/java/org/apache/iceberg/spark/source/TestWriteMetricsConfig.java
##########
@@ -228,6 +230,23 @@ public void testCustomMetricCollectionForParquet() throws 
IOException {
     }
   }
 
+  @Test
+  public void testBadCustomMetricCollectionForParquet() throws IOException {
+    String tableLocation = temp.newFolder("iceberg-table").toString();
+
+    HadoopTables tables = new HadoopTables(CONF);
+    PartitionSpec spec = PartitionSpec.unpartitioned();
+    Map<String, String> properties = Maps.newHashMap();
+    properties.put(TableProperties.DEFAULT_WRITE_METRICS_MODE, "counts");
+    properties.put("write.metadata.metrics.column.ids", "full");
+
+    AssertHelpers.assertThrows("Creating a table with invalid metrics should 
fail",
+        ValidationException.class,
+        null,
+        () -> tables.create(SIMPLE_SCHEMA, spec, properties, tableLocation));
+  }
+
+

Review comment:
       Nit: extra newline.




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

Reply via email to