DRILL-4880: Support JDBC driver registration using ServiceLoader Support loading Drill driver using ServiceLoader. From the user perspective, it means being able to use the driver without registering it first, like by using Class.forName("org.apache.drill.jdbc.Driver") for example.
DRILL-4452: Uses Apache Calcite Avatica driver vs Optiq driver for Drill JDBC Drill JDBC driver uses Optiq Avatica as its basis, but this dependency has been moved over to Calcite, for quite some time without Drill code being updated for it.
This patch updates Avatica version to the version from Calcite (1.4.0-drill-r19). It also refactors Drill JDBC driver to comply with the packages and API changes in Avatica. Finally it fixes the the SQL types for lists and structs, since Drill doesn't support java.sql.Array and java.sql.Struct interfaces.