-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Override default implementation of skip(long)
method
#18977
Override default implementation of skip(long)
method
#18977
Conversation
lib/trino-hdfs/src/main/java/io/trino/filesystem/hdfs/HdfsTrinoInputStream.java
Outdated
Show resolved
Hide resolved
4dbfc5c
to
2473ea3
Compare
2473ea3
to
822102c
Compare
cc8fb2d
to
8db9715
Compare
lib/trino-filesystem-s3/src/main/java/io/trino/filesystem/s3/S3InputStream.java
Outdated
Show resolved
Hide resolved
Where are we using |
lib/trino-filesystem-s3/src/main/java/io/trino/filesystem/s3/S3InputStream.java
Outdated
Show resolved
Hide resolved
Changes requested for the To answer my previous question: I found that |
See here the hierarchy of calls |
8db9715
to
3862260
Compare
3862260
to
87ddc4e
Compare
lib/trino-hdfs/src/main/java/io/trino/filesystem/hdfs/HdfsTrinoInputStream.java
Show resolved
Hide resolved
Delegate to `stream` the implementation of `skip(long)` method. By doing this, it is ensured that not the default implementation from `java.io.InputStream` is being used, because it calls `read()` causing actual reads from the underlying input stream although `skip` is just a logical operation. Co-authored-by: James Petty <[email protected]>
87ddc4e
to
3af6109
Compare
Removed the changes in |
/test-with-secrets sha=3af6109e7dc6a9f286f84c6c84b66bcf342c4967 |
The CI workflow run with tests that require additional secrets has been started: https://github.com/trinodb/trino/actions/runs/6145626334 |
Description
Delegate to
stream
the implementation ofskip(long)
method. By doing this, it is ensured that not the default implementation fromjava.io.InputStream
is being used, because it callsread()
causing actual reads from the underlying input stream althoughskip
is just a logical operation.Additional context and related issues
Fixes #18976
Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
(x) Release notes are required, with the following suggested text: