nija-at commented on code in PR #40054:
URL: https://github.com/apache/spark/pull/40054#discussion_r1108553346


##########
python/pyspark/sql/connect/client.py:
##########
@@ -244,6 +246,17 @@ def userId(self) -> Optional[str]:
         """
         return self.params.get(ChannelBuilder.PARAM_USER_ID, None)
 
+    @property
+    def userAgent(self) -> str:
+        """
+        Returns
+        -------
+        user_agent : str
+            The user_agent parameter specified in the connection string,
+            or "_SPARK_CONNECT_PYTHON" when not specified.
+        """
+        return self.params.get(ChannelBuilder.PARAM_USER_AGENT, 
"_SPARK_CONNECT_PYTHON")

Review Comment:
   TODO: apply some reasonable validation on the length and charset of user 
agent



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