srowen commented on a change in pull request #23464: [SPARK-26383][Core] - NPE
when use DataFrameReader.jdbc with wrong URL
URL: https://github.com/apache/spark/pull/23464#discussion_r245515003
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCSuite.scala
##########
@@ -1507,4 +1508,16 @@ class JDBCSuite extends QueryTest
checkNotPushdown(sql("SELECT name, theid FROM predicateOption WHERE
theid = 1")),
Row("fred", 1) :: Nil)
}
+
+ test("SPARK-26383 throw IllegalArgumentException if url is wrong") {
+ val e = intercept[IllegalArgumentException] {
+ val opts = Map(
+ "url" -> "jdbc:mysql://localhost/db",
Review comment:
Do you want to use a more obviously invalid URL here? or does it only
trigger this scenario if the URL is valid but can't be opened?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]