danielcweeks commented on code in PR #13997:
URL: https://github.com/apache/iceberg/pull/13997#discussion_r2331541665


##########
api/src/main/java/org/apache/iceberg/io/RangeReadable.java:
##########
@@ -77,4 +80,37 @@ default void readFully(long position, byte[] buffer) throws 
IOException {
   default int readTail(byte[] buffer) throws IOException {
     return readTail(buffer, 0, buffer.length);
   }
+
+  /**
+   * Is the {@link #readVectored(List, IntFunction)} method available?
+   *
+   * @param allocate the allocator to use for allocating ByteBuffers
+   * @return True if the operation is considered available for this allocator.
+   */
+  default boolean readVectoredAvailable(IntFunction<ByteBuffer> allocate) {

Review Comment:
   I feel like we're overcomplicating this.  The `readVectoredAvailable` 
doesn't seem necessary if the implementation is already providing a range 
readable interface.  The default behavior could simply read sequentially, which 
is what parquet will fallback to, but without the bounded reads.  Then we just 
need to add `readVectored` and `readVectoredAvailable` is just whether the 
delegate stream is `RangeReadable`



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