ryanrupp commented on a change in pull request #183: Fix reading of Iceberg 
Parquet write properties for row group, page a…
URL: https://github.com/apache/incubator-iceberg/pull/183#discussion_r282574116
 
 

 ##########
 File path: 
parquet/src/test/java/org/apache/iceberg/parquet/TestParquetMetrics.java
 ##########
 @@ -292,14 +290,6 @@ private void assertCounts(int fieldId, long valueCount, 
long nullValueCount, Met
   }
 
   private File writeRecords(Schema schema, Record... records) throws 
IOException {
-    File tmpFolder = temp.newFolder("parquet");
-    String filename = UUID.randomUUID().toString();
-    File file = new File(tmpFolder, FileFormat.PARQUET.addExtension(filename));
-    try (FileAppender<Record> writer = Parquet.write(localOutput(file))
-        .schema(schema)
-        .build()) {
-      writer.addAll(Lists.newArrayList(records));
-    }
-    return file;
+    return TestParquet.writeRecords(temp, schema, Collections.emptyMap(), 
null, records);
 
 Review comment:
   Did a base class here just for convenience so the `@Rule` for the temp 
folder doesn't need to be passed around.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to