MaxGekk commented on code in PR #40632:
URL: https://github.com/apache/spark/pull/40632#discussion_r1214737823
##########
common/utils/src/main/scala/org/apache/spark/ErrorClassesJSONReader.scala:
##########
@@ -66,7 +66,6 @@ class ErrorClassesJsonReader(jsonFileURLs: Seq[URL]) {
val errorInfo = errorInfoMap.getOrElse(
mainErrorClass,
throw SparkException.internalError(s"Cannot find main error class
'$errorClass'"))
- assert(errorInfo.subClass.isDefined == subErrorClass.isDefined)
Review Comment:
Sorry, I didn't get the reason for that. What happens if you revert the
changes?
##########
common/utils/src/main/scala/org/apache/spark/ErrorClassesJSONReader.scala:
##########
@@ -66,7 +66,6 @@ class ErrorClassesJsonReader(jsonFileURLs: Seq[URL]) {
val errorInfo = errorInfoMap.getOrElse(
mainErrorClass,
throw SparkException.internalError(s"Cannot find main error class
'$errorClass'"))
- assert(errorInfo.subClass.isDefined == subErrorClass.isDefined)
Review Comment:
Just in case, I reverted the line locally, and your test and
`SparkThrowableSuite` passed successfully.
##########
sql/core/src/test/scala/org/apache/spark/sql/errors/QueryExecutionErrorsSuite.scala:
##########
@@ -377,6 +377,23 @@ class QueryExecutionErrorsSuite
sqlState = "22018")
}
+ test("CANNOT_PARSE_JSON_ARRAYS_AS_STRUCTS: parse json arrays as structs") {
+ val jsonStr =
+ """[{"a":1, "b":0.8}]
+ |""".stripMargin
Review Comment:
```suggestion
val jsonStr = """[{"a":1, "b":0.8}]"""
```
--
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]