You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2024/02/19 09:24:03 UTC
(doris) 03/18: [fix](iceberg) iceberg hms support hive1 (#30985)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
commit a7037df9a1b0a96e0cd403ef948c96296bd84271
Author: wangtao <em...@foxmail.com>
AuthorDate: Sun Feb 18 15:27:32 2024 +0800
[fix](iceberg) iceberg hms support hive1 (#30985)
---
.../hadoop/hive/metastore/HiveMetaStoreClient.java | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/fe/fe-core/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java b/fe/fe-core/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
index 3fd0379194f..1de756ce803 100644
--- a/fe/fe-core/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
+++ b/fe/fe-core/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
@@ -1819,12 +1819,19 @@ public class HiveMetaStoreClient implements IMetaStoreClient, AutoCloseable {
@Override
public List<Table> getTableObjectsByName(String catName, String dbName,
List<String> tableNames) throws TException {
- GetTablesRequest req = new GetTablesRequest(dbName);
- req.setCatName(catName);
- req.setTblNames(tableNames);
- req.setCapabilities(version);
- List<Table> tabs = client.get_table_objects_by_name_req(req).getTables();
- return deepCopyTables(filterHook.filterTables(tabs));
+ List<Table> tabs = new ArrayList<>();
+ if (hiveVersion == HiveVersion.V1_0 || hiveVersion == HiveVersion.V2_0) {
+ for (String tableName: tableNames) {
+ tabs.add(client.get_table(dbName, tableName));
+ }
+ } else {
+ GetTablesRequest req = new GetTablesRequest(dbName);
+ req.setCatName(catName);
+ req.setTblNames(tableNames);
+ req.setCapabilities(version);
+ tabs = client.get_table_objects_by_name_req(req).getTables();
+ }
+ return deepCopyTables(filterHook.filterTables(tabs));
}
@Override
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org