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


##########
core/src/main/java/org/apache/iceberg/TrackedFileAdapters.java:
##########
@@ -53,6 +63,49 @@ static DeleteFile asEqualityDeleteFile(TrackedFile file, 
Map<Integer, PartitionS
     return new TrackedEqualityDeleteFile(file, resolveSpec(file, specsById));
   }
 
+  /**
+   * Returns a reusable wrapper that presents a {@link DataFile} as a {@link 
TrackedFile} row.
+   *
+   * @param formatVersion the target table's format version (must be 4+)
+   * @param tableSchema table schema used to build {@link ContentStats} from 
the file's stats
+   * @param metricsConfig metrics config used to prune the content stats schema
+   * @param partitionType target partition struct type; use one spec's 
partition type for a
+   *     single-spec manifest, or the union across live specs for a multi-spec 
manifest
+   */
+  static DataTrackedFile forDataFile(

Review Comment:
   It looks like this has a different API than the adapters from `TrackedFile` 
to `ManifestFile` and `DataFile`. Those create a wrapper on each call, while 
this creates a wrapper that can be reused. I like the reuse, but we should be 
consistent.



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