varun-lakhyani commented on code in PR #17284:
URL: https://github.com/apache/iceberg/pull/17284#discussion_r3844989901


##########
core/src/main/java/org/apache/iceberg/io/EagerInputFile.java:
##########
@@ -60,12 +76,35 @@ public boolean exists() {
 
   @Override
   public SeekableInputStream newStream() {
-    byte[] bytes = new byte[(int) fileSize];
+    byte[] bytes = new byte[(int) length];
     try (SeekableInputStream src = delegate.newStream()) {
       IOUtil.readFully(src, bytes, 0, bytes.length);
     } catch (IOException e) {
       throw new RuntimeIOException(e, "Failed to fetch file: %s", 
delegate.location());
     }
     return new EagerInputStream(bytes);
   }
+
+  /** An {@link EagerInputFile} that carries the delegate's Hadoop 
configuration. */
+  private static class EagerInputFileConfigurable extends EagerInputFile
+      implements HadoopConfigurable {
+
+    private final Configuration conf;
+
+    EagerInputFileConfigurable(InputFile delegate, long length, Configuration 
conf) {
+      super(delegate, length);

Review Comment:
   instead of passing conf we can cast and call it delegate.conf in getConf



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