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**, all spec-defined 
additions backing v4 `manifest_info` / `content_entry` fields:
   
   _In this PR_:
   - `default Integer replacedFilesCount()`
   - `default Long replacedRowsCount()`
   
   _In the root-manifest writer/reader PR (next in this stack)_:
   - `default int writerFormatVersion()` — read by 
`RootManifestWriter.addEntry()` for per-leaf format dispatch in the root 
manifest.
   
   _In subsequent v4 PRs_:
   - `default Integer modifiedFilesCount()` — v4 MODIFIED entry count. Produced 
by two spec-defined paths: (a) data file DV update (paired with REPLACED), (b) 
manifest DV mutation alone (no REPLACED pair, when root-level 
`deletedPositions` / `replacedPositions` bitmaps update a leaf manifest entry 
in place). Requires adding `MODIFIED_FILES_COUNT` / `MODIFIED_ROWS_COUNT` 
fields to `ManifestInfo`.
   - `default Long modifiedRowsCount()` — companion.
   
   _Possible if root-level manifest DV bitmaps are implemented (currently out 
of scope per the v4 stack plan)_:
   - `default ByteBuffer deletedPositions()`
   - `default ByteBuffer replacedPositions()`



-- 
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