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/09/16 05:47:43 UTC

[GitHub] [hudi] xushiyan commented on a diff in pull request #6537: [HUDI-4762] Avoid update metastore schema if only missing column in input

xushiyan commented on code in PR #6537:
URL: https://github.com/apache/hudi/pull/6537#discussion_r972634507


##########
hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/HiveSyncTool.java:
##########
@@ -286,7 +286,11 @@ private boolean syncSchema(String tableName, boolean tableExists, boolean useRea
           config.getBooleanOrDefault(HIVE_SUPPORT_TIMESTAMP_TYPE));
       if (!schemaDiff.isEmpty()) {
         LOG.info("Schema difference found for " + tableName);
-        syncClient.updateTableSchema(tableName, schema);
+        if (!schemaDiff.getAddColumnTypes().isEmpty() || !schemaDiff.getUpdateColumnTypes().isEmpty()) {

Review Comment:
   we should always keep schema up to date. when later data written with old schema, https://hudi.apache.org/docs/configurations#hoodiedatasourcewritereconcileschema this config is to adapt the data into the new schema. so i don't think we should skip update 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