This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.0 by this push:
new d4caf9e73c2 branch-4.0: [fix](hive) fix potential inconsistent hive
partition info cache #58707 (#58798)
d4caf9e73c2 is described below
commit d4caf9e73c2c2c7fafe3696508ce79ed1b9f9976
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Dec 9 17:32:25 2025 +0800
branch-4.0: [fix](hive) fix potential inconsistent hive partition info
cache #58707 (#58798)
Cherry-picked from #58707
Co-authored-by: Mingyu Chen (Rayner) <[email protected]>
---
.../main/java/org/apache/doris/datasource/hive/HMSExternalTable.java | 5 ++++-
.../java/org/apache/doris/datasource/iceberg/IcebergMetadataOps.java | 2 ++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSExternalTable.java
b/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSExternalTable.java
index 999342506ff..473db767651 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSExternalTable.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSExternalTable.java
@@ -741,7 +741,10 @@ public class HMSExternalTable extends ExternalTable
implements MTMVRelatedTableI
}
private List<Column> initPartitionColumns(List<Column> schema) {
- List<String> partitionKeys =
remoteTable.getPartitionKeys().stream().map(FieldSchema::getName)
+ // get table from remote, do not use `remoteTable` directly,
+ // because here we need to get schema from latest table info.
+ Table newTable = ((HMSExternalCatalog)
catalog).getClient().getTable(dbName, name);
+ List<String> partitionKeys =
newTable.getPartitionKeys().stream().map(FieldSchema::getName)
.collect(Collectors.toList());
List<Column> partitionColumns =
Lists.newArrayListWithCapacity(partitionKeys.size());
for (String partitionKey : partitionKeys) {
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergMetadataOps.java
b/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergMetadataOps.java
index 8148579743e..c52c5068003 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergMetadataOps.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergMetadataOps.java
@@ -145,6 +145,8 @@ public class IcebergMetadataOps implements
ExternalMetadataOps {
try {
return executionAuthenticator.execute(() ->
listNestedNamespaces(getNamespace()));
} catch (Exception e) {
+ LOG.warn("failed to list database names in catalog {}, root cause:
{}",
+ dorisCatalog.getName(), Util.getRootCauseMessage(e), e);
throw new RuntimeException("Failed to list database names, error
message is:" + e.getMessage(), e);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]