itholic commented on code in PR #39258:
URL: https://github.com/apache/spark/pull/39258#discussion_r1058741568
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVSuite.scala:
##########
@@ -370,8 +370,11 @@ abstract class CSVSuite
.load(testFile(carsFile)).collect()
}
- assert(exception.getMessage.contains("Malformed CSV record"))
-
assert(ExceptionUtils.getRootCause(exception).isInstanceOf[RuntimeException])
+ checkError(
+ exception =
ExceptionUtils.getRootCause(exception).asInstanceOf[SparkRuntimeException],
+ errorClass = "MALFORMED_CSV_RECORD",
Review Comment:
Just added test case for `_LEGACY_ERROR_TEMP_2177`.
Maybe we can assign the proper name for it in the separate ticket
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVSuite.scala:
##########
@@ -370,8 +370,11 @@ abstract class CSVSuite
.load(testFile(carsFile)).collect()
}
- assert(exception.getMessage.contains("Malformed CSV record"))
-
assert(ExceptionUtils.getRootCause(exception).isInstanceOf[RuntimeException])
+ checkError(
+ exception =
ExceptionUtils.getRootCause(exception).asInstanceOf[SparkRuntimeException],
+ errorClass = "MALFORMED_CSV_RECORD",
Review Comment:
Thanks! Just added test case for `_LEGACY_ERROR_TEMP_2177`.
Maybe we can assign the proper name for it in the separate ticket
--
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]