sarutak commented on code in PR #52083:
URL: https://github.com/apache/spark/pull/52083#discussion_r2299638739


##########
sql/connect/server/src/main/scala/org/apache/spark/sql/connect/service/ExecuteHolder.scala:
##########
@@ -243,6 +243,9 @@ private[connect] class ExecuteHolder(
    *   true if it was not interrupted before, false if it was already 
interrupted.
    */
   def interrupt(): Boolean = {
+    if (eventsManager.status == ExecuteStatus.Pending) {
+      return false

Review Comment:
   > According to the function description, false is already occupied for the 
status where it was already interrupted.
   
   Hmm, if it's OK to ignore interruption to a pending state operation and we 
need exactly tell `already interrupted` from `interruption failed`, how about 
returning the exact interruption result rather than `boolean`?



-- 
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: reviews-unsubscr...@spark.apache.org

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