nssalian commented on code in PR #16585:
URL: https://github.com/apache/iceberg/pull/16585#discussion_r3370073049


##########
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:
   Thanks @wombatu-kun. I authored that PR as well. I rebased here.



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