From 4f6cdd73a352bee132213438e6d11a8aef56de8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=8F=AF=E4=BC=A6?= Date: Sat, 8 Jan 2022 10:48:37 +0800 Subject: [PATCH] [HUDI-3192] Spark metastore schema evolution broken (#4533) --- .../src/main/java/org/apache/hudi/hive/HiveSyncTool.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/HiveSyncTool.java b/hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/HiveSyncTool.java index f8b015714..b37b28ed2 100644 --- a/hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/HiveSyncTool.java +++ b/hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/HiveSyncTool.java @@ -251,9 +251,9 @@ public class HiveSyncTool extends AbstractSyncTool { LOG.info("Schema difference found for " + tableName); hoodieHiveClient.updateTableDefinition(tableName, schema); // Sync the table properties if the schema has changed - if (cfg.tableProperties != null) { + if (cfg.tableProperties != null || cfg.syncAsSparkDataSourceTable) { hoodieHiveClient.updateTableProperties(tableName, tableProperties); - LOG.info("Sync table properties for " + tableName + ", table properties is: " + cfg.tableProperties); + LOG.info("Sync table properties for " + tableName + ", table properties is: " + tableProperties); } schemaChanged = true; } else {