AshinGau commented on code in PR #21871:
URL: https://github.com/apache/doris/pull/21871#discussion_r1266165092


##########
fe/fe-core/src/main/java/org/apache/doris/planner/external/hudi/HudiScanNode.java:
##########
@@ -247,78 +257,76 @@ public List<Split> getSplits() throws UserException {
         if (ugi != null) {
             try {
                 partitions = ugi.doAs(
-                        (PrivilegedExceptionAction<List<HivePartition>>) () -> 
getPrunedPartitions(hudiClient));
+                        (PrivilegedExceptionAction<List<HivePartition>>) () -> 
getPrunedPartitions(hudiClient,
+                                snapshotTimestamp));
             } catch (Exception e) {
                 throw new UserException(e);
             }
         } else {
-            partitions = getPrunedPartitions(hudiClient);
+            partitions = getPrunedPartitions(hudiClient, snapshotTimestamp);
         }
-        try {
-            for (HivePartition partition : partitions) {
-                String globPath;
-                String partitionName = "";
-                if (partition.isDummyPartition()) {
-                    globPath = hudiClient.getBasePathV2().toString() + "/*";
-                } else {
-                    partitionName = 
FSUtils.getRelativePartitionPath(hudiClient.getBasePathV2(),
-                            new Path(partition.getPath()));
-                    globPath = String.format("%s/%s/*", 
hudiClient.getBasePathV2().toString(), partitionName);
-                }
-                List<FileStatus> statuses = 
FSUtils.getGlobStatusExcludingMetaFolder(hudiClient.getRawFs(),
+        return partitions.parallelStream().flatMap(partition -> {

Review Comment:
   Done



##########
fe/fe-core/src/main/java/org/apache/doris/planner/external/hudi/HudiCachedPartitionProcessor.java:
##########
@@ -74,6 +73,31 @@ public void cleanTablePartitions(String dbName, String 
tblName) {
                 .forEach(partitionCache::invalidate);
     }
 
+    public TablePartitionValues getSnapshotPartitionValues(HMSExternalTable 
table,
+            HoodieTableMetaClient tableMetaClient, String timestamp) {
+        assert (catalogId == table.getCatalog().getId());

Review Comment:
   Done



-- 
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

Reply via email to