Skip to content

Commit

Permalink
Trino 465 - Ensure module instances are not shared by multiple JDBC c…
Browse files Browse the repository at this point in the history
…atalogs
  • Loading branch information
wAVeckx committed Nov 26, 2024
1 parent d72aa5c commit fa282cd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</parent>

<artifactId>trino-jtopen</artifactId>
<version>464</version>
<version>465</version>
<packaging>trino-plugin</packaging>
<description>Trino - JTOpen Connector</description>

Expand All @@ -28,7 +28,7 @@
<dep.airlift.version>285</dep.airlift.version>
<dep.slice.version>2.3</dep.slice.version>
<dep.opentelemetry.version>1.44.1</dep.opentelemetry.version>
<dep.opentelemetry-instrumentation.version>2.9.0</dep.opentelemetry-instrumentation.version>
<dep.opentelemetry-instrumentation.version>2.10.0</dep.opentelemetry-instrumentation.version>
<dep.packaging.version>${dep.airlift.version}</dep.packaging.version>
<dep.guava.version>33.3.1-jre</dep.guava.version>
<dep.guice.version>7.0.0</dep.guice.version>
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/io/trino/plugin/jtopen/JTOpenClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import io.trino.plugin.jdbc.JdbcColumnHandle;
import io.trino.plugin.jdbc.JdbcExpression;
import io.trino.plugin.jdbc.JdbcJoinCondition;
import io.trino.plugin.jdbc.JdbcMetadata;
import io.trino.plugin.jdbc.JdbcOutputTableHandle;
import io.trino.plugin.jdbc.JdbcProcedureHandle;
import io.trino.plugin.jdbc.JdbcProcedureHandle.ProcedureQuery;
Expand Down Expand Up @@ -698,7 +699,7 @@ private TableStatistics readTableStatistics(ConnectorSession session, JdbcTableH

Map<String, Map<String, Long>> allColumnStatistics = statisticsDao.getAllColumnStatistics(table);

for (JdbcColumnHandle column : this.getColumns(session, table)) {
for (JdbcColumnHandle column : JdbcMetadata.getColumns(session, this, table)) {
String columnName = column.getColumnName();
Map<String, Long> columnStatistics = allColumnStatistics.getOrDefault(columnName, new HashMap<>());

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/trino/plugin/jtopen/JTOpenPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ public class JTOpenPlugin
{
public JTOpenPlugin()
{
super("jtopen", new JTOpenClientModule());
super("jtopen", JTOpenClientModule::new);
}
}

0 comments on commit fa282cd

Please sign in to comment.