-
Notifications
You must be signed in to change notification settings - Fork 28.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-50382][CONNECT] Add documentation for general information on application development with/extending Spark Connect #48922
base: master
Are you sure you want to change the base?
Conversation
# Internal class that satisfies the interface by the Python client | ||
# of Spark Connect to generate the protobuf representation from | ||
# an instance of the expression. | ||
class ExampleExpression(Expression): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit but indentation would have to use 4 spaces instead of tabs
<img src="img/extending-spark-connect-labelled.png" title="Figure 2: Labelled Architecture" alt="Extending Spark | ||
Connect Diagram - Labelled Steps" /> | ||
</p> | ||
#### (1) Spark Connect Protocol Extension |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a space above and below of those ####
. They aren't properly rendered in some markdown editors (as technically it's the standard to put spaces around them)
|
||
<p style="text-align: center;"> | ||
<img src="img/extending-spark-connect.png" title="Figure 1: Architecture" alt="Extending Spark | ||
Connect Diagram" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Connect Diagram" /> | |
Connect Diagram"/> |
A Spark Server Library consists of the following components, illustrated in Fig. 2: | ||
|
||
1. The Spark Connect protocol extension (blue box _Proto_ API) | ||
2. A Spark Connect Plugin… |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is …
a typo? or incomplete? Below too.
Application, alongside PySpark or the Scala Spark Client. | ||
<p style="text-align: center;"> | ||
<img src="img/extending-spark-connect-labelled.png" title="Figure 2: Labelled Architecture" alt="Extending Spark | ||
Connect Diagram - Labelled Steps" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Connect Diagram - Labelled Steps" /> | |
Connect Diagram - Labelled Steps"/> |
from pyspark.sql.connect.column import Expression | ||
from myxample.proto import ExamplePluginExpression | ||
import pyspark.sql.connect.proto as proto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from pyspark.sql.connect.column import Expression | |
from myxample.proto import ExamplePluginExpression | |
import pyspark.sql.connect.proto as proto | |
from pyspark.sql.connect.column import Expression | |
import pyspark.sql.connect.proto as proto | |
from myxample.proto import ExamplePluginExpression |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
per PEP8
What changes were proposed in this pull request?
Adds a new page,
app-dev-spark-connect.md
, which is hyperlinked from theUse Spark Connect in standalone applications
section inspark-connect-overview
.Why are the changes needed?
There is a lack of documentation in the area of application development (with Spark Connect) especially so on extending Spark Connect with custom logic/libraries/plugins.
Does this PR introduce any user-facing change?
Yes, new page titled "Application Development with Spark Connect"
Render screenshot:
How was this patch tested?
Local rendering
Was this patch authored or co-authored using generative AI tooling?
No