Skip to content

Commit

Permalink
[KYUUBI #5464]rename function name getProviderClass to `getDriverCl…
Browse files Browse the repository at this point in the history
…ass`
  • Loading branch information
wangjunbo committed Nov 24, 2023
1 parent 9901bba commit 1019a61
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import org.apache.kyuubi.util.reflect.ReflectUtils._
abstract class AbstractConnectionProvider extends Logging {
protected val providers = loadProviders()

def getProviderClass(kyuubiConf: KyuubiConf): String = {
def getDriverClass(kyuubiConf: KyuubiConf): String = {
val driverClass: Class[_ <: Driver] = Option(
DynClasses.builder().impl(kyuubiConf.get(ENGINE_JDBC_DRIVER_CLASS).get)
.orNull().build[Driver]()).getOrElse {
Expand All @@ -38,7 +38,7 @@ abstract class AbstractConnectionProvider extends Logging {
}

def create(kyuubiConf: KyuubiConf): Connection = {
val filteredProviders = providers.filter(_.canHandle(getProviderClass(kyuubiConf)))
val filteredProviders = providers.filter(_.canHandle(getDriverClass(kyuubiConf)))
if (filteredProviders.isEmpty) {
throw new IllegalArgumentException(
"Empty list of JDBC connection providers for the specified driver and options")
Expand Down

0 comments on commit 1019a61

Please sign in to comment.