Github user tribbloid commented on a diff in the pull request:
https://github.com/apache/spark/pull/8785#discussion_r39704595
--- Diff: sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCSuite.scala
---
@@ -450,4 +451,34 @@ class JDBCSuite extends SparkFunSuite with
BeforeAndAfter with SharedSQLContext
assert(db2Dialect.getJDBCType(StringType).map(_.databaseTypeDefinition).get ==
"CLOB")
assert(db2Dialect.getJDBCType(BooleanType).map(_.databaseTypeDefinition).get ==
"CHAR(1)")
}
+
+ test("Basic API 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 --
Thanks a lot Holden, I've tried that, but apparently it takes many classes
and functions to override org.h2.Driver's valid schema. So I took the shortcut.
---
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]