You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/07/02 02:19:09 UTC
[GitHub] [hudi] leesf commented on a diff in pull request #6017: [HUDI-4276] Reconcile schema-inject null values for missing fields and add new fields
leesf commented on code in PR #6017:
URL: https://github.com/apache/hudi/pull/6017#discussion_r912308590
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/BaseHoodieWriteClient.java:
##########
@@ -276,15 +276,21 @@ private void saveInternalSchema(HoodieTable table, String instantTime, HoodieCom
TableSchemaResolver schemaUtil = new TableSchemaResolver(table.getMetaClient());
String historySchemaStr = schemaUtil.getTableHistorySchemaStrFromCommitMetadata().orElse("");
FileBasedInternalSchemaStorageManager schemasManager = new FileBasedInternalSchemaStorageManager(table.getMetaClient());
- if (!historySchemaStr.isEmpty()) {
- InternalSchema internalSchema = InternalSchemaUtils.searchSchema(Long.parseLong(instantTime),
- SerDeHelper.parseSchemas(historySchemaStr));
+ if (!historySchemaStr.isEmpty() || Boolean.parseBoolean(config.getString("hoodie.datasource.write.reconcile.schema"))) {
Review Comment:
would use RECONCILE_SCHEMA.key() to replace the `"hoodie.datasource.write.reconcile.schema"`
--
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-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org