Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

raunaqmorarka
Copy link
Member

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:

## Section
* Fix some things. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label Feb 24, 2025
@raunaqmorarka raunaqmorarka force-pushed the raunaq/jdbc-page branch 5 times, most recently from 5cc9309 to d35009f Compare February 25, 2025 08:35
@github-actions github-actions bot added the redshift Redshift connector label Feb 25, 2025
catch (SQLException | RuntimeException e) {
throw handleSqlException(e);
}
return 0;
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

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.

Copy link
Member Author

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, ship it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants