This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git
The following commit(s) were added to refs/heads/master by this push:
new d923861fa7 [core] format table: throw exception when get partiiton
from file system (#6730)
d923861fa7 is described below
commit d923861fa72b65823ba7389b54ee9934c2ac5455
Author: jerry <[email protected]>
AuthorDate: Wed Dec 3 14:58:03 2025 +0800
[core] format table: throw exception when get partiiton from file system
(#6730)
---
.../java/org/apache/paimon/utils/PartitionPathUtils.java | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git
a/paimon-core/src/main/java/org/apache/paimon/utils/PartitionPathUtils.java
b/paimon-core/src/main/java/org/apache/paimon/utils/PartitionPathUtils.java
index 880e4dfe67..acc121806d 100644
--- a/paimon-core/src/main/java/org/apache/paimon/utils/PartitionPathUtils.java
+++ b/paimon-core/src/main/java/org/apache/paimon/utils/PartitionPathUtils.java
@@ -301,10 +301,15 @@ public class PartitionPathUtils {
ArrayList<FileStatus> result = new ArrayList<>();
try {
- FileStatus fileStatus = fileIO.getFileStatus(path);
- listStatusRecursively(fileIO, fileStatus, 0, expectLevel, result);
- } catch (IOException ignore) {
- return new FileStatus[0];
+ if (fileIO.exists(path)) {
+ // ignore hidden file
+ FileStatus fileStatus = fileIO.getFileStatus(path);
+ listStatusRecursively(fileIO, fileStatus, 0, expectLevel,
result);
+ } else {
+ return new FileStatus[0];
+ }
+ } catch (IOException e) {
+ throw new RuntimeException("Failed to list files in " + path, e);
}
return result.toArray(new FileStatus[0]);