Skip to content

Commit 79d8189

Browse files
committed
[MINOR] Make README.md up-to-date
### What changes were proposed in this pull request? This PR aims to make `README.md` up-to-date. ### Why are the changes needed? To fix the outdated information. ### Does this PR introduce _any_ user-facing change? No behavior change because this is a doc-only update. ### How was this patch tested? Manual review. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #83 from dongjoon-hyun/minor. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent bbc1b6e commit 79d8189

File tree

1 file changed

+24
-13
lines changed

1 file changed

+24
-13
lines changed

README.md

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,28 @@ This is an experimental Swift library to show how to connect to a remote Apache
99
So far, this library project is tracking the upstream changes like the [Apache Spark](https://spark.apache.org) 4.0.0 RC4 release and [Apache Arrow](https://arrow.apache.org) project's Swift-support.
1010

1111
## Requirement
12+
1213
- [Apache Spark 4.0.0 RC4 (April 2025)](https://dist.apache.org/repos/dist/dev/spark/v4.0.0-rc4-bin/)
13-
- [Swift 6.0 (2024)](https://swift.org)
14+
- [Swift 6.0 (2024) or 6.1 (2025)](https://swift.org)
1415
- [gRPC Swift 2.1 (March 2025)](https://github.com/grpc/grpc-swift/releases/tag/2.1.2)
15-
- [gRPC Swift Protobuf 1.1 (March 2025)](https://github.com/grpc/grpc-swift-protobuf/releases/tag/1.1.0)
16-
- [gRPC Swift NIO Transport 1.0 (March 2025)](https://github.com/grpc/grpc-swift-nio-transport/releases/tag/1.0.2)
16+
- [gRPC Swift Protobuf 1.2 (April 2025)](https://github.com/grpc/grpc-swift-protobuf/releases/tag/1.2.0)
17+
- [gRPC Swift NIO Transport 1.0 (March 2025)](https://github.com/grpc/grpc-swift-nio-transport/releases/tag/1.0.3)
18+
- [FlatBuffers v25.2.10 (February 2025)](https://github.com/google/flatbuffers/releases/tag/v25.2.10)
1719
- [Apache Arrow Swift](https://github.com/apache/arrow/tree/main/swift)
1820

1921
## How to use in your apps
2022

2123
Create a Swift project.
22-
```
23-
$ mkdir SparkConnectSwiftApp
24-
$ cd SparkConnectSwiftApp
25-
$ swift package init --name SparkConnectSwiftApp --type executable
24+
25+
```bash
26+
mkdir SparkConnectSwiftApp
27+
cd SparkConnectSwiftApp
28+
swift package init --name SparkConnectSwiftApp --type executable
2629
```
2730

2831
Add `SparkConnect` package to the dependency like the following
29-
```
32+
33+
```bash
3034
$ cat Package.swift
3135
import PackageDescription
3236

@@ -49,7 +53,7 @@ let package = Package(
4953

5054
Use `SparkSession` of `SparkConnect` module in Swift.
5155

52-
```
56+
```bash
5357
$ cat Sources/main.swift
5458

5559
import SparkConnect
@@ -78,7 +82,7 @@ await spark.stop()
7882
7983
Run your Swift application.
8084
81-
```
85+
```bash
8286
$ swift run
8387
...
8488
Connected to Apache Spark 4.0.0 Server
@@ -105,16 +109,17 @@ SELECT * FROM t
105109
```
106110
107111
You can find this example in the following repository.
108-
- https://github.com/dongjoon-hyun/spark-connect-swift-app
112+
113+
- <https://github.com/dongjoon-hyun/spark-connect-swift-app>
109114
110115
## How to use `Spark SQL REPL` via `Spark Connect for Swift`
111116
112117
This project also provides `Spark SQL REPL`. You can run it directly from this repository.
113118
114-
```
119+
```bash
115120
$ swift run
116121
...
117-
Build of product 'SQLRepl' complete! (2.33s)
122+
Build of product 'SparkSQLRepl' complete! (2.33s)
118123
Connected to Apache Spark 4.0.0 Server
119124
spark-sql (default)> SHOW DATABASES;
120125
+---------+
@@ -176,3 +181,9 @@ spark-sql (default)> DROP DATABASE db1 CASCADE;
176181
++
177182
spark-sql (default)> exit;
178183
```
184+
185+
You can use `SPARK_REMOTE` to specify the [Spark Connect connection string](https://spark.apache.org/docs/latest/spark-connect-overview.html#set-sparkremote-environment-variable) in order to provide more options.
186+
187+
```bash
188+
SPARK_REMOTE=sc://localhost swift run
189+
```

0 commit comments

Comments
 (0)