heyihong commented on code in PR #53625:
URL: https://github.com/apache/spark/pull/53625#discussion_r2651118197
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala:
##########
@@ -70,6 +71,11 @@ class QueryExecution(
val refreshPhaseEnabled: Boolean = true) extends Logging {
val id: Long = QueryExecution.nextExecutionId
+ val queryId: UUID = UUIDv7Generator.generate()
+
+ // Tracks how many times this QueryExecution has been executed.
+ // Used by SQLExecution to determine whether to use the existing queryId or
generate a new one.
+ val executionCount = new AtomicInteger(0)
Review Comment:
Is there a need to expose executionCount? Should we make this private? Also,
it seems that an AtomicBoolean is sufficient to check whether this is the first
execution.
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala:
##########
@@ -70,6 +71,11 @@ class QueryExecution(
val refreshPhaseEnabled: Boolean = true) extends Logging {
val id: Long = QueryExecution.nextExecutionId
+ val queryId: UUID = UUIDv7Generator.generate()
+
+ // Tracks how many times this QueryExecution has been executed.
+ // Used by SQLExecution to determine whether to use the existing queryId or
generate a new one.
+ val executionCount = new AtomicInteger(0)
Review Comment:
Is there a need to expose `executionCount`? Should we make this private?
Also, it seems that an AtomicBoolean is sufficient to check whether this is the
first execution.
--
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]