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 {