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


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieFileIndex.scala:
##########
@@ -169,26 +169,29 @@ case class HoodieFileIndex(spark: SparkSession,
     val prunedPartitionsAndFilteredFileSlices = filterFileSlices(dataFilters, 
partitionFilters).map {
       case (partitionOpt, fileSlices) =>
         if (shouldEmbedFileSlices) {
-          val baseFileStatusesAndLogFileOnly: Seq[FileStatus] = 
fileSlices.map(slice => {
-            if (slice.getBaseFile.isPresent) {
+          val logFileEstimationFraction = 
options.getOrElse(HoodieStorageConfig.LOGFILE_TO_PARQUET_COMPRESSION_RATIO_FRACTION.key(),
+            
HoodieStorageConfig.LOGFILE_TO_PARQUET_COMPRESSION_RATIO_FRACTION.defaultValue()).toDouble
+          // 1. Generate a disguised representative file for each file slice, 
which spark uses to optimize rdd partition parallelism based on data such as 
file size

Review Comment:
   > disguised -> delegate?
   
   done~



##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieFileIndex.scala:
##########
@@ -169,26 +169,29 @@ case class HoodieFileIndex(spark: SparkSession,
     val prunedPartitionsAndFilteredFileSlices = filterFileSlices(dataFilters, 
partitionFilters).map {
       case (partitionOpt, fileSlices) =>
         if (shouldEmbedFileSlices) {
-          val baseFileStatusesAndLogFileOnly: Seq[FileStatus] = 
fileSlices.map(slice => {
-            if (slice.getBaseFile.isPresent) {
+          val logFileEstimationFraction = 
options.getOrElse(HoodieStorageConfig.LOGFILE_TO_PARQUET_COMPRESSION_RATIO_FRACTION.key(),
+            
HoodieStorageConfig.LOGFILE_TO_PARQUET_COMPRESSION_RATIO_FRACTION.defaultValue()).toDouble
+          // 1. Generate a disguised representative file for each file slice, 
which spark uses to optimize rdd partition parallelism based on data such as 
file size
+          // For file slice only has base file, we directly use the base file 
size as representative file size
+          // For file slice has log file, we estimate the representative file 
size based on the log file size and option(base file) size
+          val representFiles = fileSlices.map(slice => {

Review Comment:
   > delegateFiles
   
   done



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