juliuszsompolski commented on code in PR #42415:
URL: https://github.com/apache/spark/pull/42415#discussion_r1288841584
##########
python/pyspark/sql/connect/client/core.py:
##########
@@ -354,6 +355,22 @@ def get(self, key: str) -> Any:
"""
return self.params[key]
+ @property
+ def session_id(self) -> Optional[str]:
+ """
+ Returns
+ -------
+ The session_id extracted from the parameters of the connection string
or `None` if not
+ specified.
+ """
+ session_id = self.params.get(ChannelBuilder.PARAM_SESSION_ID, None)
+ if session_id is not None:
+ try:
+ uuid.UUID(session_id, version=4)
+ except ValueError as ve:
+ raise ValueError("Could not parse 'session_id' parameter for
connection string", ve)
Review Comment:
"Parameter value 'session_id' must be a valid UUID format."
(previous fix only fixed this in test)
--
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]