codope commented on code in PR #7301:
URL: https://github.com/apache/hudi/pull/7301#discussion_r1034738277


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieBaseRelation.scala:
##########
@@ -140,18 +140,14 @@ abstract class HoodieBaseRelation(val sqlContext: 
SQLContext,
    */
   protected lazy val (tableAvroSchema: Schema, internalSchemaOpt: 
Option[InternalSchema]) = {
     val schemaResolver = new TableSchemaResolver(metaClient)
-    val internalSchemaOpt = if (!isSchemaEvolutionEnabled) {
-      None
-    } else {
-      Try {
-        
specifiedQueryTimestamp.map(schemaResolver.getTableInternalSchemaFromCommitMetadata)
-          .getOrElse(schemaResolver.getTableInternalSchemaFromCommitMetadata)
-      } match {
-        case Success(internalSchemaOpt) => toScalaOption(internalSchemaOpt)
-        case Failure(e) =>
-          logWarning("Failed to fetch internal-schema from the table", e)
-          None
-      }
+    val internalSchemaOpt = Try {
+      
specifiedQueryTimestamp.map(schemaResolver.getTableInternalSchemaFromCommitMetadata)

Review Comment:
   @fuyun2024 Can you please create a JIRA for this change? This does not look 
like a minor change.
   
   Here, commit metadata will always be scanned. Previously, it would be 
scanned only when schema evolution was enabled.



-- 
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]

Reply via email to