huaxiangsun commented on code in PR #12771:
URL: https://github.com/apache/iceberg/pull/12771#discussion_r2053387227


##########
parquet/src/main/java/org/apache/iceberg/parquet/Parquet.java:
##########
@@ -306,33 +308,29 @@ private WriteBuilder createContextFunc(
       return this;
     }
 
+    // Utility method to get the column path
+    private String getParquetColumnPath(Map<Integer, String> 
fieldIdToParquetPath, String colPath) {
+      Types.NestedField fieldId = schema.findField(colPath);
+      if (fieldId == null) {
+        return null;
+      }
+
+      return fieldIdToParquetPath.get(fieldId.fieldId());
+    }
+
     private void setBloomFilterConfig(
         Context context,
-        MessageType parquetSchema,
+        Map<Integer, String> fieldIdToParquetPath,
         BiConsumer<String, Boolean> withBloomFilterEnabled,
         BiConsumer<String, Double> withBloomFilterFPP) {
 
-      Map<Integer, String> fieldIdToParquetPath =
-          parquetSchema.getColumns().stream()
-              .filter(col -> col.getPrimitiveType().getId() != null)
-              .collect(
-                  Collectors.toMap(
-                      col -> col.getPrimitiveType().getId().intValue(),
-                      col -> String.join(".", col.getPath())));
-
       context
           .columnBloomFilterEnabled()
           .forEach(
               (colPath, isEnabled) -> {
-                Types.NestedField fieldId = schema.findField(colPath);
-                if (fieldId == null) {
-                  LOG.warn("Skipping bloom filter config for missing field: 
{}", colPath);

Review Comment:
   I added the original behavior back by passing a configStr to 
getParquetColumnPath(). 



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to