This is an automated email from the ASF dual-hosted git repository.
lpinter pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new 917b1fc56b4 HIVE-26657: [Iceberg] Filter out the metadata.json file
when migrating. (#3695) (Laszlo Pinter, reviewed by Adam Szita)
917b1fc56b4 is described below
commit 917b1fc56b44bd97df43d289bf23784b210c4d65
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)
---
.../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,