danny0405 commented on code in PR #11914:
URL: https://github.com/apache/hudi/pull/11914#discussion_r1769519079


##########
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/SchemaEvolutionContext.java:
##########
@@ -98,19 +101,63 @@ public SchemaEvolutionContext(InputSplit split, JobConf 
job) throws IOException
   public SchemaEvolutionContext(InputSplit split, JobConf job, 
Option<HoodieTableMetaClient> metaClientOption) throws IOException {
     this.split = split;
     this.job = job;
-    this.metaClient = metaClientOption.isPresent() ? metaClientOption.get() : 
setUpHoodieTableMetaClient();
-    if (this.metaClient == null) {
+    if (!job.getBoolean(HIVE_EVOLUTION_ENABLE, true)) {
+      LOG.info("schema evolution is disabled for split: {}", split);
       internalSchemaOption = Option.empty();
+      this.metaClient = null;
       return;
     }
+    this.metaClient = metaClientOption.isPresent() ? metaClientOption.get() : 
setUpHoodieTableMetaClient();
+    this.internalSchemaOption = getInternalSchemaFromCache();
+    LOG.info("finish init schema evolution for split: {}", split);

Review Comment:
   Do we need this line for debugging? It looks like not very helpful, maybe we 
can switch to DEBUG devel or just remove 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to