HyukjinKwon commented on code in PR #38485:
URL: https://github.com/apache/spark/pull/38485#discussion_r1013528124
##########
python/pyspark/sql/connect/client.py:
##########
@@ -35,13 +35,146 @@
from pyspark.sql.connect.plan import SQL, Range
from pyspark.sql.types import DataType, StructType, StructField, LongType,
StringType
-from typing import Optional, Any, Union
+from typing import Optional, Any, Union, TYPE_CHECKING
NumericType = typing.Union[int, float]
logging.basicConfig(level=logging.INFO)
+class ChannelBuilder:
+ """
+ This is a helper class that is used to create a GRPC channel based on the
given
+ connection string per the documentation of Spark Connect.
+
+ Examples
+ --------
+ >>> cb = ChannelBuilder("sc://localhost")
+ ... cb.endpoint
+ "localhost:15002
+
+
+ >>> cb = ChannelBuilder("sc://localhost/;use_ssl=true;token=aaa")
+ ... cb.secure
+ True
+
+ .. versionadded:: 3.4.0
+
Review Comment:
```suggestion
.. versionadded:: 3.4.0
Examples
--------
>>> cb = ChannelBuilder("sc://localhost")
... cb.endpoint
"localhost:15002
>>> cb = ChannelBuilder("sc://localhost/;use_ssl=true;token=aaa")
... cb.secure
True
```
--
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]