juliuszsompolski commented on code in PR #43664:
URL: https://github.com/apache/spark/pull/43664#discussion_r1383049383


##########
connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/SparkConnectAnalyzeHandler.scala:
##########
@@ -201,7 +201,9 @@ private[connect] class SparkConnectAnalyzeHandler(
       case other => throw InvalidPlanInput(s"Unknown Analyze Method $other!")
     }
 
-    builder.setSessionId(request.getSessionId)
+    builder
+      .setSessionId(request.getSessionId)
+      .setServerSideSessionId(session.sessionUUID)

Review Comment:
   Out of overabundance of caution, I would instead of doing 
sessionHolder.sessionUUID add a method to SessionHolder
   
   ```
   def serverSessionId = {
     // The server side session id must be different from the client generated 
one
     assert(session.sessionUUID) != sessionId
     session.sessionUUID
   }
   ```
   
   to prevent that someone in the future decides to sync these 
session.sessionUUID with the connect session_id, which would make this 
idempotency check not effective.



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

Reply via email to