morningman commented on code in PR #14134: URL: https://github.com/apache/doris/pull/14134#discussion_r1020384937
########## fe/fe-core/src/main/java/org/apache/doris/datasource/PooledHiveMetaStoreClient.java: ########## @@ -62,49 +64,56 @@ public List<String> getAllDatabases() { try (CachedClient client = getClient()) { return client.client.getAllDatabases(); } catch (Exception e) { - throw new RuntimeException(e); + throw new HMSClientException("failed to get all database from hms client", e); } } public List<String> getAllTables(String dbName) { try (CachedClient client = getClient()) { return client.client.getAllTables(dbName); } catch (Exception e) { - throw new RuntimeException(e); + throw new HMSClientException("failed to get all tables for db %s", e, dbName); } } public boolean tableExists(String dbName, String tblName) { try (CachedClient client = getClient()) { return client.client.tableExists(dbName, tblName); } catch (Exception e) { - throw new RuntimeException(e); + throw new HMSClientException("failed to check if table %s in db %s exists", e, tblName, dbName); + } + } + + public List<String> listPartitionNames(String dbName, String tblName) { + try (CachedClient client = getClient()) { + return client.client.listPartitionNames(dbName, tblName, MAX_LIST_PARTITION_NUM); Review Comment: I tested and yes, it will only return partitions up to the limit, and the result will be wrong. I will find a way to handle this later. -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org