Skip to content

Commit b18ae84

Browse files
committed
address comments.
1 parent 22b7db8 commit b18ae84

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/TableSchemaParserSuite.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ class TableSchemaParserSuite extends SparkFunSuite {
2525
def parse(sql: String): StructType = CatalystSqlParser.parseTableSchema(sql)
2626

2727
def checkTableSchema(tableSchemaString: String, expectedDataType: DataType): Unit = {
28-
test(s"parse ${tableSchemaString.replace("\n", "")}") {
28+
test(s"parse $tableSchemaString") {
2929
assert(parse(tableSchemaString) === expectedDataType)
3030
}
3131
}
3232

33-
def intercept(sql: String): Unit =
33+
def assertError(sql: String): Unit =
3434
intercept[ParseException](CatalystSqlParser.parseTableSchema(sql))
3535

3636
checkTableSchema("a int", new StructType().add("a", "int"))
@@ -79,10 +79,10 @@ class TableSchemaParserSuite extends SparkFunSuite {
7979
}
8080

8181
// Negative cases
82-
intercept("")
83-
intercept("a")
84-
intercept("a INT b long")
85-
intercept("a INT,, b long")
86-
intercept("a INT, b long,,")
87-
intercept("a INT, b long, c int,")
82+
assertError("")
83+
assertError("a")
84+
assertError("a INT b long")
85+
assertError("a INT,, b long")
86+
assertError("a INT, b long,,")
87+
assertError("a INT, b long, c int,")
8888
}

0 commit comments

Comments
 (0)