Skip to content

Commit

Permalink
Update DeltaSourceSuite.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
scottsand-db committed May 13, 2024
1 parent 4ee7f4d commit 1ac076d
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1733,7 +1733,7 @@ class DeltaSourceSuite extends DeltaSourceSuiteBase
}
}

testSparkLatestOnly("startingVersion: user defined start works with mergeSchema") {
test("startingVersion: user defined start works with mergeSchema") {
withTempDir { inputDir =>
withTempView("startingVersionTest") {
spark.range(10)
Expand Down Expand Up @@ -1774,10 +1774,13 @@ class DeltaSourceSuite extends DeltaSourceSuiteBase
q.processAllAvailable()
checkAnswer(
sql("select * from startingVersionTest"),
((10 until 20).map(x => (x.toLong, x.toLong, None.toString)) ++
((10 until 20).map(x => (x.toLong, x.toLong, "null")) ++
(20 until 30).map(x => (x.toLong, x.toLong, x.toString)))
.toDF("id", "id2", "id3")
.selectExpr("id", "id2", "cast(id3 as long) as id3")
.selectExpr(
"id",
"id2",
"CASE WHEN id3 = 'null' THEN NULL ELSE cast(id3 as long) END as id3")
)
} finally {
q.stop()
Expand Down

0 comments on commit 1ac076d

Please sign in to comment.