Github user dongjoon-hyun commented on a diff in the pull request:
https://github.com/apache/spark/pull/22560#discussion_r220732627
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JDBCOptions.scala
---
@@ -186,6 +187,11 @@ class JDBCOptions(
// An option to allow/disallow pushing down predicate into JDBC data
source
val pushDownPredicate = parameters.getOrElse(JDBC_PUSHDOWN_PREDICATE,
"true").toBoolean
+
+ val connectionFactoryProvider: ConnectionFactoryProvider =
+ parameters.get(JDBC_CONNECTION_FACTORY_PROVIDER).map { className =>
+
Utils.classForName(className).newInstance.asInstanceOf[ConnectionFactoryProvider]
--- End diff --
If the given name is wrong, this seems to end up with
`ClassNotFoundException`. Could you add a test case for wrong names and add
fallback logic showing a proper warn message and load
`DefaultConnectionFactoryProvider` instead?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]