huaxingao commented on code in PR #4831:
URL: https://github.com/apache/iceberg/pull/4831#discussion_r884404593
##########
parquet/src/main/java/org/apache/iceberg/parquet/Parquet.java:
##########
@@ -292,11 +317,39 @@ public <D> FileAppender<D> build() throws IOException {
.withRowGroupSize(rowGroupSize)
.withPageSize(pageSize)
.withDictionaryPageSize(dictionaryPageSize)
- .build(),
+ // TODO: add .withMaxBloomFilterBytes(bloomFilterMaxBytes) once
ParquetWriter.Builder supports it
+ .withBloomFilterEnabled(bloomFilterEnabled);
+
+ for (Map.Entry<String, String> entry :
columnBloomFilterEnabled.entrySet()) {
+ String colPath = entry.getKey();
+ String bloomEnabled = entry.getValue();
+ parquetWriteBuilder.withBloomFilterEnabled(colPath,
Boolean.valueOf(bloomEnabled));
+ }
+
+ for (Map.Entry<String, String> entry :
columnBloomFilterNDVs.entrySet()) {
+ String colPath = entry.getKey();
+ String numDistinctValue = entry.getValue();
+ parquetWriteBuilder.withBloomFilterNDV(colPath,
Long.valueOf(numDistinctValue));
+ }
+
+ return new ParquetWriteAdapter<>(
+ parquetWriteBuilder.build(),
metricsConfig);
}
}
+ private static Map<String, String> getBloomColumnConfigMap(String prefix,
Map<String, String> config) {
Review Comment:
You mean to remove `get`, right? Changed to `bloomColumnConfigMap`.
--
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]