bvaradar commented on code in PR #8303: URL: https://github.com/apache/hudi/pull/8303#discussion_r1180087583
########## hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/DefaultSource.scala: ########## @@ -271,6 +273,25 @@ object DefaultSource { } } + private def resolveHoodieBootstrapRelation(sqlContext: SQLContext, + globPaths: Seq[Path], + userSchema: Option[StructType], + metaClient: HoodieTableMetaClient, + parameters: Map[String, String]): BaseRelation = { + val enableFileIndex = HoodieSparkConfUtils.getConfigValue(parameters, sqlContext.sparkSession.sessionState.conf, + ENABLE_HOODIE_FILE_INDEX.key, ENABLE_HOODIE_FILE_INDEX.defaultValue.toString).toBoolean + val isSchemaEvolutionEnabledOnRead = HoodieSparkConfUtils.getConfigValue(parameters, + sqlContext.sparkSession.sessionState.conf, DataSourceReadOptions.SCHEMA_EVOLUTION_ENABLED.key, + DataSourceReadOptions.SCHEMA_EVOLUTION_ENABLED.defaultValue.toString).toBoolean + if (!enableFileIndex || isSchemaEvolutionEnabledOnRead + || globPaths.nonEmpty || !parameters.getOrElse(DATA_QUERIES_ONLY.key, DATA_QUERIES_ONLY.defaultValue).toBoolean) { Review Comment: Also, How are we ensuring that for MOR, the behavior is unchanged ? ########## hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/DefaultSource.scala: ########## @@ -271,6 +273,25 @@ object DefaultSource { } } + private def resolveHoodieBootstrapRelation(sqlContext: SQLContext, + globPaths: Seq[Path], + userSchema: Option[StructType], + metaClient: HoodieTableMetaClient, + parameters: Map[String, String]): BaseRelation = { + val enableFileIndex = HoodieSparkConfUtils.getConfigValue(parameters, sqlContext.sparkSession.sessionState.conf, + ENABLE_HOODIE_FILE_INDEX.key, ENABLE_HOODIE_FILE_INDEX.defaultValue.toString).toBoolean + val isSchemaEvolutionEnabledOnRead = HoodieSparkConfUtils.getConfigValue(parameters, + sqlContext.sparkSession.sessionState.conf, DataSourceReadOptions.SCHEMA_EVOLUTION_ENABLED.key, + DataSourceReadOptions.SCHEMA_EVOLUTION_ENABLED.defaultValue.toString).toBoolean + if (!enableFileIndex || isSchemaEvolutionEnabledOnRead + || globPaths.nonEmpty || !parameters.getOrElse(DATA_QUERIES_ONLY.key, DATA_QUERIES_ONLY.defaultValue).toBoolean) { Review Comment: Can you explain why globPaths.nonEmpty is included here. Not following it. -- 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: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org