This is an automated email from the ASF dual-hosted git repository.

rbalamohan 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 f8a6fd6fafd HIVE-26675: Update Iceberg from 0.14.1 to 1.0.0 (#3711)
f8a6fd6fafd is described below

commit f8a6fd6fafdda82a30aaa698210bb18752e8ee2f
Author: Butao Zhang <[email protected]>
AuthorDate: Mon Oct 31 08:02:58 2022 +0800

    HIVE-26675: Update Iceberg from 0.14.1 to 1.0.0 (#3711)
    
    Contributed by zhangbutao
---
 .../java/org/apache/iceberg/hive/HiveCreateReplaceTableTest.java    | 2 +-
 .../src/test/java/org/apache/iceberg/hive/HiveTableTest.java        | 2 +-
 .../test/java/org/apache/iceberg/hive/TestHiveTableConcurrency.java | 2 +-
 .../java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java  | 2 +-
 .../src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergV2.java | 6 +++---
 iceberg/pom.xml                                                     | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git 
a/iceberg/iceberg-catalog/src/test/java/org/apache/iceberg/hive/HiveCreateReplaceTableTest.java
 
b/iceberg/iceberg-catalog/src/test/java/org/apache/iceberg/hive/HiveCreateReplaceTableTest.java
index e0e03e9206c..9aef3d4b128 100644
--- 
a/iceberg/iceberg-catalog/src/test/java/org/apache/iceberg/hive/HiveCreateReplaceTableTest.java
+++ 
b/iceberg/iceberg-catalog/src/test/java/org/apache/iceberg/hive/HiveCreateReplaceTableTest.java
@@ -128,7 +128,7 @@ public class HiveCreateReplaceTableTest extends 
HiveMetastoreTest {
 
     Table table = catalog.loadTable(TABLE_IDENTIFIER);
     Snapshot snapshot = table.currentSnapshot();
-    Assert.assertTrue("Table should have one manifest file", 
snapshot.allManifests().size() == 1);
+    Assert.assertTrue("Table should have one manifest file", 
snapshot.allManifests(table.io()).size() == 1);
   }
 
   @Test
diff --git 
a/iceberg/iceberg-catalog/src/test/java/org/apache/iceberg/hive/HiveTableTest.java
 
b/iceberg/iceberg-catalog/src/test/java/org/apache/iceberg/hive/HiveTableTest.java
index 4c210a95635..777e7ea590a 100644
--- 
a/iceberg/iceberg-catalog/src/test/java/org/apache/iceberg/hive/HiveTableTest.java
+++ 
b/iceberg/iceberg-catalog/src/test/java/org/apache/iceberg/hive/HiveTableTest.java
@@ -225,7 +225,7 @@ public class HiveTableTest extends HiveTableBaseTest {
 
     String manifestListLocation = 
table.currentSnapshot().manifestListLocation().replace("file:", "");
 
-    List<ManifestFile> manifests = table.currentSnapshot().allManifests();
+    List<ManifestFile> manifests = 
table.currentSnapshot().allManifests(table.io());
 
     Assert.assertTrue("Drop (table and data) should return true and drop the 
table",
         catalog.dropTable(TABLE_IDENTIFIER));
diff --git 
a/iceberg/iceberg-catalog/src/test/java/org/apache/iceberg/hive/TestHiveTableConcurrency.java
 
b/iceberg/iceberg-catalog/src/test/java/org/apache/iceberg/hive/TestHiveTableConcurrency.java
index 2e765c32860..3077dc51f6b 100644
--- 
a/iceberg/iceberg-catalog/src/test/java/org/apache/iceberg/hive/TestHiveTableConcurrency.java
+++ 
b/iceberg/iceberg-catalog/src/test/java/org/apache/iceberg/hive/TestHiveTableConcurrency.java
@@ -75,7 +75,7 @@ public class TestHiveTableConcurrency extends 
HiveTableBaseTest {
         });
 
     icebergTable.refresh();
-    Assert.assertEquals(20, 
icebergTable.currentSnapshot().allManifests().size());
+    Assert.assertEquals(20, 
icebergTable.currentSnapshot().allManifests(icebergTable.io()).size());
   }
 
   @Test
diff --git 
a/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java
 
b/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java
index 37ad5ae78bf..078acc30b7b 100644
--- 
a/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java
+++ 
b/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java
@@ -568,7 +568,7 @@ public class HiveIcebergStorageHandler implements 
HiveStoragePredicateHandler, H
         throw new SemanticException("Cannot perform insert overwrite query on 
bucket partitioned Iceberg table.");
       }
       if (table.currentSnapshot() != null) {
-        if 
(table.currentSnapshot().allManifests().parallelStream().map(ManifestFile::partitionSpecId)
+        if 
(table.currentSnapshot().allManifests(table.io()).parallelStream().map(ManifestFile::partitionSpecId)
             .anyMatch(id -> id < table.spec().specId())) {
           throw new SemanticException(
               "Cannot perform insert overwrite query on Iceberg table where 
partition evolution happened. In order " +
diff --git 
a/iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergV2.java
 
b/iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergV2.java
index 04ed1425aac..fe76bf43caf 100644
--- 
a/iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergV2.java
+++ 
b/iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergV2.java
@@ -138,7 +138,7 @@ public class TestHiveIcebergV2 extends 
HiveIcebergStorageHandlerWithEngineBase {
         PartitionSpec.unpartitioned(), fileFormat, 
HiveIcebergStorageHandlerTestUtils.CUSTOMER_RECORDS, 2);
 
     // delete one of the rows
-    DataFile dataFile = 
StreamSupport.stream(tbl.currentSnapshot().addedFiles().spliterator(), false)
+    DataFile dataFile = 
StreamSupport.stream(tbl.currentSnapshot().addedDataFiles(tbl.io()).spliterator(),
 false)
         .findFirst()
         .orElseThrow(() -> new RuntimeException("Did not find any data files 
for test table"));
     List<PositionDelete<Record>> deletes = ImmutableList.of(positionDelete(
@@ -172,7 +172,7 @@ public class TestHiveIcebergV2 extends 
HiveIcebergStorageHandlerWithEngineBase {
     tbl.refresh();
 
     // delete the first and third rows from the newly-added data file - with 
row supplied
-    DataFile dataFile = 
StreamSupport.stream(tbl.currentSnapshot().addedFiles().spliterator(), false)
+    DataFile dataFile = 
StreamSupport.stream(tbl.currentSnapshot().addedDataFiles(tbl.io()).spliterator(),
 false)
         .filter(file -> file.partition().get(0, Long.class) == 0L)
         .filter(file -> file.recordCount() == 3)
         .findAny()
@@ -210,7 +210,7 @@ public class TestHiveIcebergV2 extends 
HiveIcebergStorageHandlerWithEngineBase {
     tbl.refresh();
 
     // delete the first and third rows from the newly-added data file
-    DataFile dataFile = 
StreamSupport.stream(tbl.currentSnapshot().addedFiles().spliterator(), false)
+    DataFile dataFile = 
StreamSupport.stream(tbl.currentSnapshot().addedDataFiles(tbl.io()).spliterator(),
 false)
         .filter(file -> file.partition().get(0, Long.class) == 0L)
         .filter(file -> file.recordCount() == 3)
         .findAny()
diff --git a/iceberg/pom.xml b/iceberg/pom.xml
index 19659584778..348bf5b64f4 100644
--- a/iceberg/pom.xml
+++ b/iceberg/pom.xml
@@ -25,7 +25,7 @@
   <properties>
     <hive.path.to.root>..</hive.path.to.root>
     <path.to.iceberg.root>.</path.to.iceberg.root>
-    <iceberg.version>0.14.1</iceberg.version>
+    <iceberg.version>1.0.0</iceberg.version>
     <kryo-shaded.version>4.0.2</kryo-shaded.version>
     <iceberg.mockito-core.version>3.4.4</iceberg.mockito-core.version>
     <iceberg.avro.version>1.9.2</iceberg.avro.version>

Reply via email to