rdblue commented on code in PR #9592: URL: https://github.com/apache/iceberg/pull/9592#discussion_r1495065683
########## api/src/main/java/org/apache/iceberg/io/FileIO.java: ########## @@ -42,6 +46,30 @@ default InputFile newInputFile(String path, long length) { return newInputFile(path); } + default InputFile newInputFile(DataFile file) { + Preconditions.checkArgument( + file.keyMetadata() == null, + "Cannot decrypt data file: {} (use EncryptingFileIO)", Review Comment: I think it's clear that the data file is encrypted, so I would omit that addition. And the "without configured EncryptingFileIO" is a stronger statement that isn't quite right. You can decrypt a data file using an `EncryptionManager` and `newInputFile(String)` but if you want to use this method, you must use `EncryptingFileIO`. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org