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

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


The following commit(s) were added to refs/heads/master by this push:
     new 6bdb841ea4 API, Core: Move @Value.Immutable usage from iceberg-api to 
iceberg-core (#8099)
6bdb841ea4 is described below

commit 6bdb841ea40c59debad4f6de00115d3745509b8e
Author: Eduard Tudenhoefner <[email protected]>
AuthorDate: Tue Aug 1 01:09:58 2023 +0200

    API, Core: Move @Value.Immutable usage from iceberg-api to iceberg-core 
(#8099)
---
 .palantir/revapi.yml                               | 24 +++++++
 .../apache/iceberg/actions/DeleteOrphanFiles.java  |  3 -
 .../iceberg/actions/DeleteReachableFiles.java      |  3 -
 .../apache/iceberg/actions/ExpireSnapshots.java    |  4 --
 .../org/apache/iceberg/actions/MigrateTable.java   |  3 -
 .../apache/iceberg/actions/RewriteDataFiles.java   | 12 ----
 .../apache/iceberg/actions/RewriteManifests.java   |  3 -
 .../actions/RewritePositionDeleteFiles.java        |  5 --
 .../org/apache/iceberg/actions/SnapshotTable.java  |  3 -
 .../BaseDeleteOrphanFiles.java}                    | 25 +++----
 .../BaseDeleteReachableFiles.java}                 | 25 +++----
 .../BaseExpireSnapshots.java}                      | 31 +++++----
 .../BaseMigrateTable.java}                         | 25 +++----
 .../iceberg/actions/BaseRewriteDataFiles.java      | 81 ++++++++++++++++++++++
 .../BaseRewriteManifests.java}                     | 25 +++----
 .../actions/BaseRewritePositionalDeleteFiles.java  | 65 +++++++++++++++++
 .../BaseSnapshotTable.java}                        | 25 +++----
 .../apache/iceberg/view/BaseViewHistoryEntry.java  | 11 +--
 .../org/apache/iceberg/view/BaseViewVersion.java   | 11 +--
 19 files changed, 268 insertions(+), 116 deletions(-)

diff --git a/.palantir/revapi.yml b/.palantir/revapi.yml
index 5ac91ec0a9..1ae35cf64d 100644
--- a/.palantir/revapi.yml
+++ b/.palantir/revapi.yml
@@ -745,6 +745,30 @@ acceptedBreaks:
         \ of type erasure and the original type is always returned"
   "1.3.0":
     org.apache.iceberg:iceberg-api:
+    - code: "java.class.removed"
+      old: "class org.apache.iceberg.actions.ImmutableDeleteOrphanFiles"
+      justification: "Moving from iceberg-api to iceberg-core"
+    - code: "java.class.removed"
+      old: "class org.apache.iceberg.actions.ImmutableDeleteReachableFiles"
+      justification: "Moving from iceberg-api to iceberg-core"
+    - code: "java.class.removed"
+      old: "class org.apache.iceberg.actions.ImmutableExpireSnapshots"
+      justification: "Moving from iceberg-api to iceberg-core"
+    - code: "java.class.removed"
+      old: "class org.apache.iceberg.actions.ImmutableMigrateTable"
+      justification: "Moving from iceberg-api to iceberg-core"
+    - code: "java.class.removed"
+      old: "class org.apache.iceberg.actions.ImmutableRewriteDataFiles"
+      justification: "Moving from iceberg-api to iceberg-core"
+    - code: "java.class.removed"
+      old: "class org.apache.iceberg.actions.ImmutableRewriteManifests"
+      justification: "Moving from iceberg-api to iceberg-core"
+    - code: "java.class.removed"
+      old: "class 
org.apache.iceberg.actions.ImmutableRewritePositionDeleteFiles"
+      justification: "Moving from iceberg-api to iceberg-core"
+    - code: "java.class.removed"
+      old: "class org.apache.iceberg.actions.ImmutableSnapshotTable"
+      justification: "Moving from iceberg-api to iceberg-core"
     - code: "java.class.removed"
       old: "class org.apache.iceberg.view.ImmutableSQLViewRepresentation"
       justification: "Moving from iceberg-api to iceberg-core"
diff --git 
a/api/src/main/java/org/apache/iceberg/actions/DeleteOrphanFiles.java 
b/api/src/main/java/org/apache/iceberg/actions/DeleteOrphanFiles.java
index a57da3bed0..4e8f80fa83 100644
--- a/api/src/main/java/org/apache/iceberg/actions/DeleteOrphanFiles.java
+++ b/api/src/main/java/org/apache/iceberg/actions/DeleteOrphanFiles.java
@@ -24,7 +24,6 @@ import java.util.concurrent.ExecutorService;
 import java.util.function.Consumer;
 import org.apache.iceberg.io.SupportsBulkOperations;
 import org.apache.iceberg.relocated.com.google.common.base.Preconditions;
