difin commented on code in PR #5529:
URL: https://github.com/apache/hive/pull/5529#discussion_r1843004734


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/IcebergTableUtil.java:
##########
@@ -458,6 +458,52 @@ public static List<DeleteFile> getDeleteFiles(Table table, 
String partitionPath)
         t -> ((PositionDeletesScanTask) t).file()));
   }
 
+  public static float getFileSizeRatio(Table table, String partitionPath, long 
fileSizeInBytesThreshold) {

Review Comment:
   > it does nothing with the file actual size, rather it check the number of 
files.
   The method uses the actual file sizes, it checks for each file if its actual 
size is above or below the threshold and returns `(number of files whose size 
is below threshold) / (total number of files)`.
   I think `getUncompactedRatio` is fine, I will rename like that.
   



##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/IcebergTableUtil.java:
##########
@@ -458,6 +458,52 @@ public static List<DeleteFile> getDeleteFiles(Table table, 
String partitionPath)
         t -> ((PositionDeletesScanTask) t).file()));
   }
 
+  public static float getFileSizeRatio(Table table, String partitionPath, long 
fileSizeInBytesThreshold) {

Review Comment:
   > it does nothing with the file actual size, rather it check the number of 
files.
   
   The method uses the actual file sizes, it checks for each file if its actual 
size is above or below the threshold and returns `(number of files whose size 
is below threshold) / (total number of files)`.
   I think `getUncompactedRatio` is fine, I will rename like that.
   



-- 
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: gitbox-unsubscr...@hive.apache.org

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


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

Reply via email to