anchovYu commented on a change in pull request #35966:
URL: https://github.com/apache/spark/pull/35966#discussion_r837743576
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/ErrorParserSuite.scala
##########
@@ -255,4 +255,17 @@ class ErrorParserSuite extends AnalysisTest {
|SELECT b
""".stripMargin, 2, 9, 10, msg + " test-table")
}
+
+ test("datatype not supported") {
+ // general bad types
+ intercept("SELECT cast(1 as badtype)", 1, 17, 17, "DataType badtype is not
supported.")
+
+ // special handling on char and varchar
Review comment:
This class also has the `intercept` that can check the error class (see
the below `PARSE_CHAR_MISSING_LENGTH`). The current tests check whether the
error class is `PARSE_CHAR_MISSING_LENGTH`.
Wonder what's the difference between this `ErrorParserSuite` and
`QueryParsingErrorsSuite`? Seems they all testing parsing exceptions, but this
`ErrorParserSuite` also checks the ANTLR errors.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]