stevenzwu commented on code in PR #16936:
URL: https://github.com/apache/iceberg/pull/16936#discussion_r3461486313


##########
api/src/main/java/org/apache/iceberg/ManifestFile.java:
##########
@@ -186,6 +186,26 @@ default boolean hasDeletedFiles() {
   /** Returns the total number of rows in all files with status DELETED in the 
manifest file. */
   Long deletedRowsCount();
 
+  /**
+   * Returns the number of files with status REPLACED in the manifest file, or 
null if not tracked.
+   *
+   * <p>REPLACED files are the prior-state entries of v4 REPLACED/MODIFIED 
pairs and are not live.
+   * Returns null for manifest files written by pre-v4 writers.
+   */
+  default Integer replacedFilesCount() {

Review Comment:
   **Projected new default methods across the full v4 stack:**
   
   _Already landed or in flight (3)_:
   - `default Integer replacedFilesCount()` — this PR. Read by 
`ContentEntryAdapters.manifestInfo()` and 
`MergingSnapshotProducer.validateAddedDVs` (follow-up).
   - `default Long replacedRowsCount()` — this PR. Companion to 
`replacedFilesCount`.
   - `default int writerFormatVersion()` — root-manifest writer/reader PR. Read 
by `RootManifestWriter.addEntry()` for per-leaf format dispatch in the root 
manifest.
   
   _Likely next wave (+2), gated on `ManifestInfo` schema extension_:
   - `default Integer modifiedFilesCount()` — v4 MODIFIED entry count (live 
half of REPLACED/MODIFIED pairs).
   - `default Long modifiedRowsCount()` — companion.
   
   _Possible if specific v4 spec features land (manifest DV)_:
   - `default ByteBuffer deletedPositions()` — root-level manifest DV bitmaps 
(currently out-of-scope optimization).
   - `default ByteBuffer replacedPositions()` — same.
   
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to