bvaradar commented on a change in pull request #4910:
URL: https://github.com/apache/hudi/pull/4910#discussion_r828030393
##########
File path:
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/table/action/commit/SparkMergeHelper.java
##########
@@ -77,14 +89,39 @@ public void runMerge(HoodieTable<T,
JavaRDD<HoodieRecord<T>>, JavaRDD<HoodieKey>
readSchema = mergeHandle.getWriterSchemaWithMetaFields();
}
+ Option<InternalSchema> querySchemaOpt =
SerDeHelper.fromJson(table.getConfig().getInternalSchema());
+ Boolean needToReWriteRecord = false;
+ // to do support bootstrap
+ if (querySchemaOpt.isPresent() &&
!baseFile.getBootstrapBaseFile().isPresent()) {
+ // check implicitly add columns, and position reorder(spark sql may
change cols order)
+ InternalSchema querySchema =
AvroSchemaUtil.evolutionSchemaFromNewAvroSchema(readSchema,
querySchemaOpt.get(), true);
Review comment:
Can we add a short-circuit to avoid performing these steps for
EmptySchema (DummySchema) ? We need to make sure existing flow (when there is
no schema evolution enabled) has minimal/no overhead not just in this place but
everywhere
--
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]