-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Migrate JDBC to page source API #25123
base: master
Are you sure you want to change the base?
Conversation
5cc9309
to
d35009f
Compare
plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcPageSource.java
Outdated
Show resolved
Hide resolved
plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcPageSource.java
Outdated
Show resolved
Hide resolved
plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcPageSource.java
Outdated
Show resolved
Hide resolved
plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcPageSource.java
Outdated
Show resolved
Hide resolved
plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcPageSource.java
Outdated
Show resolved
Hide resolved
catch (SQLException | RuntimeException e) { | ||
throw handleSqlException(e); | ||
} | ||
return 0; |
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.
we can calculate this, right?
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 only the underlying driver can give us the accurate bytes read count.
In this code we're only able to see the Java objects returned by the driver, that's not the same as bytes read over the wire.
Even if we want to use the Java objects size as a proxy for bytes read, we don't have a nice way to get the size of the object returned by io.trino.plugin.jdbc.ObjectReadFunction#readObject
. I expect that this number would turn out to be similar to processed input bytes that is tracked by the engine anyway.
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.
Can we repot size of the pages created? This is a rough estimate on the size of the data since we are not using dictionary encoding here. Most of the databases are using binary framing which is similiar to our in memory structures.
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.
Processed input bytes is already tracking size of pages and that is done by the engine independently of the connector, this field is about the connector reporting physical input bytes
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.
Sure, ship it!
d35009f
to
bfbff88
Compare
Description
Additional context and related issues
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.
( ) Release notes are required, with the following suggested text: