-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Document TrinoInput contract #27160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document TrinoInput contract #27160
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
lib/trino-filesystem/src/main/java/io/trino/filesystem/TrinoInput.java
Outdated
Show resolved
Hide resolved
lib/trino-filesystem/src/main/java/io/trino/filesystem/TrinoInput.java
Outdated
Show resolved
Hide resolved
lib/trino-filesystem/src/main/java/io/trino/filesystem/TrinoInput.java
Outdated
Show resolved
Hide resolved
b0b769b to
a64bfd7
Compare
raunaqmorarka
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm % comments
| * | ||
| * @param buffer the buffer to read bytes into; must be non-null | ||
| * @param bufferOffset the offset in the buffer to start writing bytes to; must be non-negative | ||
| * @param maxLength the maximum number of bytes to read; must be non-negative |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is maxLength allowed to be bigger than remaining space in buffer ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think it's not allowed
| * | ||
| * @param buffer the buffer to read bytes into; must be non-null | ||
| * @param bufferOffset the offset in the buffer to start writing bytes to; must be non-negative | ||
| * @param maxLength the maximum number of bytes to read; must be non-negative |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is maxLength allowed to be bigger than file size ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for readTail - i think it is allowed
| * @param maxLength the maximum number of bytes to read; must be non-negative | ||
| * @return the number of bytes actually read, which may be less than {@code maxLength} if | ||
| * the input contains fewer bytes than {@code maxLength} | ||
| */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@throws ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
omitted intentionally, i have no information to add beyond what's already in the method signature
lib/trino-filesystem/src/main/java/io/trino/filesystem/TrinoInput.java
Outdated
Show resolved
Hide resolved
a64bfd7 to
026398b
Compare
026398b to
e673a7e
Compare
Summary by Sourcery
Document the behavior and error contracts for TrinoInput’s readFully and readTail methods
Enhancements: