You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "jshmchenxi (via GitHub)" <gi...@apache.org> on 2025/05/02 13:54:23 UTC
Re: [PR] Spark: Add flag to handle missing files for `importSparkTable` [iceberg]
jshmchenxi commented on code in PR #12212:
URL: https://github.com/apache/iceberg/pull/12212#discussion_r2071648783
##########
data/src/main/java/org/apache/iceberg/data/TableMigrationUtil.java:
##########
@@ -163,10 +167,19 @@ public static List<DataFile> listPartition(
Path partitionDir = new Path(partitionUri);
FileSystem fs = partitionDir.getFileSystem(conf);
- List<FileStatus> fileStatus =
- Arrays.stream(fs.listStatus(partitionDir, HIDDEN_PATH_FILTER))
- .filter(FileStatus::isFile)
- .collect(Collectors.toList());
+ List<FileStatus> fileStatus;
+ if (fs.exists(partitionDir)) {
Review Comment:
Thanks for the suggestion! I've added the new flag to callers in `SparkTableUtil`.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org