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

 ##########
 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:
   Tests shouldn't use methods in other tests because they are hard to keep 
track of. If you want to use the same method, then let's move it to a test 
utility class, or a base 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.
 
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