[SPARK-41001] [CONNECT] [PYTHON] Implementing Connection String for Python Client#38485
Closed
grundprinzip wants to merge 9 commits intoapache:masterfrom
Closed
[SPARK-41001] [CONNECT] [PYTHON] Implementing Connection String for Python Client#38485grundprinzip wants to merge 9 commits intoapache:masterfrom
grundprinzip wants to merge 9 commits intoapache:masterfrom
Conversation
f7ae844 to
90e9a69
Compare
amaliujia
reviewed
Nov 3, 2022
HyukjinKwon
reviewed
Nov 3, 2022
HyukjinKwon
reviewed
Nov 3, 2022
HyukjinKwon
reviewed
Nov 3, 2022
HyukjinKwon
reviewed
Nov 3, 2022
HyukjinKwon
reviewed
Nov 3, 2022
HyukjinKwon
reviewed
Nov 3, 2022
Member
HyukjinKwon
left a comment
There was a problem hiding this comment.
Looks fine from a cursory look. cc @zhengruifeng too
HyukjinKwon
approved these changes
Nov 4, 2022
|
Can one of the admins verify this patch? |
Co-authored-by: Hyukjin Kwon <gurwls223@gmail.com>
Contributor
Author
|
accepted suggestion and fixed a doc example with missing quote |
Member
|
Merged to master. |
| self.assertEqual(len(expectResult), len(actualResult)) | ||
|
|
||
|
|
||
| class ChannelBuilderTests(ReusedPySparkTestCase): |
Member
There was a problem hiding this comment.
This should be skipped by should_test_connect like SparkConnectSQLTestCase in this file.
@unittest.skipIf(not should_test_connect, connect_requirement_message)
class SparkConnectSQLTestCase(ReusedPySparkTestCase):
I made a PR for that.
SandishKumarHN
pushed a commit
to SandishKumarHN/spark
that referenced
this pull request
Dec 12, 2022
…hon Client ### What changes were proposed in this pull request? This PR implements the connection string for Spark Connect clients according to the documentation added in apache#38470. With this patch it becomes possible to connect to a Spark Connect endpoint using ``` spark = SparkRemoteSession(user_id="martin", connection_string="sc://hostname/;use_ssl=true;token=abcd") spark.read.table("test").limit(10).toPandas() ``` The connection string is properly parsed and filtered. This allows to dynamically configure SSL and bearer token authentication. All remaining parameters are converted into GRPC Metadata pairs and submitted as part of the request. ### Why are the changes needed? User experience. ### Does this PR introduce _any_ user-facing change? No, experimental API. ### How was this patch tested? UT Closes apache#38485 from grundprinzip/SPARK-41001. Lead-authored-by: Martin Grund <martin.grund@databricks.com> Co-authored-by: Martin Grund <grundprinzip@gmail.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This PR implements the connection string for Spark Connect clients according to the documentation added in #38470.
With this patch it becomes possible to connect to a Spark Connect endpoint using
The connection string is properly parsed and filtered. This allows to dynamically configure SSL and bearer token authentication. All remaining parameters are converted into GRPC Metadata pairs and submitted as part of the request.
Why are the changes needed?
User experience.
Does this PR introduce any user-facing change?
No, experimental API.
How was this patch tested?
UT