forked from apache/spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-41255][CONNECT] Rename RemoteSparkSession
### What changes were proposed in this pull request? For better source compatibility, this PR changes the type name of RemoteSparkSession to SparkSession and follows the same builder pattern. The communication with the GRPC endpoint is kept in `client.py` whereas the public facing Spark Session related functionality is implemented in `SparkSession` in `session.py`. The new class does not support the full behavior of the existing Spark Session. To connect to Spark Connect using the new code use the following example: ``` # Connection to a remote endpoint SparkSession.builder.remote("sc://endpoint/;config=abc").getOrCreate() ``` or ``` # Local connection to a locally running server SparkSession.builder.remote().getOrCreate() ``` or ``` SparkSession.builder.conf("spark.connect.location", "sc://endpoint").getOrCreate() ``` ### Why are the changes needed? Compatibility. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? UT Closes apache#38792 from grundprinzip/SPARK-41255. Lead-authored-by: Martin Grund <[email protected]> Co-authored-by: Martin Grund <[email protected]> Signed-off-by: Herman van Hovell <[email protected]>
- Loading branch information
1 parent
da71626
commit 77e2d45
Showing
10 changed files
with
340 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.