jiwen624 commented on code in PR #56095: URL: https://github.com/apache/spark/pull/56095#discussion_r3300226006
########## sql/core/src/main/scala/org/apache/spark/sql/execution/SparkPlan.scala: ########## @@ -277,6 +277,8 @@ abstract class SparkPlan extends QueryPlan[SparkPlan] with Logging with Serializ @transient private val runningSubqueries = new ArrayBuffer[ExecSubqueryExpression] + @transient private lazy val subqueryLock: AnyRef = new AnyRef Review Comment: `@transient` is required here: AnyRef is not Serializable. `lazy` ensures the field re-initializes after deserialization - a plain `@transient val` would be null if prepare() were ever called on a deserialized plan. Currently that path is not exercised (runningSubqueries has the same gap), so lazy is just defensive and could be skipped too. -- 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]
