pengzhiwei2018 commented on a change in pull request #2651:
URL: https://github.com/apache/hudi/pull/2651#discussion_r601225876
##########
File path:
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/hudi/DefaultSource.scala
##########
@@ -79,39 +81,52 @@ class DefaultSource extends RelationProvider
val allPaths = path.map(p => Seq(p)).getOrElse(Seq()) ++ readPaths
val fs = FSUtils.getFs(allPaths.head,
sqlContext.sparkContext.hadoopConfiguration)
- val globPaths = HoodieSparkUtils.checkAndGlobPathIfNecessary(allPaths, fs)
-
- val tablePath = DataSourceUtils.getTablePath(fs, globPaths.toArray)
+ // Use the HoodieFileIndex only if the 'path' has specified with no "*"
contains.
+ // And READ_PATHS_OPT_KEY has not specified.
+ // Or else we use the original way to read hoodie table.
+ val useHoodieFileIndex = path.isDefined && !path.get.contains("*") &&
Review comment:
Hi @vinothchandar , Currently user query the hoodie table must specify
some "*" at the path. If the path has not specified the "*", the old way of
query hoodie table may not work(exception or get no data). So we must use the
`HoodieFileIndex` for this case by default.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]