gaborkaszab commented on code in PR #18884:
URL: https://github.com/apache/iceberg/pull/18884#discussion_r4561488130


##########
core/src/test/java/org/apache/iceberg/TestRootManifestFile.java:
##########
@@ -127,4 +130,41 @@ void unsupportedAccessorsThrow() {
         .isInstanceOf(UnsupportedOperationException.class)
         .hasMessage("Root manifest has no partition summaries");
   }
+
+  @Test
+  void fromResolvesRelativeRootLocation() {
+    Snapshot snapshot = Mockito.mock(Snapshot.class);
+    
Mockito.when(snapshot.rootManifestLocation()).thenReturn("metadata/root.parquet");
+    Mockito.when(snapshot.snapshotId()).thenReturn(SNAPSHOT_ID);
+    Mockito.when(snapshot.sequenceNumber()).thenReturn(SEQUENCE_NUMBER);
+    Mockito.when(snapshot.firstRowId()).thenReturn(FIRST_ROW_ID);
+
+    String resolved = "s3://bucket/db/table/metadata/root.parquet";
+    FileIO io = Mockito.mock(FileIO.class);
+    InputFile input = Mockito.mock(InputFile.class);
+    Mockito.when(io.newInputFile(resolved)).thenReturn(input);

Review Comment:
   We'd definitely forget to drop these lines once we store length directly in 
`Snapshot` :)



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