Github user holdenk commented on a diff in the pull request:
https://github.com/apache/spark/pull/8785#discussion_r39702311
--- Diff:
sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCWriteSuite.scala ---
@@ -151,4 +152,36 @@ class JDBCWriteSuite extends SharedSQLContext with
BeforeAndAfter {
assert(2 === sqlContext.read.jdbc(url1, "TEST.PEOPLE1",
properties).count)
assert(2 === sqlContext.read.jdbc(url1, "TEST.PEOPLE1",
properties).collect()(0).length)
}
+
+ test("INSERT to JDBC Datasource with Unserializable Driver Properties") {
+
+ object UnserializableH2Driver extends org.h2.Driver {
+
+ override def connect(url: String, info: Properties): Connection = {
+
+ val result = super.connect(url, info)
+ info.put("unserializableDriver", this)
+ result
+ }
+
+ override def getParentLogger: Logger = ???
+ }
+
+ import scala.collection.JavaConversions._
+
+ val oldDrivers =
DriverManager.getDrivers.filter(_.acceptsURL("jdbc:h2:")).toSeq
--- End diff --
Same comment as before (although if it doesn't make sense to change the
accept urls maybe we could put this in a shared function).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]