danny0405 commented on code in PR #13070:
URL: https://github.com/apache/hudi/pull/13070#discussion_r2038600409


##########
hudi-common/src/main/java/org/apache/hudi/common/model/FileSlice.java:
##########
@@ -186,4 +186,26 @@ public boolean equals(Object o) {
   public int hashCode() {
     return Objects.hash(fileGroupId, baseInstantTime);
   }
+
+  /**
+   * Get the total file size of a file slice similar on the base file.
+   * For the log file, we need to convert its size to the estimated size 
similar on the base file in a certain proportion
+   */
+  public long getTotalFileSizeSimilarOnBaseFile(double logFileFraction) {
+    long logFileSize = convertLogFilesSizeSimilarOnBaseFile(logFileFraction);
+    return getBaseFile().isPresent() ? getBaseFile().get().getFileSize() + 
logFileSize : logFileSize;
+  }
+
+  private long convertLogFilesSizeSimilarOnBaseFile(double logFileFraction) {

Review Comment:
   still think the original method name is better.



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

Reply via email to