-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Implement Join pushdown for JDBC connectors #6874
Conversation
15a633f
to
90a814d
Compare
6dcb5e7
to
b912651
Compare
52e8f42
to
0cec252
Compare
9309fe0
to
6f64b48
Compare
plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcMetadata.java
Show resolved
Hide resolved
plugin/trino-memsql/src/main/java/io/trino/plugin/memsql/MemSqlClient.java
Outdated
Show resolved
Hide resolved
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.
ack
plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcMetadataConfig.java
Outdated
Show resolved
Hide resolved
return !(joinCondition.getLeftColumn().getColumnType() instanceof CharType) && | ||
!(joinCondition.getLeftColumn().getColumnType() instanceof VarcharType) && | ||
!(joinCondition.getRightColumn().getColumnType() instanceof CharType) && | ||
!(joinCondition.getRightColumn().getColumnType() instanceof VarcharType); |
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.
Don't we need to extract this as method and reuse it? As:
Remote database can be case insensitive.
is a quite common case.
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.
Need -- no.
Want -- i don't know.
I don't want to bloat BaseJdbcClient, but this can go somewhere else
...-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlIntegrationSmokeTest.java
Outdated
Show resolved
Hide resolved
} | ||
|
||
@Test | ||
public void testJoinPushdown() |
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.
It looks like a feature is written in a generic way, while testing only happens for PostgreSQL. Can we somehow disable this in other connectors until the moment test coverage is added to them?
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.
it's disabled by default, and i am still thinking how to apply the test to all connectors, sanely.
...-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlIntegrationSmokeTest.java
Outdated
Show resolved
Hide resolved
cc69438
to
0e3aa2c
Compare
0e3aa2c
to
82975a1
Compare
PTAL |
not PTAL yet |
9b632a2
to
6bfe97d
Compare
May work now. PTAL |
1cc7e39
to
fcb1a5b
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.
Some comments. Didn't review any changes in planner or JdbcMetadata.
plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcMetadataConfig.java
Outdated
Show resolved
Hide resolved
plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/BaseJdbcConnectorTest.java
Outdated
Show resolved
Hide resolved
Map<JdbcColumnHandle, String> rightAssignments, | ||
Map<JdbcColumnHandle, String> leftAssignments) | ||
{ | ||
if (joinType == JoinType.FULL_OUTER) { |
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.
static import for this and IS_DISTINCT_FROM.
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 didn't want to static import these, because there can be multiple different ways of referring to joins and Client is not join-specific.
All am saying is that it was conscious, but still am open to suggestions
plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcMetadataConfig.java
Outdated
Show resolved
Hide resolved
plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcMetadata.java
Outdated
Show resolved
Hide resolved
5b692ff
to
8b85913
Compare
I changed the |
8b85913
to
3167b44
Compare
these are reviewed over here: #7145 |
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.
Nice!
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.
ack.
1d9ed57
to
2dca5ff
Compare
sqlserver join pushdown across dbs blocked by #4690 |
For #6620