bvaradar commented on code in PR #10373:
URL: https://github.com/apache/hudi/pull/10373#discussion_r1446861389
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieFileIndex.scala:
##########
@@ -111,6 +111,9 @@ case class HoodieFileIndex(spark: SparkSession,
*/
@transient private lazy val functionalIndex = new
FunctionalIndexSupport(spark, metadataConfig, metaClient)
+ private val enableHoodieExtension =
"org.apache.spark.sql.hudi.HoodieSparkSessionExtension"
Review Comment:
As per
https://spark.apache.org/docs/latest/api/java/org/apache/spark/sql/SparkSessionExtensions.html
: ```The extensions can also be used by setting the Spark SQL configuration
property spark.sql.extensions. Multiple extensions can be set using a
comma-separated list```
Instead of equalsIgnoreCase, can you use contains() API
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieFileIndex.scala:
##########
@@ -408,7 +411,15 @@ case class HoodieFileIndex(spark: SparkSession,
override def inputFiles: Array[String] =
getAllFiles().map(_.getPath.toString).toArray
- override def sizeInBytes: Long = getTotalCachedFilesSize
+ override def sizeInBytes: Long = {
+ val size = getTotalCachedFilesSize
+ if (size == 0 && !enableHoodieExtension) {
Review Comment:
Add logger.warn about adding the config property ?
--
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]