-import org.immutables.value.Value;
 
 /**
  * An action that deletes orphan metadata, data and delete files in a table.
@@ -32,7 +31,6 @@ import org.immutables.value.Value;
  * <p>A file is considered orphan if it is not reachable by any valid 
snapshot. The set of actual
  * files is built by listing the underlying storage which makes this operation 
expensive.
  */
[email protected]
 public interface DeleteOrphanFiles extends Action<DeleteOrphanFiles, 
DeleteOrphanFiles.Result> {
   /**
    * Passes a location which should be scanned for orphan files.
@@ -141,7 +139,6 @@ public interface DeleteOrphanFiles extends 
Action<DeleteOrphanFiles, DeleteOrpha
   }
 
   /** The action result that contains a summary of the execution. */
-  @Value.Immutable
   interface Result {
     /** Returns locations of orphan files. */
     Iterable<String> orphanFileLocations();
diff --git 
a/api/src/main/java/org/apache/iceberg/actions/DeleteReachableFiles.java 
b/api/src/main/java/org/apache/iceberg/actions/DeleteReachableFiles.java
index e811028495..d4ebb5a200 100644
--- a/api/src/main/java/org/apache/iceberg/actions/DeleteReachableFiles.java
+++ b/api/src/main/java/org/apache/iceberg/actions/DeleteReachableFiles.java
@@ -22,7 +22,6 @@ import java.util.concurrent.ExecutorService;
 import java.util.function.Consumer;
 import org.apache.iceberg.io.FileIO;
 import org.apache.iceberg.io.SupportsBulkOperations;
-import org.immutables.value.Value;
 
 /**
  * An action that deletes all files referenced by a table metadata file.
@@ -33,7 +32,6 @@ import org.immutables.value.Value;
  *
  * <p>Implementations may use a query engine to distribute parts of work.
  */
[email protected]
 public interface DeleteReachableFiles
     extends Action<DeleteReachableFiles, DeleteReachableFiles.Result> {
 
@@ -67,7 +65,6 @@ public interface DeleteReachableFiles
   DeleteReachableFiles io(FileIO io);
 
   /** The action result that contains a summary of the execution. */
-  @Value.Immutable
   interface Result {
 
     /** Returns the number of deleted data files. */
diff --git a/api/src/main/java/org/apache/iceberg/actions/ExpireSnapshots.java 
b/api/src/main/java/org/apache/iceberg/actions/ExpireSnapshots.java
index 286ab115d1..610d2d9724 100644
--- a/api/src/main/java/org/apache/iceberg/actions/ExpireSnapshots.java
+++ b/api/src/main/java/org/apache/iceberg/actions/ExpireSnapshots.java
@@ -22,7 +22,6 @@ import java.util.concurrent.ExecutorService;
 import java.util.function.Consumer;
 import org.apache.iceberg.Snapshot;
 import org.apache.iceberg.io.SupportsBulkOperations;
-import org.immutables.value.Value;
 
 /**
  * An action that expires snapshots in a table.
@@ -30,7 +29,6 @@ import org.immutables.value.Value;
  * <p>Similar to {@link org.apache.iceberg.ExpireSnapshots} but may use a 
query engine to distribute
  * parts of the work.
  */
[email protected]
 public interface ExpireSnapshots extends Action<ExpireSnapshots, 
ExpireSnapshots.Result> {
   /**
    * Expires a specific {@link Snapshot} identified by id.
@@ -100,7 +98,6 @@ public interface ExpireSnapshots extends 
Action<ExpireSnapshots, ExpireSnapshots
   ExpireSnapshots executeDeleteWith(ExecutorService executorService);
 
   /** The action result that contains a summary of the execution. */
-  @Value.Immutable
   interface Result {
     /** Returns the number of deleted data files. */
     long deletedDataFilesCount();
@@ -118,7 +115,6 @@ public interface ExpireSnapshots extends 
Action<ExpireSnapshots, ExpireSnapshots
     long deletedManifestListsCount();
 
     /** Returns the number of deleted statistics files. */
-    @Value.Default
     default long deletedStatisticsFilesCount() {
       return 0L;
     }
diff --git a/api/src/main/java/org/apache/iceberg/actions/MigrateTable.java 
b/api/src/main/java/org/apache/iceberg/actions/MigrateTable.java
index ef365bfa4a..fc5413eb60 100644
--- a/api/src/main/java/org/apache/iceberg/actions/MigrateTable.java
+++ b/api/src/main/java/org/apache/iceberg/actions/MigrateTable.java
@@ -19,10 +19,8 @@
 package org.apache.iceberg.actions;
 
 import java.util.Map;
-import org.immutables.value.Value;
 
 /** An action that migrates an existing table to Iceberg. */
[email protected]
 public interface MigrateTable extends Action<MigrateTable, 
MigrateTable.Result> {
   /**
    * Sets table properties in the newly created Iceberg table. Any properties 
with the same key name
@@ -53,7 +51,6 @@ public interface MigrateTable extends Action<MigrateTable, 
MigrateTable.Result>
   }
 
   /** The action result that contains a summary of the execution. */
-  @Value.Immutable
   interface Result {
     /** Returns the number of migrated data files. */
     long migratedDataFilesCount();
diff --git a/api/src/main/java/org/apache/iceberg/actions/RewriteDataFiles.java 
b/api/src/main/java/org/apache/iceberg/actions/RewriteDataFiles.java
index 20e75159b1..854b099351 100644
--- a/api/src/main/java/org/apache/iceberg/actions/RewriteDataFiles.java
+++ b/api/src/main/java/org/apache/iceberg/actions/RewriteDataFiles.java
@@ -24,13 +24,11 @@ import org.apache.iceberg.SortOrder;
 import org.apache.iceberg.StructLike;
 import org.apache.iceberg.expressions.Expression;
 import org.apache.iceberg.relocated.com.google.common.collect.ImmutableList;
-import org.immutables.value.Value;
 
 /**
  * An action for rewriting data files according to a rewrite strategy. 
Generally used for optimizing
  * the sizing and layout of data files within a table.
  */
[email protected]
 public interface RewriteDataFiles
     extends SnapshotUpdate<RewriteDataFiles, RewriteDataFiles.Result> {
 
@@ -178,33 +176,27 @@ public interface RewriteDataFiles
    * null then that particular file group failed. We should only have failed 
groups if partial
    * progress is enabled otherwise we will report a total failure for the job.
    */
-  @Value.Immutable
   interface Result {
     List<FileGroupRewriteResult> rewriteResults();
 
-    @Value.Default
     default List<FileGroupFailureResult> rewriteFailures() {
       return ImmutableList.of();
     }
 
-    @Value.Default
     default int addedDataFilesCount() {
       return 
rewriteResults().stream().mapToInt(FileGroupRewriteResult::addedDataFilesCount).sum();
     }
 
-    @Value.Default
     default int rewrittenDataFilesCount() {
       return rewriteResults().stream()
           .mapToInt(FileGroupRewriteResult::rewrittenDataFilesCount)
           .sum();
     }
 
-    @Value.Default
     default long rewrittenBytesCount() {
       return 
rewriteResults().stream().mapToLong(FileGroupRewriteResult::rewrittenBytesCount).sum();
     }
 
-    @Value.Default
     default int failedDataFilesCount() {
       return 
rewriteFailures().stream().mapToInt(FileGroupFailureResult::dataFilesCount).sum();
     }
@@ -214,7 +206,6 @@ public interface RewriteDataFiles
    * For a particular file group, the number of files which are newly created 
and the number of
    * files which were formerly part of the table but have been rewritten.
    */
-  @Value.Immutable
   interface FileGroupRewriteResult {
     FileGroupInfo info();
 
@@ -222,14 +213,12 @@ public interface RewriteDataFiles
 
     int rewrittenDataFilesCount();
 
-    @Value.Default
     default long rewrittenBytesCount() {
       return 0L;
     }
   }
 
   /** For a file group that failed to rewrite. */
-  @Value.Immutable
   interface FileGroupFailureResult {
     FileGroupInfo info();
 
@@ -240,7 +229,6 @@ public interface RewriteDataFiles
    * A description of a file group, when it was processed, and within which 
partition. For use
    * tracking rewrite operations and for returning results.
    */
-  @Value.Immutable
   interface FileGroupInfo {
 
     /** returns which file group this is out of the total set of file groups 
for this rewrite */
diff --git a/api/src/main/java/org/apache/iceberg/actions/RewriteManifests.java 
b/api/src/main/java/org/apache/iceberg/actions/RewriteManifests.java
index 836ec6d4a7..57b35aaf65 100644
--- a/api/src/main/java/org/apache/iceberg/actions/RewriteManifests.java
+++ b/api/src/main/java/org/apache/iceberg/actions/RewriteManifests.java
@@ -20,10 +20,8 @@ package org.apache.iceberg.actions;
 
 import java.util.function.Predicate;
 import org.apache.iceberg.ManifestFile;
-import org.immutables.value.Value;
 
 /** An action that rewrites manifests. */
[email protected]
 public interface RewriteManifests
     extends SnapshotUpdate<RewriteManifests, RewriteManifests.Result> {
   /**
@@ -57,7 +55,6 @@ public interface RewriteManifests
   RewriteManifests stagingLocation(String stagingLocation);
 
   /** The action result that contains a summary of the execution. */
-  @Value.Immutable
   interface Result {
     /** Returns rewritten manifests. */
     Iterable<ManifestFile> rewrittenManifests();
diff --git 
a/api/src/main/java/org/apache/iceberg/actions/RewritePositionDeleteFiles.java 
b/api/src/main/java/org/apache/iceberg/actions/RewritePositionDeleteFiles.java
index 96548ae07b..0c05433a8b 100644
--- 
a/api/src/main/java/org/apache/iceberg/actions/RewritePositionDeleteFiles.java
+++ 
b/api/src/main/java/org/apache/iceberg/actions/RewritePositionDeleteFiles.java
@@ -22,14 +22,12 @@ import java.util.List;
 import org.apache.iceberg.RewriteJobOrder;
 import org.apache.iceberg.StructLike;
 import org.apache.iceberg.expressions.Expression;
-import org.immutables.value.Value;
 
 /**
  * An action for rewriting position delete files.
  *
  * <p>Generally used for optimizing the size and layout of position delete 
files within a table.
  */
[email protected]
 public interface RewritePositionDeleteFiles
     extends SnapshotUpdate<RewritePositionDeleteFiles, 
RewritePositionDeleteFiles.Result> {
 
@@ -93,7 +91,6 @@ public interface RewritePositionDeleteFiles
   RewritePositionDeleteFiles filter(Expression expression);
 
   /** The action result that contains a summary of the execution. */
-  @Value.Immutable
   interface Result {
     List<FileGroupRewriteResult> rewriteResults();
 
@@ -127,7 +124,6 @@ public interface RewritePositionDeleteFiles
    * newly created and the number of files which were formerly part of the 
table but have been
    * rewritten.
    */
-  @Value.Immutable
   interface FileGroupRewriteResult {
     /** Description of this position delete file group. */
     FileGroupInfo info();
@@ -149,7 +145,6 @@ public interface RewritePositionDeleteFiles
    * A description of a position delete file group, when it was processed, and 
within which
    * partition. For use tracking rewrite operations and for returning results.
    */
-  @Value.Immutable
   interface FileGroupInfo {
     /**
      * Returns which position delete file group this is out of the total set 
of file groups for this
diff --git a/api/src/main/java/org/apache/iceberg/actions/SnapshotTable.java 
b/api/src/main/java/org/apache/iceberg/actions/SnapshotTable.java
index d009ed0e18..37c600ab03 100644
--- a/api/src/main/java/org/apache/iceberg/actions/SnapshotTable.java
+++ b/api/src/main/java/org/apache/iceberg/actions/SnapshotTable.java
@@ -19,10 +19,8 @@
 package org.apache.iceberg.actions;
 
 import java.util.Map;
-import org.immutables.value.Value;
 
 /** An action that creates an independent snapshot of an existing table. */
[email protected]
 public interface SnapshotTable extends Action<SnapshotTable, 
SnapshotTable.Result> {
   /**
    * Sets the table identifier for the newly created Iceberg table.
@@ -60,7 +58,6 @@ public interface SnapshotTable extends Action<SnapshotTable, 
SnapshotTable.Resul
   SnapshotTable tableProperty(String key, String value);
 
   /** The action result that contains a summary of the execution. */
-  @Value.Immutable
   interface Result {
     /** Returns the number of imported data files. */
     long importedDataFilesCount();
diff --git 
a/core/src/main/java/org/apache/iceberg/view/BaseViewHistoryEntry.java 
b/core/src/main/java/org/apache/iceberg/actions/BaseDeleteOrphanFiles.java
similarity index 64%
copy from core/src/main/java/org/apache/iceberg/view/BaseViewHistoryEntry.java
copy to core/src/main/java/org/apache/iceberg/actions/BaseDeleteOrphanFiles.java
index 0562af5f7f..bd06ebe15d 100644
--- a/core/src/main/java/org/apache/iceberg/view/BaseViewHistoryEntry.java
+++ b/core/src/main/java/org/apache/iceberg/actions/BaseDeleteOrphanFiles.java
@@ -16,19 +16,20 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.iceberg.view;
+package org.apache.iceberg.actions;
 
 import org.immutables.value.Value;
+import org.immutables.value.Value.Style.BuilderVisibility;
+import org.immutables.value.Value.Style.ImplementationVisibility;
 
-/**
- * View history entry.
- *
- * <p>An entry contains a change to the view state. At the given timestamp, 
the current version was
- * set to the given version ID.
- */
[email protected]
-// https://github.com/immutables/immutables/issues/291 does not apply here 
because we're not adding
-// any Immutable-specific class to the classpath
[email protected]
 @SuppressWarnings("ImmutablesStyle")
[email protected](typeImmutable = "ImmutableViewHistoryEntry")
-public interface BaseViewHistoryEntry extends ViewHistoryEntry {}
[email protected](
+    typeImmutableEnclosing = "ImmutableDeleteOrphanFiles",
+    visibility = ImplementationVisibility.PUBLIC,
+    builderVisibility = BuilderVisibility.PUBLIC)
+interface BaseDeleteOrphanFiles extends DeleteOrphanFiles {
+
+  @Value.Immutable
+  interface Result extends DeleteOrphanFiles.Result {}
+}
diff --git 
a/core/src/main/java/org/apache/iceberg/view/BaseViewHistoryEntry.java 
b/core/src/main/java/org/apache/iceberg/actions/BaseDeleteReachableFiles.java
similarity index 63%
copy from core/src/main/java/org/apache/iceberg/view/BaseViewHistoryEntry.java
copy to 
core/src/main/java/org/apache/iceberg/actions/BaseDeleteReachableFiles.java
index 0562af5f7f..e3a1c3fb23 100644
--- a/core/src/main/java/org/apache/iceberg/view/BaseViewHistoryEntry.java
+++ 
b/core/src/main/java/org/apache/iceberg/actions/BaseDeleteReachableFiles.java
@@ -16,19 +16,20 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.iceberg.view;
+package org.apache.iceberg.actions;
 
 import org.immutables.value.Value;
+import org.immutables.value.Value.Style.BuilderVisibility;
+import org.immutables.value.Value.Style.ImplementationVisibility;
 
-/**
- * View history entry.
- *
- * <p>An entry contains a change to the view state. At the given timestamp, 
the current version was
- * set to the given version ID.
- */
[email protected]
-// https://github.com/immutables/immutables/issues/291 does not apply here 
because we're not adding
-// any Immutable-specific class to the classpath
[email protected]
 @SuppressWarnings("ImmutablesStyle")
[email protected](typeImmutable = "ImmutableViewHistoryEntry")
-public interface BaseViewHistoryEntry extends ViewHistoryEntry {}
[email protected](
+    typeImmutableEnclosing = "ImmutableDeleteReachableFiles",
+    visibility = ImplementationVisibility.PUBLIC,
+    builderVisibility = BuilderVisibility.PUBLIC)
+interface BaseDeleteReachableFiles extends DeleteReachableFiles {
+
+  @Value.Immutable
+  interface Result extends DeleteReachableFiles.Result {}
+}
diff --git 
a/core/src/main/java/org/apache/iceberg/view/BaseViewHistoryEntry.java 
b/core/src/main/java/org/apache/iceberg/actions/BaseExpireSnapshots.java
similarity index 57%
copy from core/src/main/java/org/apache/iceberg/view/BaseViewHistoryEntry.java
copy to core/src/main/java/org/apache/iceberg/actions/BaseExpireSnapshots.java
index 0562af5f7f..646e31a64c 100644
--- a/core/src/main/java/org/apache/iceberg/view/BaseViewHistoryEntry.java
+++ b/core/src/main/java/org/apache/iceberg/actions/BaseExpireSnapshots.java
@@ -16,19 +16,26 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.iceberg.view;
+package org.apache.iceberg.actions;
 
 import org.immutables.value.Value;
+import org.immutables.value.Value.Style.BuilderVisibility;
+import org.immutables.value.Value.Style.ImplementationVisibility;
 
-/**
- * View history entry.
- *
- * <p>An entry contains a change to the view state. At the given timestamp, 
the current version was
- * set to the given version ID.
- */
[email protected]
-// https://github.com/immutables/immutables/issues/291 does not apply here 
because we're not adding
-// any Immutable-specific class to the classpath
[email protected]
 @SuppressWarnings("ImmutablesStyle")
[email protected](typeImmutable = "ImmutableViewHistoryEntry")
-public interface BaseViewHistoryEntry extends ViewHistoryEntry {}
[email protected](
+    typeImmutableEnclosing = "ImmutableExpireSnapshots",
+    visibility = ImplementationVisibility.PUBLIC,
+    builderVisibility = BuilderVisibility.PUBLIC)
+interface BaseExpireSnapshots extends ExpireSnapshots {
+
+  @Value.Immutable
+  interface Result extends ExpireSnapshots.Result {
+    @Override
+    @Value.Default
+    default long deletedStatisticsFilesCount() {
+      return ExpireSnapshots.Result.super.deletedStatisticsFilesCount();
+    }
+  }
+}
diff --git 
a/core/src/main/java/org/apache/iceberg/view/BaseViewHistoryEntry.java 
b/core/src/main/java/org/apache/iceberg/actions/BaseMigrateTable.java
similarity index 64%
copy from core/src/main/java/org/apache/iceberg/view/BaseViewHistoryEntry.java
copy to core/src/main/java/org/apache/iceberg/actions/BaseMigrateTable.java
index 0562af5f7f..4fc2717619 100644
--- a/core/src/main/java/org/apache/iceberg/view/BaseViewHistoryEntry.java
+++ b/core/src/main/java/org/apache/iceberg/actions/BaseMigrateTable.java
@@ -16,19 +16,20 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.iceberg.view;
+package org.apache.iceberg.actions;
 
 import org.immutables.value.Value;
+import org.immutables.value.Value.Style.BuilderVisibility;
+import org.immutables.value.Value.Style.ImplementationVisibility;
 
-/**
- * View history entry.
- *
- * <p>An entry contains a change to the view state. At the given timestamp, 
the current version was
- * set to the given version ID.
- */
[email protected]
-// https://github.com/immutables/immutables/issues/291 does not apply here 
because we're not adding
-// any Immutable-specific class to the classpath
[email protected]
 @SuppressWarnings("ImmutablesStyle")
[email protected](typeImmutable = "ImmutableViewHistoryEntry")
-public interface BaseViewHistoryEntry extends ViewHistoryEntry {}
[email protected](
+    typeImmutableEnclosing = "ImmutableMigrateTable",
+    visibility = ImplementationVisibility.PUBLIC,
+    builderVisibility = BuilderVisibility.PUBLIC)
+interface BaseMigrateTable extends MigrateTable {
+
+  @Value.Immutable
+  interface Result extends MigrateTable.Result {}
+}
diff --git 
a/core/src/main/java/org/apache/iceberg/actions/BaseRewriteDataFiles.java 
b/core/src/main/java/org/apache/iceberg/actions/BaseRewriteDataFiles.java
new file mode 100644
index 0000000000..498f538e7c
--- /dev/null
+++ b/core/src/main/java/org/apache/iceberg/actions/BaseRewriteDataFiles.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.iceberg.actions;
+
+import java.util.List;
+import org.immutables.value.Value;
+import org.immutables.value.Value.Style.BuilderVisibility;
+import org.immutables.value.Value.Style.ImplementationVisibility;
+
[email protected]
+@SuppressWarnings("ImmutablesStyle")
[email protected](
+    typeImmutableEnclosing = "ImmutableRewriteDataFiles",
+    visibility = ImplementationVisibility.PUBLIC,
+    builderVisibility = BuilderVisibility.PUBLIC)
+interface BaseRewriteDataFiles extends RewriteDataFiles {
+
+  @Value.Immutable
+  interface Result extends RewriteDataFiles.Result {
+    @Override
+    @Value.Default
+    default List<RewriteDataFiles.FileGroupFailureResult> rewriteFailures() {
+      return RewriteDataFiles.Result.super.rewriteFailures();
+    }
+
+    @Override
+    @Value.Default
+    default int addedDataFilesCount() {
+      return RewriteDataFiles.Result.super.addedDataFilesCount();
+    }
+
+    @Override
+    @Value.Default
+    default int rewrittenDataFilesCount() {
+      return RewriteDataFiles.Result.super.rewrittenDataFilesCount();
+    }
+
+    @Override
+    @Value.Default
+    default long rewrittenBytesCount() {
+      return RewriteDataFiles.Result.super.rewrittenBytesCount();
+    }
+
+    @Override
+    @Value.Default
+    default int failedDataFilesCount() {
+      return RewriteDataFiles.Result.super.failedDataFilesCount();
+    }
+  }
+
+  @Value.Immutable
+  interface FileGroupRewriteResult extends 
RewriteDataFiles.FileGroupRewriteResult {
+    @Override
+    @Value.Default
+    default long rewrittenBytesCount() {
+      return 
RewriteDataFiles.FileGroupRewriteResult.super.rewrittenBytesCount();
+    }
+  }
+
+  @Value.Immutable
+  interface FileGroupFailureResult extends 
RewriteDataFiles.FileGroupFailureResult {}
+
+  @Value.Immutable
+  interface FileGroupInfo extends RewriteDataFiles.FileGroupInfo {}
+}
diff --git 
a/core/src/main/java/org/apache/iceberg/view/BaseViewHistoryEntry.java 
b/core/src/main/java/org/apache/iceberg/actions/BaseRewriteManifests.java
similarity index 64%
copy from core/src/main/java/org/apache/iceberg/view/BaseViewHistoryEntry.java
copy to core/src/main/java/org/apache/iceberg/actions/BaseRewriteManifests.java
index 0562af5f7f..63e1e4d450 100644
--- a/core/src/main/java/org/apache/iceberg/view/BaseViewHistoryEntry.java
+++ b/core/src/main/java/org/apache/iceberg/actions/BaseRewriteManifests.java
@@ -16,19 +16,20 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.iceberg.view;
+package org.apache.iceberg.actions;
 
 import org.immutables.value.Value;
+import org.immutables.value.Value.Style.BuilderVisibility;
+import org.immutables.value.Value.Style.ImplementationVisibility;
 
-/**
- * View history entry.
- *
- * <p>An entry contains a change to the view state. At the given timestamp, 
the current version was
- * set to the given version ID.
- */
[email protected]
-// https://github.com/immutables/immutables/issues/291 does not apply here 
because we're not adding
-// any Immutable-specific class to the classpath
[email protected]
 @SuppressWarnings("ImmutablesStyle")
[email protected](typeImmutable = "ImmutableViewHistoryEntry")
-public interface BaseViewHistoryEntry extends ViewHistoryEntry {}
[email protected](
+    typeImmutableEnclosing = "ImmutableRewriteManifests",
+    visibility = ImplementationVisibility.PUBLIC,
+    builderVisibility = BuilderVisibility.PUBLIC)
+interface BaseRewriteManifests extends RewriteManifests {
+
+  @Value.Immutable
+  interface Result extends RewriteManifests.Result {}
+}
diff --git 
a/core/src/main/java/org/apache/iceberg/actions/BaseRewritePositionalDeleteFiles.java
 
b/core/src/main/java/org/apache/iceberg/actions/BaseRewritePositionalDeleteFiles.java
new file mode 100644
index 0000000000..6732ef6c0f
--- /dev/null
+++ 
b/core/src/main/java/org/apache/iceberg/actions/BaseRewritePositionalDeleteFiles.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.iceberg.actions;
+
+import org.immutables.value.Value;
+import org.immutables.value.Value.Style.BuilderVisibility;
+import org.immutables.value.Value.Style.ImplementationVisibility;
+
[email protected]
+@SuppressWarnings("ImmutablesStyle")
[email protected](
+    typeImmutableEnclosing = "ImmutableRewritePositionDeleteFiles",
+    visibility = ImplementationVisibility.PUBLIC,
+    builderVisibility = BuilderVisibility.PUBLIC)
+interface BaseRewritePositionalDeleteFiles extends RewritePositionDeleteFiles {
+
+  @Value.Immutable
+  interface Result extends RewritePositionDeleteFiles.Result {
+    @Override
+    @Value.Default
+    default int rewrittenDeleteFilesCount() {
+      return 
RewritePositionDeleteFiles.Result.super.rewrittenDeleteFilesCount();
+    }
+
+    @Override
+    @Value.Default
+    default int addedDeleteFilesCount() {
+      return RewritePositionDeleteFiles.Result.super.addedDeleteFilesCount();
+    }
+
+    @Override
+    @Value.Default
+    default long rewrittenBytesCount() {
+      return RewritePositionDeleteFiles.Result.super.rewrittenBytesCount();
+    }
+
+    @Override
+    @Value.Default
+    default long addedBytesCount() {
+      return RewritePositionDeleteFiles.Result.super.addedBytesCount();
+    }
+  }
+
+  @Value.Immutable
+  interface FileGroupRewriteResult extends 
RewritePositionDeleteFiles.FileGroupRewriteResult {}
+
+  @Value.Immutable
+  interface FileGroupInfo extends RewritePositionDeleteFiles.FileGroupInfo {}
+}
diff --git 
a/core/src/main/java/org/apache/iceberg/view/BaseViewHistoryEntry.java 
b/core/src/main/java/org/apache/iceberg/actions/BaseSnapshotTable.java
similarity index 64%
copy from core/src/main/java/org/apache/iceberg/view/BaseViewHistoryEntry.java
copy to core/src/main/java/org/apache/iceberg/actions/BaseSnapshotTable.java
index 0562af5f7f..fb8fbaca3d 100644
--- a/core/src/main/java/org/apache/iceberg/view/BaseViewHistoryEntry.java
+++ b/core/src/main/java/org/apache/iceberg/actions/BaseSnapshotTable.java
@@ -16,19 +16,20 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.iceberg.view;
+package org.apache.iceberg.actions;
 
 import org.immutables.value.Value;
+import org.immutables.value.Value.Style.BuilderVisibility;
+import org.immutables.value.Value.Style.ImplementationVisibility;
 
-/**
- * View history entry.
- *
- * <p>An entry contains a change to the view state. At the given timestamp, 
the current version was
- * set to the given version ID.
- */
[email protected]
-// https://github.com/immutables/immutables/issues/291 does not apply here 
because we're not adding
-// any Immutable-specific class to the classpath
[email protected]
 @SuppressWarnings("ImmutablesStyle")
[email protected](typeImmutable = "ImmutableViewHistoryEntry")
-public interface BaseViewHistoryEntry extends ViewHistoryEntry {}
[email protected](
+    typeImmutableEnclosing = "ImmutableSnapshotTable",
+    visibility = ImplementationVisibility.PUBLIC,
+    builderVisibility = BuilderVisibility.PUBLIC)
+interface BaseSnapshotTable extends SnapshotTable {
+
+  @Value.Immutable
+  interface Result extends SnapshotTable.Result {}
+}
diff --git 
a/core/src/main/java/org/apache/iceberg/view/BaseViewHistoryEntry.java 
b/core/src/main/java/org/apache/iceberg/view/BaseViewHistoryEntry.java
index 0562af5f7f..3ce28142ea 100644
--- a/core/src/main/java/org/apache/iceberg/view/BaseViewHistoryEntry.java
+++ b/core/src/main/java/org/apache/iceberg/view/BaseViewHistoryEntry.java
@@ -19,6 +19,8 @@
 package org.apache.iceberg.view;
 
 import org.immutables.value.Value;
+import org.immutables.value.Value.Style.BuilderVisibility;
+import org.immutables.value.Value.Style.ImplementationVisibility;
 
 /**
  * View history entry.
@@ -27,8 +29,9 @@ import org.immutables.value.Value;
  * set to the given version ID.
  */
 @Value.Immutable
-// https://github.com/immutables/immutables/issues/291 does not apply here 
because we're not adding
-// any Immutable-specific class to the classpath
 @SuppressWarnings("ImmutablesStyle")
[email protected](typeImmutable = "ImmutableViewHistoryEntry")
-public interface BaseViewHistoryEntry extends ViewHistoryEntry {}
[email protected](
+    typeImmutable = "ImmutableViewHistoryEntry",
+    visibility = ImplementationVisibility.PUBLIC,
+    builderVisibility = BuilderVisibility.PUBLIC)
+interface BaseViewHistoryEntry extends ViewHistoryEntry {}
diff --git a/core/src/main/java/org/apache/iceberg/view/BaseViewVersion.java 
b/core/src/main/java/org/apache/iceberg/view/BaseViewVersion.java
index ca6c2dfc28..986628a911 100644
--- a/core/src/main/java/org/apache/iceberg/view/BaseViewVersion.java
+++ b/core/src/main/java/org/apache/iceberg/view/BaseViewVersion.java
@@ -21,6 +21,8 @@ package org.apache.iceberg.view;
 import javax.annotation.Nullable;
 import org.apache.iceberg.catalog.Namespace;
 import org.immutables.value.Value;
+import org.immutables.value.Value.Style.BuilderVisibility;
+import org.immutables.value.Value.Style.ImplementationVisibility;
 
 /**
  * A version of the view at a point in time.
@@ -30,11 +32,12 @@ import org.immutables.value.Value;
  * <p>Versions are created by view operations, like Create and Replace.
  */
 @Value.Immutable
-// https://github.com/immutables/immutables/issues/291 does not apply here 
because we're not adding
-// any Immutable-specific class to the classpath
 @SuppressWarnings("ImmutablesStyle")
[email protected](typeImmutable = "ImmutableViewVersion")
-public interface BaseViewVersion extends ViewVersion {
[email protected](
+    typeImmutable = "ImmutableViewVersion",
+    visibility = ImplementationVisibility.PUBLIC,
+    builderVisibility = BuilderVisibility.PUBLIC)
+interface BaseViewVersion extends ViewVersion {
 
   @Override
   @Value.Lazy

Reply via email to