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


##########
core/src/main/java/org/apache/iceberg/TrackedFileAdapters.java:
##########
@@ -23,10 +23,21 @@
 import java.util.Map;
 import java.util.Set;
 import org.apache.iceberg.relocated.com.google.common.base.Preconditions;
+import org.apache.iceberg.types.Type;
+import org.apache.iceberg.types.Types;
+import org.apache.iceberg.util.StructProjection;
 
-/** Adapts {@link TrackedFile} entries to their read APIs, for example {@link 
DataFile}. */
+/**
+ * Adapts between the {@link TrackedFile} row and the {@link DataFile} / 
{@link DeleteFile} / {@link
+ * ManifestFile} APIs in both directions.
+ */
 class TrackedFileAdapters {
 
+  private static final int TRACKED_FILE_FIELD_COUNT =
+      TrackedFile.schema(Types.StructType.of(), 
Types.StructType.of()).asStruct().fields().size();
+
+  private static final int MANIFEST_INFO_FIELD_COUNT = 
ManifestInfo.schema().fields().size();

Review Comment:
   I don't think either of these constants will be needed since these classes 
should not be implementing `StructLike`.
   
   The adapters should have one purpose, which is to adapt from public 
interfaces (like `DataFile`) to the storage interfaces (like `TrackedFile`).



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