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


##########
core/src/main/java/org/apache/iceberg/inmemory/InMemoryInputFile.java:
##########
@@ -29,36 +30,59 @@ public class InMemoryInputFile implements InputFile {
 
   private final String location;
   private final byte[] contents;
+  private final InMemoryFileIO parentFileIO;
 
   public InMemoryInputFile(byte[] contents) {
     this("memory:" + UUID.randomUUID(), contents);
   }
 
   public InMemoryInputFile(String location, byte[] contents) {
     Preconditions.checkNotNull(location, "location is null");
-    Preconditions.checkNotNull(contents, "contents is null");

Review Comment:
   I thought that this was closer to how the API should behave. Otherwise, you 
can't create an `InputFile` that doesn't exist through this constructor and 
that means you can test uses of `exists()` if the test suite constructs 
`InputFile` directly. With this change, you can construct `InputFile` so that 
`exists()` returns false and `newStream()` throws `NotFoundException` like 
other implementations.



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