Skip to content

Instantly share code, notes, and snippets.

@arbelt
Last active July 25, 2019 20:24
Show Gist options
  • Save arbelt/259594eb7d8b719808cc052f37dc5117 to your computer and use it in GitHub Desktop.
Save arbelt/259594eb7d8b719808cc052f37dc5117 to your computer and use it in GitHub Desktop.
Add connection parameters to JDBC connections for Drill 1.16
diff --git a/contrib/storage-jdbc/src/main/java/org/apache/drill/exec/store/jdbc/JdbcStoragePlugin.java b/contrib/storage-jdbc/src/main/java/org/apache/drill/exec/store/jdbc/JdbcStoragePlugin.java
index ebff37173..16dc163c9 100755
--- a/contrib/storage-jdbc/src/main/java/org/apache/drill/exec/store/jdbc/JdbcStoragePlugin.java
+++ b/contrib/storage-jdbc/src/main/java/org/apache/drill/exec/store/jdbc/JdbcStoragePlugin.java
@@ -90,6 +90,8 @@ public class JdbcStoragePlugin extends AbstractStoragePlugin {
source.setDriverClassName(config.getDriver());
source.setUrl(config.getUrl());
+ source.addConnectionProperty("defaultRowPrefetch", "200");
+
if (config.getUsername() != null) {
source.setUsername(config.getUsername());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment