anuragmantri commented on code in PR #18486:
URL: https://github.com/apache/iceberg/pull/18486#discussion_r4485191277
##########
core/src/main/java/org/apache/iceberg/encryption/InputFilesDecryptor.java:
##########
@@ -48,8 +49,14 @@ public InputFilesDecryptor(
EncryptingFileIO.combine(io, encryption));
}
+ /**
+ * Returns a decryptor for the files referenced by the given tasks.
+ *
+ * <p>Resolution of referenced files are performed lazily on the first call
of {@link
+ * #getInputFile(String)}.
Review Comment:
```suggestion
* <p>Referenced files are resolved on the first call to {@link
#getInputFile(String)}.
```
##########
api/src/main/java/org/apache/iceberg/HasReferencedFiles.java:
##########
@@ -0,0 +1,29 @@
+/*
+ * 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;
+
+/** A {@link ScanTask} that can list the content files it reads. */
+public interface HasReferencedFiles {
+ /**
+ * Returns all content files that must be read to process this task
+ *
+ * @return the content files referenced by this task
+ */
+ Iterable<ContentFile<?>> referencedFiles();
Review Comment:
Option 3 makes sense to me, thanks. Agreed on keeping the explicit interface
too.
--
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]