aokolnychyi commented on a change in pull request #2942:
URL: https://github.com/apache/iceberg/pull/2942#discussion_r711346479
##########
File path: data/src/test/java/org/apache/iceberg/io/TestWriterMetrics.java
##########
@@ -146,4 +153,53 @@ public void verifySortedColMetric() throws Exception {
Assert.assertFalse(upperBounds.containsKey(4));
Assert.assertEquals(3L, (long)
Conversions.fromByteBuffer(Types.LongType.get(), upperBounds.get(5)));
}
+
+ @Test
+ public void testPositionDeleteMetrics() throws IOException {
+ Assume.assumeTrue(fileFormat == FileFormat.PARQUET);
+
+ WriterFactory<T> writerFactory = newWriterFactory(SCHEMA);
+ EncryptedOutputFile outputFile = fileFactory.newOutputFile();
+ PositionDeleteWriter<T> deleteWriter =
writerFactory.newPositionDeleteWriter(outputFile, table.spec(), null);
+
+ try {
Review comment:
I have to actually close the file before calling `toDeleteFile` and
try-with-resource only allows me to reference the writer before it is closed.
Matching the logic in the existing test in this class.
--
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]