deniskuzZ commented on code in PR #6245:
URL: https://github.com/apache/hive/pull/6245#discussion_r2634363185


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/parquet/VariantUtil.java:
##########
@@ -64,6 +65,15 @@ public static boolean isVariantShreddingEnabled(Map<String, 
String> properties)
     return Boolean.parseBoolean(shreddingEnabled);
   }
 
+  public static boolean shouldUseVariantShredding(Properties tableProps, 
Schema tableSchema) {
+    return isVariantShreddingEnabled(tableProps) && 
hasVariantFields(tableSchema);

Review Comment:
   maybe use `Maps.fromProperties` to avoid code duplication. or create  
ageneric signature UnaryOperator<String> tableProps -> tableProps::getProperty



##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/parquet/VariantUtil.java:
##########
@@ -64,6 +65,15 @@ public static boolean isVariantShreddingEnabled(Map<String, 
String> properties)
     return Boolean.parseBoolean(shreddingEnabled);
   }
 
+  public static boolean shouldUseVariantShredding(Properties tableProps, 
Schema tableSchema) {
+    return isVariantShreddingEnabled(tableProps) && 
hasVariantFields(tableSchema);

Review Comment:
   maybe use `Maps.fromProperties` to avoid code duplication. or create  a 
generic signature UnaryOperator<String> tableProps -> tableProps::getProperty



-- 
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]

Reply via email to