danielcweeks commented on code in PR #13997: URL: https://github.com/apache/iceberg/pull/13997#discussion_r2370442650
########## parquet/src/main/java/org/apache/iceberg/parquet/ParquetIO.java: ########## @@ -123,6 +136,72 @@ public void seek(long newPos) throws IOException { } } + private static class ParquetRangeReadableInputStreamAdapter< + T extends org.apache.iceberg.io.SeekableInputStream & RangeReadable> + extends DelegatingSeekableInputStream implements RangeReadable { + private final T delegate; + + private ParquetRangeReadableInputStreamAdapter(T delegate) { + super(delegate); + this.delegate = delegate; + } + + @Override + public long getPos() throws IOException { + return delegate.getPos(); + } + + @Override + public void seek(long newPos) throws IOException { + delegate.seek(newPos); + } + + @Override + public void readFully(long position, byte[] buffer, int offset, int length) throws IOException { + delegate.readFully(position, buffer, offset, length); + } + + @Override + public int readTail(byte[] buffer, int offset, int length) throws IOException { + return delegate.readTail(buffer, offset, length); + } + + @Override + public boolean readVectoredAvailable(ByteBufferAllocator allocate) { + return true; + } + + @Override + public void readVectored(List<ParquetFileRange> ranges, ByteBufferAllocator allocate) Review Comment: Can we add some tests at the ParquetIO level to validate this? I know we're adding some in S3FileIO, but it would be good to have this interface tested (even if there's a mock implementation) -- 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