This is an automated email from the ASF dual-hosted git repository.
codope pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git
The following commit(s) were added to refs/heads/master by this push:
new d2cca29546 [MINOR] Fix wrong key to determine sync sql cascade (#6339)
d2cca29546 is described below
commit d2cca295462f5fc5d657477afa3c3c5330d3072d
Author: Shiyan Xu <[email protected]>
AuthorDate: Tue Aug 9 05:24:29 2022 -0500
[MINOR] Fix wrong key to determine sync sql cascade (#6339)
---
.../src/main/java/org/apache/hudi/hive/ddl/QueryBasedDDLExecutor.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/ddl/QueryBasedDDLExecutor.java
b/hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/ddl/QueryBasedDDLExecutor.java
index 43dcc0d217..ea39dba7d0 100644
---
a/hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/ddl/QueryBasedDDLExecutor.java
+++
b/hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/ddl/QueryBasedDDLExecutor.java
@@ -100,7 +100,7 @@ public abstract class QueryBasedDDLExecutor implements
DDLExecutor {
try {
String newSchemaStr = HiveSchemaUtil.generateSchemaString(newSchema,
config.getSplitStrings(META_SYNC_PARTITION_FIELDS),
config.getBoolean(HIVE_SUPPORT_TIMESTAMP_TYPE));
// Cascade clause should not be present for non-partitioned tables
- String cascadeClause =
config.getSplitStrings(HIVE_SUPPORT_TIMESTAMP_TYPE).size() > 0 ? " cascade" :
"";
+ String cascadeClause =
config.getSplitStrings(META_SYNC_PARTITION_FIELDS).size() > 0 ? " cascade" : "";
StringBuilder sqlBuilder = new StringBuilder("ALTER TABLE
").append(HIVE_ESCAPE_CHARACTER)
.append(databaseName).append(HIVE_ESCAPE_CHARACTER).append(".")
.append(HIVE_ESCAPE_CHARACTER).append(tableName)