wombatu-kun commented on code in PR #16585:
URL: https://github.com/apache/iceberg/pull/16585#discussion_r3369372312


##########
parquet/src/test/java/org/apache/iceberg/parquet/TestVariantMetrics.java:
##########
@@ -479,6 +486,45 @@ public void testShreddedObjectFieldTypeMismatch() throws 
IOException {
         .isEqualTo(Map.of(1, Types.LongType.get(), 2, 
Types.VariantType.get()));
   }
 
+  @Test
+  public void testShreddedValueColumnWithEmptyStats() throws IOException {
+    // typed bounds are dropped when value-column stats are missing on a 
shredded variant
+    OutputFile out = new InMemoryOutputFile();
+    GenericRecord record = GenericRecord.create(SCHEMA);
+
+    VariantShreddingFunction shredding =
+        (id, name) -> ParquetVariantUtil.toParquetSchema(Variants.of((byte) 
0));
+    MessageType parquetSchema = ParquetSchemaUtil.convert(SCHEMA, "table", 
shredding);
+    ParquetProperties props = 
ParquetProperties.builder().withStatisticsEnabled(false).build();
+
+    // Parquet.write() cannot disable stats on variant sub-columns (no field 
IDs)
+    ParquetWriter<Record> writer =
+        new ParquetWriter<>(

Review Comment:
   This call passes 12 arguments, but `ParquetWriter`'s constructor now takes 
13: #16327 (merged 2026-06-07, after this PR's checks last ran) appended a 
trailing `boolean trackUncompressedSize`, and `Parquet.write()` already calls 
the 13-arg form (see `Parquet.java:456-469`). The green checks here ran against 
a base predating #16327, so they do not reflect this; after rebasing on main 
the test will fail to compile. Append the new argument (`false`) as the 13th 
parameter.



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