Skip to content

Commit a24a1fa

Browse files
Upgrade to Spark 3.3.2
Upgrade spark version to 3.3.2. Updates one test for a fix in 3.3.2. Resolves #1479 Closes #1644 Signed-off-by: Allison Portis <[email protected]> GitOrigin-RevId: c7d6751d28558b41a1d4c72c1301c367fd505339 (cherry picked from commit b16b1bc)
1 parent 5d635d2 commit a24a1fa

File tree

5 files changed

+16
-14
lines changed

5 files changed

+16
-14
lines changed

.github/workflows/test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
pyenv install 3.7.4
4242
pyenv global system 3.7.4
4343
pipenv --python 3.7 install
44-
pipenv run pip install pyspark==3.3.1
44+
pipenv run pip install pyspark==3.3.2
4545
pipenv run pip install flake8==3.5.0 pypandoc==1.3.3
4646
pipenv run pip install importlib_metadata==3.10.0
4747
pipenv run pip install mypy==0.910

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ FROM python:3.7.3-stretch
1818

1919
RUN apt-get update && apt-get -y install openjdk-8-jdk
2020

21-
RUN pip install pyspark==3.3.1
21+
RUN pip install pyspark==3.3.2
2222

2323
RUN pip install mypy==0.910
2424

build.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import java.nio.file.Files
1818
import TestParallelization._
1919

20-
val sparkVersion = "3.3.1"
20+
val sparkVersion = "3.3.2"
2121
val scala212 = "2.12.15"
2222
val scala213 = "2.13.5"
2323
val default_scala_version = scala212

core/src/test/scala/org/apache/spark/sql/delta/DeltaTimeTravelSuite.scala

+7-9
Original file line numberDiff line numberDiff line change
@@ -738,20 +738,18 @@ class DeltaTimeTravelSuite extends QueryTest
738738
}
739739

740740

741-
// This is currently set up to fail once the bug is fixed (should be when upgrading to Spark 3.4)
742-
// See https://github.com/delta-io/delta/issues/1479
743-
test("SPARK-41154: Incorrect relation caching for queries with time travel spec") {
741+
test("SPARK-41154: Correct relation caching for queries with time travel spec") {
744742
val tblName = "tab"
745743
withTable(tblName) {
746744
sql(s"CREATE TABLE $tblName USING DELTA AS SELECT 1 as c")
747745
sql(s"INSERT INTO $tblName SELECT 2 as c")
748-
assert(
746+
checkAnswer(
749747
sql(s"""
750-
|SELECT * FROM $tblName VERSION AS OF '0'
751-
|UNION ALL
752-
|SELECT * FROM $tblName VERSION AS OF '1'
753-
|""".stripMargin
754-
).collect() === Array(Row(1), Row(1))) // this should be Array(Row(1), Row(1), Row(2))
748+
|SELECT * FROM $tblName VERSION AS OF '0'
749+
|UNION ALL
750+
|SELECT * FROM $tblName VERSION AS OF '1'
751+
|""".stripMargin),
752+
Row(1) :: Row(1) :: Row(2) :: Nil)
755753
}
756754
}
757755
}

examples/scala/build.sbt

+6-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,12 @@ def getMajorMinor(version: String): (Int, Int) = {
3535
}
3636
}
3737
val lookupSparkVersion: PartialFunction[(Int, Int), String] = {
38-
// versions 2.1.0 and above
39-
case (major, minor) if (major == 2 && minor >= 1) || major >= 3 => "3.3.0"
38+
// versions 2.3.0 and above
39+
case (major, minor) if (major == 2 && minor >= 3) || major >= 3 => "3.3.2"
40+
// versions 2.2.x
41+
case (major, minor) if major == 2 && minor == 2 => "3.3.1"
42+
// versions 2.1.x
43+
case (major, minor) if major == 2 && minor == 1 => "3.3.0"
4044
// versions 1.0.0 to 2.0.x
4145
case (major, minor) if major == 1 || (major == 2 && minor == 0) => "3.2.1"
4246
// versions 0.7.x to 0.8.x

0 commit comments

Comments
 (0)