pengzhiwei2018 commented on a change in pull request #2651:
URL: https://github.com/apache/hudi/pull/2651#discussion_r599297507
##########
File path:
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/hudi/DefaultSource.scala
##########
@@ -162,18 +184,26 @@ class DefaultSource extends RelationProvider
override def shortName(): String = "hudi"
- private def getBaseFileOnlyView(sqlContext: SQLContext,
+ private def getBaseFileOnlyView(useHoodieFileIndex: Boolean,
+ sqlContext: SQLContext,
optParams: Map[String, String],
schema: StructType,
+ tablePath: String,
extraReadPaths: Seq[String],
- isBootstrappedTable: Boolean,
- globPaths: Seq[Path],
metaClient: HoodieTableMetaClient):
BaseRelation = {
log.warn("Loading Base File Only View.")
+ if (useHoodieFileIndex) {
+ val fileIndex = HoodieFileIndex(sqlContext.sparkSession, tablePath,
+ if (schema == null) Option.empty[StructType] else Some(schema),
optParams)
- if (isBootstrappedTable) {
- // For bootstrapped tables, use our custom Spark relation for querying
- new HoodieBootstrapRelation(sqlContext, schema, globPaths, metaClient,
optParams)
+ log.info("Constructing hoodie (as parquet) data source with options :" +
optParams)
Review comment:
I am ok about this!
--
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]