morningman commented on code in PR #32551:
URL: https://github.com/apache/doris/pull/32551#discussion_r1535006515


##########
fe/fe-core/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java:
##########
@@ -931,24 +946,30 @@ public Partition appendPartition(String dbName, String 
tableName, String partNam
   @Override
   public Partition appendPartition(String catName, String dbName, String 
tableName,
                                    String name) throws TException {
-    Partition p = client.append_partition_by_name(prependCatalogToDbName(
-        catName, dbName, conf), tableName, name);
+    if (hiveVersion == HiveVersion.V3_0) {
+      dbName = prependCatalogToDbName(dbName, conf);
+    }
+    Partition p = client.append_partition_by_name(dbName, tableName, name);
     return deepCopy(p);
   }
 
   @Override
   public Partition appendPartition(String catName, String dbName, String 
tableName,
                                    List<String> partVals) throws TException {
-    Partition p = client.append_partition(prependCatalogToDbName(
-        catName, dbName, conf), tableName, partVals);
+    if (hiveVersion == HiveVersion.V3_0) {
+      dbName = prependCatalogToDbName(dbName, conf);
+    }
+    Partition p = client.append_partition(dbName, tableName, partVals);
     return deepCopy(p);
   }
 
   @Deprecated
   public Partition appendPartition(String dbName, String tableName, 
List<String> partVals,
                                    EnvironmentContext ec) throws TException {
-    return 
client.append_partition_with_environment_context(prependCatalogToDbName(dbName, 
conf),
-        tableName, partVals, ec).deepCopy();
+    if (hiveVersion == HiveVersion.V3_0) {
+      dbName = prependCatalogToDbName(dbName, conf);

Review Comment:
   Unify to `prependCatalogToDbNameByVersion`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to