Skip to content

Commit

Permalink
[SPARK-49814][CONNECT] When Spark Connect Client starts, show the `sp…
Browse files Browse the repository at this point in the history
…ark version` of the `connect server`

### What changes were proposed in this pull request?
The pr aims to show the spark version of the connect server when Spark Connect Client starts.

### Why are the changes needed?
With the gradual popularize of Spark Connect module, when the Spark Connect client starts, explicitly displaying the spark version of the `connect server`, will reduce confusion for users during execution, such as the new version having some features. However, if it connects to an old version and encounters some problems, it will have to manually troubleshoot.
<img width="878" alt="image" src="https://github.com/user-attachments/assets/c93026e8-03e7-4292-bae2-c3a0f4422191">

### Does this PR introduce _any_ user-facing change?
Yes, Connect‘s end-users can intuitively know the `Spark version` on the `server side` when starting the client, reducing confusion.

### How was this patch tested?
Manually check.

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes #48283 from panbingkun/SPARK-49814.

Authored-by: panbingkun <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
  • Loading branch information
panbingkun authored and HyukjinKwon committed Sep 28, 2024
1 parent f9a2077 commit 4c12c78
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ object ConnectRepl {
/_/
Type in expressions to have them evaluated.
Spark connect server version %s.
Spark session available as 'spark'.
""".format(spark_version)
"""

def main(args: Array[String]): Unit = doMain(args)

Expand Down Expand Up @@ -102,7 +103,7 @@ Spark session available as 'spark'.
// Please note that we make ammonite generate classes instead of objects.
// Classes tend to have superior serialization behavior when using UDFs.
val main = new ammonite.Main(
welcomeBanner = Option(splash),
welcomeBanner = Option(splash.format(spark_version, spark.version)),
predefCode = predefCode,
replCodeWrapper = ExtendedCodeClassWrapper,
scriptCodeWrapper = ExtendedCodeClassWrapper,
Expand Down

0 comments on commit 4c12c78

Please sign in to comment.