wangyum commented on a change in pull request #31119:
URL: https://github.com/apache/spark/pull/31119#discussion_r554795409



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/BroadcastExchangeExec.scala
##########
@@ -74,7 +74,9 @@ case class BroadcastExchangeExec(
     child: SparkPlan) extends BroadcastExchangeLike {
   import BroadcastExchangeExec._
 
-  override val runId: UUID = UUID.randomUUID
+  private val groupId = 
sparkContext.getLocalProperty(SparkContext.SPARK_JOB_GROUP_ID)
+
+  override val runId: UUID = if (groupId == null) UUID.randomUUID else 
UUID.fromString(groupId)

Review comment:
       ```scala
   override val runId: UUID = 
Option(groupId).map(UUID.fromString).getOrElse(UUID.randomUUID)
   ```
   ?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to