summaryzb commented on code in PR #50489:
URL: https://github.com/apache/spark/pull/50489#discussion_r2041120864
##########
core/src/main/scala/org/apache/spark/serializer/SerializationDebugger.scala:
##########
@@ -110,8 +112,13 @@ private[spark] object SerializationDebugger extends
Logging {
val elem = s"externalizable object (class ${e.getClass.getName},
$e)"
visitExternalizable(e, elem :: stack)
- case s: Object with java.io.Serializable =>
- val elem = s"object (class ${s.getClass.getName}, $s)"
+ case s: Object with java.io.Serializable if Utils.isTesting =>
Review Comment:
All sql scenarios has the same semantic in non-testing , but in other
cases that the `Serializable` object call `toString` will not throw still need
this. We should change it like below to keep the same semantic as previous
```
case s: Object with java.io.Serializable =>
val str = try {
s.toString
} catch {
case _: SparkRuntimeException if Utils.isTesting => "exception
in toString"
case e: Throwable => throw e
}
```
--
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]