This is an automated email from the ASF dual-hosted git repository.

yangjie01 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 91f3fdd25852 [SPARK-50578][PYTHON][SS][FOLLOWUP] Remove unnecessary if 
block
91f3fdd25852 is described below

commit 91f3fdd25852b43095dd5273358fc394ffd11b66
Author: Zhihong Yu <[email protected]>
AuthorDate: Mon Jan 6 00:08:11 2025 +0800

    [SPARK-50578][PYTHON][SS][FOLLOWUP] Remove unnecessary if block
    
    ### What changes were proposed in this pull request?
    This PR removes the `if` block at the beginning of the while loop since 
`InterruptedException` is handled in the try / catch block.
    
    ### Why are the changes needed?
    This change makes the code easier to follow.
    
    ### Does this PR introduce _any_ user-facing change?
    No
    
    ### How was this patch tested?
    Existing Java 21 daily tests
    
    ### Was this patch authored or co-authored using generative AI tooling?
    No.
    
    Closes #49356 from tedyu/tws-if.
    
    Authored-by: Zhihong Yu <[email protected]>
    Signed-off-by: yangjie01 <[email protected]>
---
 .../sql/execution/python/TransformWithStateInPandasStateServer.scala   | 3 ---
 1 file changed, 3 deletions(-)

diff --git 
a/sql/core/src/main/scala/org/apache/spark/sql/execution/python/TransformWithStateInPandasStateServer.scala
 
b/sql/core/src/main/scala/org/apache/spark/sql/execution/python/TransformWithStateInPandasStateServer.scala
index fe1bbdd66ac1..e37e4266b46b 100644
--- 
a/sql/core/src/main/scala/org/apache/spark/sql/execution/python/TransformWithStateInPandasStateServer.scala
+++ 
b/sql/core/src/main/scala/org/apache/spark/sql/execution/python/TransformWithStateInPandasStateServer.scala
@@ -146,9 +146,6 @@ class TransformWithStateInPandasStateServer(
 
     while (listeningSocket.isConnected &&
       statefulProcessorHandle.getHandleState != 
StatefulProcessorHandleState.CLOSED) {
-      if (Thread.currentThread().isInterrupted) {
-        throw new InterruptedException("Thread was interrupted")
-      }
       try {
         val version = inputStream.readInt()
         if (version != -1) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to