[HUDI-4333] fix HoodieFileIndex's listFiles method log print skipping percent NaN (#5990)
This commit is contained in:
@@ -162,9 +162,9 @@ case class HoodieFileIndex(spark: SparkSession,
|
|||||||
PartitionDirectory(InternalRow.fromSeq(partition.values), candidateFiles)
|
PartitionDirectory(InternalRow.fromSeq(partition.values), candidateFiles)
|
||||||
}
|
}
|
||||||
|
|
||||||
logInfo(s"Total base files: ${totalFileSize}; " +
|
logInfo(s"Total base files: $totalFileSize; " +
|
||||||
s"candidate files after data skipping : ${candidateFileSize}; " +
|
s"candidate files after data skipping : $candidateFileSize; " +
|
||||||
s"skipping percent ${if (allFiles.nonEmpty) (totalFileSize - candidateFileSize) / totalFileSize.toDouble else 0}")
|
s"skipping percent ${if (allFiles.nonEmpty && totalFileSize > 0) (totalFileSize - candidateFileSize) / totalFileSize.toDouble else 0}")
|
||||||
|
|
||||||
result
|
result
|
||||||
}
|
}
|
||||||
@@ -264,7 +264,7 @@ case class HoodieFileIndex(spark: SparkSession,
|
|||||||
private def validateConfig(): Unit = {
|
private def validateConfig(): Unit = {
|
||||||
if (isDataSkippingEnabled && (!isMetadataTableEnabled || !isColumnStatsIndexEnabled)) {
|
if (isDataSkippingEnabled && (!isMetadataTableEnabled || !isColumnStatsIndexEnabled)) {
|
||||||
logWarning("Data skipping requires both Metadata Table and Column Stats Index to be enabled as well! " +
|
logWarning("Data skipping requires both Metadata Table and Column Stats Index to be enabled as well! " +
|
||||||
s"(isMetadataTableEnabled = ${isMetadataTableEnabled}, isColumnStatsIndexEnabled = ${isColumnStatsIndexEnabled}")
|
s"(isMetadataTableEnabled = $isMetadataTableEnabled, isColumnStatsIndexEnabled = $isColumnStatsIndexEnabled")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user