This is an automated email from the ASF dual-hosted git repository. dkuzmenko pushed a commit to annotated tag release-4.0.0-alpha-2-rc0 in repository https://gitbox.apache.org/repos/asf/hive.git
commit 9e3e506d0245f5d9fda75186826f682769f0bbff Author: László Pintér <[email protected]> AuthorDate: Mon Oct 24 13:14:23 2022 +0200 HIVE-26657: [Iceberg] Filter out the metadata.json file when migrating. (#3695) (Laszlo Pinter, reviewed by Adam Szita) (cherry picked from commit 917b1fc56b44bd97df43d289bf23784b210c4d65) --- .../src/main/java/org/apache/iceberg/mr/hive/HiveTableUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveTableUtil.java b/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveTableUtil.java index 293a7020fe0..8c51de4c930 100644 --- a/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveTableUtil.java +++ b/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveTableUtil.java @@ -125,7 +125,7 @@ public class HiveTableUtil { while (fileStatusIterator.hasNext()) { LocatedFileStatus fileStatus = fileStatusIterator.next(); String fileName = fileStatus.getPath().getName(); - if (fileName.startsWith(".") || fileName.startsWith("_")) { + if (fileName.startsWith(".") || fileName.startsWith("_") || fileName.endsWith("metadata.json")) { continue; } dataFiles.addAll(TableMigrationUtil.listPartition(partitionKeys, fileStatus.getPath().toString(), format, spec,
