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


##########
core/src/main/java/org/apache/iceberg/TrackedFile.java:
##########
@@ -0,0 +1,149 @@
+/*
+ * 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;
+
+import java.nio.ByteBuffer;
+import java.util.List;
+import java.util.Set;
+import org.apache.iceberg.stats.ContentStats;
+import org.apache.iceberg.types.Types;
+
+/** A v4 manifest entry that combines content metadata with tracking 
information. */
+interface TrackedFile {
+  Types.NestedField CONTENT_TYPE =
+      Types.NestedField.required(
+          134,
+          "content_type",
+          Types.IntegerType.get(),
+          "Type of content: 0=DATA, 2=EQUALITY_DELETES, 3=DATA_MANIFEST, 
4=DELETE_MANIFEST");
+  Types.NestedField LOCATION =
+      Types.NestedField.required(100, "location", Types.StringType.get(), 
"Location of the file");
+  Types.NestedField FILE_FORMAT =
+      Types.NestedField.required(
+          101,
+          "file_format",
+          Types.StringType.get(),
+          "String file format name: avro, orc, parquet, or puffin");
+  Types.NestedField TRACKING =
+      Types.NestedField.required(
+          147, "tracking", Tracking.schema(), "Tracking information for this 
entry");
+  Types.NestedField DELETION_VECTOR =
+      Types.NestedField.optional(
+          148, "deletion_vector", DeletionVector.schema(), "Deletion vector 
for the data file");
+  Types.NestedField PARTITION_SPEC_ID =

Review Comment:
   I think we need to change this comment. It is no longer correct to say "used 
to write this file or manifest". That sounds like it was copied from the old 
`ManifestFile` field (id=502) that was "Spec ID used to write", but that's no 
longer valid.
   
   Rather than writing an entire manifest with a single spec, files from any 
spec can now be written into a manifest. That means manifests themselves do not 
have a spec ID and instead specs are attached to individual content files. 
That's why a new ID is appropriate.
   
   I would use "Spec ID used to partition the file".



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