parisni commented on code in PR #8716:
URL: https://github.com/apache/hudi/pull/8716#discussion_r1203415278
##########
hudi-common/src/main/java/org/apache/hudi/io/storage/HoodieBaseParquetWriter.java:
##########
@@ -67,6 +89,22 @@ public HoodieBaseParquetWriter(Path file,
this.recordCountForNextSizeCheck = DEFAULT_MINIMUM_RECORD_COUNT_FOR_CHECK;
}
+ protected void handleParquetBloomFilters(ParquetWriter.Builder
parquetWriterbuilder, Configuration hadoopConf) {
+
parquetWriterbuilder.withBloomFilterEnabled(ParquetOutputFormat.getBloomFilterEnabled(hadoopConf));
+ // inspired from
https://github.com/apache/parquet-mr/blob/master/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetOutputFormat.java#L458-L464
+ hadoopConf.forEach(conf -> {
+ String key = conf.getKey();
+ if (key.startsWith(BLOOM_FILTER_ENABLED)) {
+ String column = key.substring(BLOOM_FILTER_ENABLED.length() + 1,
key.length());
+ parquetWriterbuilder.withBloomFilterEnabled(column,
Boolean.valueOf(conf.getValue()));
Review Comment:
We cannot afford removing the IT test because eventually we shall make sure
the bloom is leveraged by hudi spark datasource reader.
Also the IT test makes sure the parquet writer leverages bloom.
The IT is inspired from spark test
https://github.com/apache/spark/blob/a72d1aa4910c67c3b8b4dd78997818ef6a601875/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFilterSuite.scala#L1977
--
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]