From fc2ebe0327f1125d4b6fd3a1e65f969f6754aae7 Mon Sep 17 00:00:00 2001 From: dongkelun Date: Fri, 7 Jan 2022 14:02:46 +0800 Subject: [PATCH] [HUDI-3192] Spark metastore schema evolution broken --- .../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 f8b015714f959..b37b28ed27636 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 @@ private boolean syncSchema(String tableName, boolean tableExists, boolean useRea 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 {