HikariCP Dremio JDBC feature not supported exception

Hi,

When we try to register a dremio jdbc connection pool using HikariCP, we are getting this following error

2018-09-10 12:38:28.448 ERROR 840 — [pool-1-thread-1] com.zaxxer.hikari.pool.HikariPool : 5d50d1e0-1707-4350-8648-ffb3f69aca76 - Exception during pool initialization.

java.sql.SQLFeatureNotSupportedException: null
at cdjd.org.apache.calcite.avatica.Helper.unsupported(Helper.java:68)
at cdjd.org.apache.calcite.avatica.AvaticaConnection.isValid(AvaticaConnection.java:373)
at com.dremio.jdbc.impl.DremioConnectionImpl.isValid(DremioConnectionImpl.java:582)
at com.zaxxer.hikari.pool.PoolBase.checkDriverSupport(PoolBase.java:445)
at com.zaxxer.hikari.pool.PoolBase.setupConnection(PoolBase.java:412)
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:370)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:194)
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:460)
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:534)
at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:115)
at com.zaxxer.hikari.HikariDataSource.(HikariDataSource.java:81)

Upon inspection, we found that the underlying calcite jdbc driver used by dremio doesn’t support isValid(timeout) method, which is required for JDBC4 compliant HikariCP connections. Currently, we will have to use a test connection query(SELECT 1) for checking the connection validity every time a query is fired, to validate if the connection is alive.

Is there a way to use hikaricp with dremio jdbc without using a test connection query?

More info:
Dremio JDBC driver version: v2.0.5
HikariCP version: v2.7.9

PS: Reason we don’t want to use a test connection query is, we have observed some absurd response times in Jobs dashboard for some test connection queries and this is causing subsequent queries to respond abnormally.

I’m afraid that at that time, the only option would be to instruct HikariCP to not do any connection validation, until a new version of the driver supporting Connection.isValid(int) is released. Or maybe you can figure out why you have absurd response times for those simple queries.