Skip to content

Commit 8c287ce

Browse files
committed
[SPARK-52744] Add MacOS integration test with Apache Spark 4.1.0-preview1 RC1
1 parent ba1dcdf commit 8c287ce

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

.github/workflows/build_and_test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,24 @@ jobs:
9393
docker run swiftlang/swift:nightly-6.2-noble uname -a
9494
docker run -v $PWD:/spark -w /spark swiftlang/swift:nightly-6.2-noble swift build
9595
96+
integration-test-mac-spark41:
97+
runs-on: macos-15
98+
timeout-minutes: 20
99+
steps:
100+
- uses: actions/checkout@v4
101+
- uses: swift-actions/setup-swift@d10500c1ac8822132eebbd74c48c3372c71d7ff5
102+
with:
103+
swift-version: "6.1"
104+
- name: Test
105+
run: |
106+
curl -LO https://dist.apache.org/repos/dist/dev/spark/v4.1.0-preview1-rc1-bin/spark-4.1.0-preview1-bin-hadoop3.tgz
107+
tar xvfz spark-4.1.0-preview1-bin-hadoop3.tgz
108+
mv spark-4.1.0-preview1-bin-hadoop3 /tmp/spark
109+
cd /tmp/spark/sbin
110+
./start-connect-server.sh
111+
cd -
112+
swift test --no-parallel
113+
96114
integration-test-mac:
97115
runs-on: macos-15
98116
timeout-minutes: 20

Sources/SparkConnect/DataFrame.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ public actor DataFrame: Sendable {
431431
values.append(array.asAny(i) as! Date)
432432
case .timeInfo(.timestamp):
433433
let timestampType = column.data.type as! ArrowTypeTimestamp
434-
assert(timestampType.timezone == "Etc/UTC")
434+
assert(timestampType.timezone == "Etc/UTC" || timestampType.timezone == "GMT")
435435
let timestamp = array.asAny(i) as! Int64
436436
let timeInterval =
437437
switch timestampType.unit {

Tests/SparkConnectTests/DataFrameTests.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,10 @@ struct DataFrameTests {
332332
@Test
333333
func isLocal() async throws {
334334
let spark = try await SparkSession.builder.getOrCreate()
335-
#expect(try await spark.sql("SHOW DATABASES").isLocal())
336-
#expect(try await spark.sql("SHOW TABLES").isLocal())
335+
if !(await spark.version.starts(with: "4.1")) { // TODO(SPARK-52746)
336+
#expect(try await spark.sql("SHOW DATABASES").isLocal())
337+
#expect(try await spark.sql("SHOW TABLES").isLocal())
338+
}
337339
#expect(try await spark.range(1).isLocal() == false)
338340
await spark.stop()
339341
}

0 commit comments

Comments
 (0)