rdblue commented on code in PR #5435:
URL: https://github.com/apache/iceberg/pull/5435#discussion_r939698212
##########
parquet/src/main/java/org/apache/iceberg/parquet/Parquet.java:
##########
@@ -231,6 +241,46 @@ private WriteBuilder createContextFunc(
return this;
}
+ private void setBloomFilterConfig(
+ Context context, BiConsumer<String, Boolean> withBloomFilterEnabled) {
+ Splitter dotSplitter = Splitter.on('.');
+ Joiner dotJoiner = Joiner.on(".");
+ context
+ .columnBloomFilterEnabled()
+ .forEach(
+ (columnPath, value) -> {
+ // check the column exists and support bloom filter
+ Types.NestedField field =
schema.caseInsensitiveFindField(columnPath);
+ if (field == null) {
+ LOG.warn(
+ "Invalid bloom filter column configuration, field: {} is
not found in the schema: {}, "
+ + "this column configuration will be ignored.",
+ columnPath,
+ schema);
+ return;
+ }
+ Type fieldType = field.type();
+ // doesn't support boolean, list, map, struct type
+ if (!fieldType.isPrimitiveType()
+ || fieldType.typeId().equals(Type.TypeID.BOOLEAN)) {
+ LOG.warn(
+ "Invalid bloom filter column configuration: field {} is
of type '{}' which cannot "
+ + "benefit from a bloom filter. This column
configuration will be ignored.",
+ columnPath,
+ fieldType);
Review Comment:
I don't think this is worth checking.
--
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]