ConeyLiu commented on code in PR #4898:
URL: https://github.com/apache/iceberg/pull/4898#discussion_r911644907


##########
core/src/test/java/org/apache/iceberg/TestManifestReader.java:
##########
@@ -142,9 +147,61 @@ public void testDeleteFilePositions() throws IOException {
       long expectedPos = 0L;
       for (DeleteFile file : reader) {
         Assert.assertEquals("Position should match", (Long) expectedPos, 
file.pos());
-        Assert.assertEquals("Position from field index should match", 
expectedPos, ((BaseFile) file).get(17));
+        Assert.assertEquals("Position from field index should match", 
expectedPos, ((BaseFile) file).get(18));
         expectedPos += 1;
       }
     }
   }
+
+  @Test
+  public void testManifestCompatible() throws IOException {
+    Schema schema = new Schema(
+        required(1, "id", Types.LongType.get()),
+        required(2, "timestamp", Types.TimestampType.withZone()),
+        required(3, "category", Types.StringType.get()),
+        required(4, "data", Types.StringType.get()),
+        required(5, "double", Types.DoubleType.get()));
+
+    PartitionSpec spec = PartitionSpec.builderFor(schema)
+        .identity("category")
+        .hour("timestamp")
+        .bucket("id", 16)
+        .build();
+    PartitionData partition = DataFiles.data(spec, 
"category=cheesy/timestamp_hour=10/id_bucket=3");
+
+    String path = 
"s3://bucket/table/category=cheesy/timestamp_hour=10/id_bucket=3/file.avro";

Review Comment:
   There is a check: `Assert.assertEquals("File path should match", path, 
entry.file().path());`



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