Skip to content

Commit 7fc97b4

Browse files
committed
revert assertNoSpecifiedSchema
1 parent 0b67f0f commit 7fc97b4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/jdbc/JdbcUtilsSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class JdbcUtilsSuite extends SparkFunSuite {
4949
StructType(Seq(StructField("c1", DateType, true), StructField("c1", StringType, true)))
5050
}
5151
assert(duplicate.getMessage.contains(
52-
"Found duplicate column(s) in the createTableColumnTypes option value"))
52+
"Found duplicate column(s) in the customSchema option value"))
5353

5454
val allColumns = intercept[AnalysisException]{
5555
JdbcUtils.parseUserSpecifiedColumnTypes(schema, "C1 STRING", caseSensitive) ===

sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -960,12 +960,12 @@ class JDBCSuite extends SparkFunSuite
960960
val e1 = intercept[AnalysisException] {
961961
spark.read.schema(schema).jdbc(urlWithUserAndPass, "TEST.PEOPLE", parts, new Properties())
962962
}.getMessage
963-
assert(e1.contains("Please use customSchema option to specified column types."))
963+
assert(e1.contains("User specified schema not supported with `jdbc`"))
964964

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

971971
test("jdbc API support custom schema") {

0 commit comments

Comments
 (0)