Skip to content

Commit

Permalink
Verify JVM configuration in Snowflake connector
Browse files Browse the repository at this point in the history
Snowflake connector uses Arrow which requires additional JVM arguments.
  • Loading branch information
hashhar committed Jan 15, 2025
1 parent ce3c487 commit 8ef0ea9
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@
*/
package io.trino.plugin.snowflake;

import com.google.common.collect.ImmutableMultimap;
import com.google.inject.Binder;
import com.google.inject.Module;
import com.google.inject.Provides;
import com.google.inject.Scopes;
import com.google.inject.Singleton;
import io.opentelemetry.api.OpenTelemetry;
import io.trino.plugin.base.JdkCompatibilityChecks;
import io.trino.plugin.jdbc.BaseJdbcConfig;
import io.trino.plugin.jdbc.ConnectionFactory;
import io.trino.plugin.jdbc.DriverConnectionFactory;
Expand Down Expand Up @@ -46,6 +48,11 @@ public class SnowflakeClientModule
@Override
public void configure(Binder binder)
{
// Check reflective access allowed - required by Apache Arrow usage in Snowflake JDBC driver
JdkCompatibilityChecks.verifyConnectorAccessOpened(
binder,
"snowflake",
ImmutableMultimap.of("java.base", "java.nio"));
binder.bind(JdbcClient.class).annotatedWith(ForBaseJdbc.class).to(SnowflakeClient.class).in(Scopes.SINGLETON);
configBinder(binder).bindConfig(SnowflakeConfig.class);
configBinder(binder).bindConfig(TypeHandlingJdbcConfig.class);
Expand Down

0 comments on commit 8ef0ea9

Please sign in to comment.