This is an automated email from the ASF dual-hosted git repository.

morrysnow pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new 7190d059a88 branch-3.1: [fix]handle loading iceberg partitions by auth 
#57988 (#58020)
7190d059a88 is described below

commit 7190d059a88f4d8e4008857c797a699a0d636a8b
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Nov 25 11:07:43 2025 +0800

    branch-3.1: [fix]handle loading iceberg partitions by auth #57988 (#58020)
    
    Cherry-picked from #57988
    
    Co-authored-by: zhaorongsheng <[email protected]>
---
 .../org/apache/doris/datasource/iceberg/IcebergUtils.java     | 11 ++++++++++-
 .../doris/datasource/iceberg/source/IcebergScanNode.java      |  5 ++---
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergUtils.java
 
b/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergUtils.java
index 3c01770702d..767b7cf68a2 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergUtils.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergUtils.java
@@ -1103,7 +1103,16 @@ public class IcebergUtils {
             return IcebergPartitionInfo.empty();
         }
         Table table = getIcebergTable(dorisTable);
-        List<IcebergPartition> icebergPartitions = loadIcebergPartition(table, 
snapshotId);
+        List<IcebergPartition> icebergPartitions;
+        try {
+            icebergPartitions = 
dorisTable.getCatalog().getExecutionAuthenticator()
+                    .execute(() -> loadIcebergPartition(table, snapshotId));
+        } catch (Exception e) {
+            String errorMsg = String.format("Failed to get iceberg partition 
info, table: %s.%s.%s, snapshotId: %s",
+                    dorisTable.getCatalog().getName(), dorisTable.getDbName(), 
dorisTable.getName(), snapshotId);
+            LOG.warn(errorMsg, e);
+            throw new AnalysisException(errorMsg, e);
+        }
         Map<String, IcebergPartition> nameToPartition = Maps.newHashMap();
         Map<String, PartitionItem> nameToPartitionItem = Maps.newHashMap();
 
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/source/IcebergScanNode.java
 
b/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/source/IcebergScanNode.java
index d15675944e4..ce2e057ab49 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/source/IcebergScanNode.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/source/IcebergScanNode.java
@@ -161,10 +161,9 @@ public class IcebergScanNode extends FileQueryScanNode {
         isPartitionedTable = icebergTable.spec().isPartitioned();
         formatVersion = ((BaseTable) 
icebergTable).operations().current().formatVersion();
         preExecutionAuthenticator = 
source.getCatalog().getExecutionAuthenticator();
-        IcebergExternalCatalog catalog = (IcebergExternalCatalog) 
source.getCatalog();
         storagePropertiesMap = 
VendedCredentialsFactory.getStoragePropertiesMapWithVendedCredentials(
-                catalog.getCatalogProperty().getMetastoreProperties(),
-                catalog.getCatalogProperty().getStoragePropertiesMap(),
+                
source.getCatalog().getCatalogProperty().getMetastoreProperties(),
+                
source.getCatalog().getCatalogProperty().getStoragePropertiesMap(),
                 icebergTable
         );
         backendStorageProperties = 
CredentialUtils.getBackendPropertiesFromStorageMap(storagePropertiesMap);


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

Reply via email to