AshinGau commented on code in PR #14134: URL: https://github.com/apache/doris/pull/14134#discussion_r1019975478
########## fe/fe-core/src/main/java/org/apache/doris/catalog/external/HMSExternalTable.java: ########## @@ -340,12 +352,28 @@ public Map<String, String> getS3Properties() { return catalog.getCatalogProperty().getS3Properties(); } - public List<Partition> getHivePartitions(ExprNodeGenericFuncDesc hivePartitionPredicate) throws DdlException { - List<Partition> hivePartitions = Lists.newArrayList(); - PooledHiveMetaStoreClient client = ((HMSExternalCatalog) catalog).getClient(); - client.listPartitionsByExpr(remoteTable.getDbName(), remoteTable.getTableName(), - SerializationUtilities.serializeExpressionToKryo(hivePartitionPredicate), hivePartitions); - return hivePartitions; + private void initPartitionColumns() { + if (partitionColumns != null) { + return; + } + synchronized (this) { + if (partitionColumns != null) { + return; + } + List<String> partitionKeys = remoteTable.getPartitionKeys().stream().map(FieldSchema::getName) + .collect(Collectors.toList()); Review Comment: collect as set to avoid traversing `partitionKeys` -- 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