Skip to content

Commit

Permalink
Enable virtual threads for SQL Server JDBC
Browse files Browse the repository at this point in the history
Per microsoft/mssql-jdbc#1931 this is safe to use mssql-jdbc with VT
  • Loading branch information
wendigo committed Jan 20, 2024
1 parent 189d529 commit bcb143e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import static io.airlift.configuration.ConfigBinder.configBinder;
import static io.trino.plugin.jdbc.JdbcModule.bindSessionPropertiesProvider;
import static io.trino.plugin.jdbc.JdbcModule.bindTablePropertiesProvider;
import static io.trino.plugin.jdbc.JdbcModule.enableVirtualThreads;
import static io.trino.plugin.sqlserver.SqlServerClient.SQL_SERVER_MAX_LIST_EXPRESSIONS;

public class SqlServerClientModule
Expand All @@ -63,6 +64,8 @@ protected void setup(Binder binder)
SqlServerConfig.class,
SqlServerConfig::isStoredProcedureTableFunctionEnabled,
internalBinder -> newSetBinder(internalBinder, ConnectorTableFunction.class).addBinding().toProvider(Procedure.class).in(Scopes.SINGLETON)));

enableVirtualThreads(binder);
}

@Provides
Expand Down

0 comments on commit bcb143e

Please sign in to comment.