LuciferYang commented on code in PR #38754:
URL: https://github.com/apache/spark/pull/38754#discussion_r1033411176
##########
sql/core/src/test/scala/org/apache/spark/sql/JsonFunctionsSuite.scala:
##########
@@ -443,19 +443,31 @@ class JsonFunctionsSuite extends QueryTest with
SharedSparkSession {
exception = intercept[AnalysisException] {
df3.selectExpr("from_json(value, 1)")
},
- errorClass = "INVALID_SCHEMA",
- parameters = Map("expr" -> "\"1\""),
+ errorClass = "INVALID_SCHEMA.NON_STRING_LITERAL",
+ parameters = Map("inputSchema" -> "\"1\""),
context = ExpectedContext(
fragment = "from_json(value, 1)",
start = 0,
stop = 18
)
)
- val errMsg2 = intercept[AnalysisException] {
- df3.selectExpr("""from_json(value, 'time InvalidType')""")
- }
- assert(errMsg2.getMessage.contains("DataType invalidtype is not
supported"))
+ checkError(
Review Comment:
This case corresponding to `e` is `SparkThrowable`
--
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]