Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
revert assertNoSpecifiedSchema
  • Loading branch information
wangyum committed Sep 10, 2017
commit 7fc97b49d21fa05bca819ee93b72be084b3e67c7
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class JdbcUtilsSuite extends SparkFunSuite {
StructType(Seq(StructField("c1", DateType, true), StructField("c1", StringType, true)))
}
assert(duplicate.getMessage.contains(
"Found duplicate column(s) in the createTableColumnTypes option value"))
"Found duplicate column(s) in the customSchema option value"))

val allColumns = intercept[AnalysisException]{
JdbcUtils.parseUserSpecifiedColumnTypes(schema, "C1 STRING", caseSensitive) ===
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -960,12 +960,12 @@ class JDBCSuite extends SparkFunSuite
val e1 = intercept[AnalysisException] {
spark.read.schema(schema).jdbc(urlWithUserAndPass, "TEST.PEOPLE", parts, new Properties())
}.getMessage
assert(e1.contains("Please use customSchema option to specified column types."))
assert(e1.contains("User specified schema not supported with `jdbc`"))

val e2 = intercept[AnalysisException] {
spark.read.schema(schema).jdbc(urlWithUserAndPass, "TEST.PEOPLE", new Properties())
}.getMessage
assert(e2.contains("Please use customSchema option to specified column types."))
assert(e2.contains("User specified schema not supported with `jdbc`"))
}

test("jdbc API support custom schema") {
Expand Down