flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From li...@apache.org
Subject [flink] 02/02: [FLINK-23168][hive] HiveCatalog shouldn't merge properties for alter DB operation
Date Fri, 02 Jul 2021 12:51:32 GMT
This is an automated email from the ASF dual-hosted git repository.

lirui pushed a commit to branch release-1.13
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 2075d0facdcfbac9f3f060e8b274dd485f365829
Author: Rui Li <lirui@apache.org>
AuthorDate: Wed Jun 30 20:53:27 2021 +0800

    [FLINK-23168][hive] HiveCatalog shouldn't merge properties for alter DB operation
    
    This closes #16335
---
 .../main/java/org/apache/flink/table/catalog/hive/HiveCatalog.java | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalog.java
b/flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalog.java
index 6574fba..e6bb77e 100644
--- a/flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalog.java
+++ b/flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalog.java
@@ -1758,7 +1758,6 @@ public class HiveCatalog extends AbstractCatalog {
     }
 
     private static Database alterDatabase(Database hiveDB, CatalogDatabase newDatabase) {
-        Map<String, String> params = hiveDB.getParameters();
         Map<String, String> newParams = newDatabase.getProperties();
         String opStr = newParams.remove(ALTER_DATABASE_OP);
         if (opStr == null) {
@@ -1770,11 +1769,7 @@ public class HiveCatalog extends AbstractCatalog {
                 SqlAlterHiveDatabase.AlterHiveDatabaseOp.valueOf(opStr);
         switch (op) {
             case CHANGE_PROPS:
-                if (params == null) {
-                    hiveDB.setParameters(newParams);
-                } else {
-                    params.putAll(newParams);
-                }
+                hiveDB.setParameters(newParams);
                 break;
             case CHANGE_LOCATION:
                 hiveDB.setLocationUri(newLocation);

Mime
View raw message