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

etudenhoefner pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg.git


The following commit(s) were added to refs/heads/main by this push:
     new 9cbc2f43c4 Core: Use <?> as type parameter instead of raw type for 
SnapshotUpdate (#10015)
9cbc2f43c4 is described below

commit 9cbc2f43c4a7e3feb15703dd4a0dd0f4423f2ced
Author: Eduard Tudenhoefner <[email protected]>
AuthorDate: Fri Mar 22 08:19:29 2024 +0100

    Core: Use <?> as type parameter instead of raw type for SnapshotUpdate 
(#10015)
---
 core/src/test/java/org/apache/iceberg/TableTestBase.java | 10 +++++-----
 core/src/test/java/org/apache/iceberg/TestBase.java      | 10 +++++-----
 core/src/test/java/org/apache/iceberg/TestRowDelta.java  |  8 ++++----
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/core/src/test/java/org/apache/iceberg/TableTestBase.java 
b/core/src/test/java/org/apache/iceberg/TableTestBase.java
index c3db859101..a92497f88e 100644
--- a/core/src/test/java/org/apache/iceberg/TableTestBase.java
+++ b/core/src/test/java/org/apache/iceberg/TableTestBase.java
@@ -375,24 +375,24 @@ public class TableTestBase {
   }
 
   @SuppressWarnings("checkstyle:HiddenField")
-  Snapshot commit(Table table, SnapshotUpdate snapshotUpdate, String branch) {
+  Snapshot commit(Table table, SnapshotUpdate<?> snapshotUpdate, String 
branch) {
     Snapshot snapshot;
     if (branch.equals(SnapshotRef.MAIN_BRANCH)) {
       snapshotUpdate.commit();
       snapshot = table.currentSnapshot();
     } else {
-      ((SnapshotProducer) snapshotUpdate.toBranch(branch)).commit();
+      ((SnapshotProducer<?>) snapshotUpdate.toBranch(branch)).commit();
       snapshot = table.snapshot(branch);
     }
 
     return snapshot;
   }
 
-  Snapshot apply(SnapshotUpdate snapshotUpdate, String branch) {
+  Snapshot apply(SnapshotUpdate<?> snapshotUpdate, String branch) {
     if (branch.equals(SnapshotRef.MAIN_BRANCH)) {
-      return ((SnapshotProducer) snapshotUpdate).apply();
+      return ((SnapshotProducer<?>) snapshotUpdate).apply();
     } else {
-      return ((SnapshotProducer) snapshotUpdate.toBranch(branch)).apply();
+      return ((SnapshotProducer<?>) snapshotUpdate.toBranch(branch)).apply();
     }
   }
 
diff --git a/core/src/test/java/org/apache/iceberg/TestBase.java 
b/core/src/test/java/org/apache/iceberg/TestBase.java
index ebd527ded3..10aa57abf6 100644
--- a/core/src/test/java/org/apache/iceberg/TestBase.java
+++ b/core/src/test/java/org/apache/iceberg/TestBase.java
@@ -366,24 +366,24 @@ public class TestBase {
   }
 
   @SuppressWarnings("checkstyle:HiddenField")
-  Snapshot commit(Table table, SnapshotUpdate snapshotUpdate, String branch) {
+  Snapshot commit(Table table, SnapshotUpdate<?> snapshotUpdate, String 
branch) {
     Snapshot snapshot;
     if (branch.equals(SnapshotRef.MAIN_BRANCH)) {
       snapshotUpdate.commit();
       snapshot = table.currentSnapshot();
     } else {
-      ((SnapshotProducer) snapshotUpdate.toBranch(branch)).commit();
+      ((SnapshotProducer<?>) snapshotUpdate.toBranch(branch)).commit();
       snapshot = table.snapshot(branch);
     }
 
     return snapshot;
   }
 
-  Snapshot apply(SnapshotUpdate snapshotUpdate, String branch) {
+  Snapshot apply(SnapshotUpdate<?> snapshotUpdate, String branch) {
     if (branch.equals(SnapshotRef.MAIN_BRANCH)) {
-      return ((SnapshotProducer) snapshotUpdate).apply();
+      return ((SnapshotProducer<?>) snapshotUpdate).apply();
     } else {
-      return ((SnapshotProducer) snapshotUpdate.toBranch(branch)).apply();
+      return ((SnapshotProducer<?>) snapshotUpdate.toBranch(branch)).apply();
     }
   }
 
diff --git a/core/src/test/java/org/apache/iceberg/TestRowDelta.java 
b/core/src/test/java/org/apache/iceberg/TestRowDelta.java
index fa04f36d36..56bab52eda 100644
--- a/core/src/test/java/org/apache/iceberg/TestRowDelta.java
+++ b/core/src/test/java/org/apache/iceberg/TestRowDelta.java
@@ -62,7 +62,7 @@ public class TestRowDelta extends V2TableTestBase {
 
   @Test
   public void testAddDeleteFile() {
-    SnapshotUpdate rowDelta =
+    SnapshotUpdate<?> rowDelta =
         
table.newRowDelta().addRows(FILE_A).addDeletes(FILE_A_DELETES).addDeletes(FILE_B_DELETES);
 
     commit(table, rowDelta, branch);
@@ -97,7 +97,7 @@ public class TestRowDelta extends V2TableTestBase {
 
   @Test
   public void testValidateDataFilesExistDefaults() {
-    SnapshotUpdate rowDelta1 = 
table.newAppend().appendFile(FILE_A).appendFile(FILE_B);
+    SnapshotUpdate<?> rowDelta1 = 
table.newAppend().appendFile(FILE_A).appendFile(FILE_B);
 
     commit(table, rowDelta1, branch);
 
@@ -105,12 +105,12 @@ public class TestRowDelta extends V2TableTestBase {
     long validateFromSnapshotId = latestSnapshot(table, branch).snapshotId();
 
     // overwrite FILE_A
-    SnapshotUpdate rowDelta2 = 
table.newOverwrite().deleteFile(FILE_A).addFile(FILE_A2);
+    SnapshotUpdate<?> rowDelta2 = 
table.newOverwrite().deleteFile(FILE_A).addFile(FILE_A2);
 
     commit(table, rowDelta2, branch);
 
     // delete FILE_B
-    SnapshotUpdate rowDelta3 = table.newDelete().deleteFile(FILE_B);
+    SnapshotUpdate<?> rowDelta3 = table.newDelete().deleteFile(FILE_B);
 
     commit(table, rowDelta3, branch);
 

Reply via email to