sqd commented on code in PR #16317:
URL: https://github.com/apache/iceberg/pull/16317#discussion_r3588048726


##########
parquet/src/test/java/org/apache/iceberg/parquet/TestParquet.java:
##########
@@ -114,6 +115,38 @@ public void testRowGroupSizeConfigurableWithWriter() 
throws IOException {
     }
   }
 
+  @Test
+  public void rowGroupRowLimitConfigurable() throws IOException {
+    Schema schema = new Schema(optional(1, "intCol", IntegerType.get()));
+
+    int recordCount = 25;
+    int rowGroupRowLimit = 10;
+
+    List<GenericData.Record> records = 
Lists.newArrayListWithCapacity(recordCount);
+    org.apache.avro.Schema avroSchema = 
AvroSchemaUtil.convert(schema.asStruct());
+    for (int i = 1; i <= recordCount; i++) {
+      GenericData.Record record = new GenericData.Record(avroSchema);
+      record.put("intCol", i);
+      records.add(record);
+    }
+
+    File file = createTempFile(temp);
+    write(
+        file,
+        schema,
+        ImmutableMap.of(PARQUET_ROW_GROUP_ROW_LIMIT, 
Integer.toString(rowGroupRowLimit)),
+        ParquetAvroWriter::buildWriter,
+        records.toArray(new GenericData.Record[] {}));
+
+    try (ParquetFileReader reader = 
ParquetFileReader.open(ParquetIO.file(localInput(file)))) {
+      List<BlockMetaData> blocks = reader.getFooter().getBlocks();
+      assertThat(blocks).hasSize(3);
+      for (BlockMetaData block : blocks) {
+        assertThat(block.getRowCount()).isLessThanOrEqualTo(rowGroupRowLimit);
+      }
+    }
+  }

Review Comment:
   They are parallel OR conditions, not layered by priority/precedence.



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

Reply via email to