pvary commented on code in PR #12771:
URL: https://github.com/apache/iceberg/pull/12771#discussion_r2046473813
##########
parquet/src/test/java/org/apache/iceberg/parquet/TestParquet.java:
##########
@@ -219,6 +221,50 @@ public void testTwoLevelList() throws IOException {
assertThat(recordRead.get("topbytes")).isEqualTo(expectedBinary);
}
+ @Test
+ public void testColumnStatisticsEnabled() throws Exception {
+ Schema schema =
+ new Schema(
+ optional(1, "int_field", IntegerType.get()),
+ optional(2, "string_field", Types.StringType.get()));
+
+ File file = createTempFile(temp);
+
+ List<GenericData.Record> records = Lists.newArrayListWithCapacity(5);
+ org.apache.avro.Schema avroSchema =
AvroSchemaUtil.convert(schema.asStruct());
+ for (int i = 1; i <= 5; i++) {
+ GenericData.Record record = new GenericData.Record(avroSchema);
+ record.put("int_field", i);
+ record.put("string_field", "test");
+ records.add(record);
+ }
+
+ write(
+ file,
+ schema,
+ ImmutableMap.<String, String>builder()
+ .put(PARQUET_COLUMN_STATS_ENABLED_PREFIX + "int_field", "true")
Review Comment:
We should add this to the Iceberg documentation as well. So users will be
aware of the parquet issue, and don't expect it to work.
--
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]