hvanhovell commented on code in PR #42591:
URL: https://github.com/apache/spark/pull/42591#discussion_r1300634916
##########
connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/UserDefinedFunctionE2ETestSuite.scala:
##########
@@ -215,33 +215,31 @@ class UserDefinedFunctionE2ETestSuite extends QueryTest {
}
test("Dataset foreachPartition") {
- val sum = new AtomicLong()
val func: Iterator[JLong] => Unit = f => {
+ val sum = new AtomicLong()
f.foreach(v => sum.addAndGet(v))
- // The value should be 45
- assert(sum.get() == -1)
+ throw new Exception("Success, processed records: " + sum.get())
Review Comment:
This is a fun one. This was throwing a scalatest specific exception. The
problem with this is that this error is decoded by the ResultHandler in Spark
Core, this does not have the thread so things fail with a
`ClassNotFoundException` instead of the expected exception.
--
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]