-
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
Optimize column listing to not require fetching table properties #23429
Optimize column listing to not require fetching table properties #23429
Conversation
656de17
to
4f0a72a
Compare
while working on this I noticed that we do confusing things in some places. e.g. |
For Ignite and Phoenix specifically I'll send a follow-up PR to "unhide" the autogenerated columns we add in case the user doesn't specify primary key (which is required for those systems). |
4f0a72a
to
b1d47f7
Compare
...ostgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlJdbcConnectionCreation.java
Show resolved
Hide resolved
...ostgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlJdbcConnectionCreation.java
Show resolved
Hide resolved
...ostgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlJdbcConnectionCreation.java
Outdated
Show resolved
Hide resolved
plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/DefaultJdbcMetadata.java
Outdated
Show resolved
Hide resolved
plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/DefaultJdbcMetadata.java
Outdated
Show resolved
Hide resolved
b1d47f7
to
6461364
Compare
@kokosing PTAL at the fixups + Add tests to count I/O operations in JDBC connectors (which is the only new commit, it replaces Disable connection reuse in connection counting tests). |
6461364
to
d0fe3ad
Compare
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.
Well done!
This makes it possible to inject a different `ConnectionFactory` in SQL Server connector.
This test is only an approximation since we assume that for each query a new connection is being opened today. In future we can implement a more thorough test by wrapping Connection, Statement and PreparedStatement and counting invocations of various methods.
Before this change table metadata was fetched when listing columns which ended up fetching table properties for JDBC connectors which incurs I/O in connectors which support them.
d0fe3ad
to
b82fbdf
Compare
Squashed the fixups, will merge after CI. |
Description
Before this change table metadata was fetched when listing columns which
ended up fetching table properties for JDBC connectors which incurs I/O
in connectors which support them.
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: