rdblue commented on a change in pull request #183: Fix reading of Iceberg 
Parquet write properties for row group, page a…
URL: https://github.com/apache/incubator-iceberg/pull/183#discussion_r282556166
 
 

 ##########
 File path: parquet/src/main/java/org/apache/iceberg/parquet/Parquet.java
 ##########
 @@ -144,27 +145,20 @@ private CompressionCodecName codec() {
       }
     }
 
-    void forwardConfig(String parquetProperty, String icebergProperty, String 
defaultValue) {
-      String value = config.getOrDefault(icebergProperty, defaultValue);
-      if (value != null) {
-        set(parquetProperty, value);
-      }
-    }
-
     public <D> FileAppender<D> build() throws IOException {
       Preconditions.checkNotNull(schema, "Schema is required");
       Preconditions.checkNotNull(name, "Table name is required and cannot be 
null");
 
       // add the Iceberg schema to keyValueMetadata
       meta("iceberg.schema", SchemaParser.toJson(schema));
 
-      // add Parquet configuration
-      forwardConfig("parquet.block.size",
-          PARQUET_ROW_GROUP_SIZE_BYTES, PARQUET_ROW_GROUP_SIZE_BYTES_DEFAULT);
-      forwardConfig("parquet.page.size",
-          PARQUET_PAGE_SIZE_BYTES, PARQUET_PAGE_SIZE_BYTES_DEFAULT);
-      forwardConfig("parquet.dictionary.page.size",
-          PARQUET_DICT_SIZE_BYTES, PARQUET_DICT_SIZE_BYTES_DEFAULT);
+      // Map Iceberg properties to pass down to the Parquet writer
+      int rowGroupSize = Integer.parseInt(config.getOrDefault(
+              PARQUET_ROW_GROUP_SIZE_BYTES, 
PARQUET_ROW_GROUP_SIZE_BYTES_DEFAULT));
 
 Review comment:
   Indentation should use 2 spaces. Continuing indentation should be 4 spaces.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to