You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2019/08/08 20:08:57 UTC

[GitHub] [incubator-iceberg] rdblue commented on a change in pull request #365: test cases for parquetMetrics with multiple rowgroup

rdblue commented on a change in pull request #365: test cases for parquetMetrics with multiple rowgroup
URL: https://github.com/apache/incubator-iceberg/pull/365#discussion_r312220843
 
 

 ##########
 File path: core/src/test/java/org/apache/iceberg/TestMetrics.java
 ##########
 @@ -270,6 +276,141 @@ public void testMetricsForNullColumns() throws IOException {
     assertBounds(1, IntegerType.get(), null, null, metrics);
   }
 
+  @Test
+  public void testMetricsForTopLevelWithMultipleRG() throws Exception {
+    Schema schema = getSimpleSchema();
+    int minimumRowGroupRecordCount = 100;
+    List<GenericData.Record> records = new ArrayList<>(201);
+
+    GenericData.Record firstRecord = new GenericData.Record(AvroSchemaUtil.convert(schema.asStruct()));
+    firstRecord.put("booleanCol", true);
+    firstRecord.put("intCol", 1);
+    // adding 1st element as null
+    firstRecord.put("longCol", null);
+    firstRecord.put("floatCol", 1.0F);
+    // adding 1st element as null
+    firstRecord.put("doubleCol", null);
+    // adding 1st element as null
+    firstRecord.put("decimalCol", null);
+    firstRecord.put("stringCol", "AAA");
+    firstRecord.put("dateCol", 1);
+    firstRecord.put("timeCol", 1L);
+    firstRecord.put("timestampCol", 1L);
+    firstRecord.put("uuidCol", uuid);
+    firstRecord.put("fixedCol", fixed);
+    firstRecord.put("binaryCol", "S".getBytes());
+    records.add(firstRecord);
+
+    for (int i = 0; i < minimumRowGroupRecordCount * 2; i++) {
 
 Review comment:
   Why use a multiplier?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org