Skip to content

Commit b1b84d5

Browse files
authored
[Spark] [Test only] Fix Spark Master test in DeltaSourceSuite (#3088)
#### Which Delta project/connector is this regarding? - [X] Spark - [ ] Standalone - [ ] Flink - [ ] Kernel - [ ] Other (fill in here) ## Description Fix and re-enable a failing delta-spark test against Spark Master in DeltaSourceSuite ## How was this patch tested? Test only change.
1 parent 9c88f8b commit b1b84d5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

spark/src/test/scala/org/apache/spark/sql/delta/DeltaSourceSuite.scala

+6-3
Original file line numberDiff line numberDiff line change
@@ -1733,7 +1733,7 @@ class DeltaSourceSuite extends DeltaSourceSuiteBase
17331733
}
17341734
}
17351735

1736-
testSparkLatestOnly("startingVersion: user defined start works with mergeSchema") {
1736+
test("startingVersion: user defined start works with mergeSchema") {
17371737
withTempDir { inputDir =>
17381738
withTempView("startingVersionTest") {
17391739
spark.range(10)
@@ -1774,10 +1774,13 @@ class DeltaSourceSuite extends DeltaSourceSuiteBase
17741774
q.processAllAvailable()
17751775
checkAnswer(
17761776
sql("select * from startingVersionTest"),
1777-
((10 until 20).map(x => (x.toLong, x.toLong, None.toString)) ++
1777+
((10 until 20).map(x => (x.toLong, x.toLong, "null")) ++
17781778
(20 until 30).map(x => (x.toLong, x.toLong, x.toString)))
17791779
.toDF("id", "id2", "id3")
1780-
.selectExpr("id", "id2", "cast(id3 as long) as id3")
1780+
.selectExpr(
1781+
"id",
1782+
"id2",
1783+
"CASE WHEN id3 = 'null' THEN NULL ELSE cast(id3 as long) END as id3")
17811784
)
17821785
} finally {
17831786
q.stop()

0 commit comments

Comments
 (0)