From 56db28181c66fdcd8a2956864b46cd2dc7f24dec Mon Sep 17 00:00:00 2001
From: "Ahmed Hussein (amahussein)"
Date: Mon, 21 Aug 2023 21:45:40 -0500
Subject: [PATCH] Fix unit-tests for Spark-340
Signed-off-by: Ahmed Hussein (amahussein)
Fixes #498, Fixes #463
- Update the gh-workflow to run mvn for list of spark-versions
- Fixes the delta-lake dependency in the pom.xml file
- Fix the broken unit test for spark-340
- Update the spark-341 to point to release instead of snapshot
- Fix the Autotuner warning
---
.github/workflows/mvn-verify-check.yml | 8 +++++---
core/pom.xml | 4 ++--
.../nvidia/spark/rapids/tool/profiling/AutoTuner.scala | 2 --
.../rapids/tool/qualification/QualificationSuite.scala | 3 ++-
4 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml
index b9b9e11c9..12bcb9d79 100644
--- a/.github/workflows/mvn-verify-check.yml
+++ b/.github/workflows/mvn-verify-check.yml
@@ -22,7 +22,9 @@ on:
jobs:
build:
runs-on: ubuntu-latest
-
+ strategy:
+ matrix:
+ spark-version: ['311', '320', '330', '341']
steps:
- uses: actions/checkout@v3
@@ -32,5 +34,5 @@ jobs:
distribution: adopt
java-version: 8
- - name: Run mvn verify
- run: cd core && mvn verify
+ - name: Run mvn verify with Spark ${{ matrix.spark-version }}
+ run: cd core && mvn -Dbuildver=${{ matrix.spark-version }} verify
diff --git a/core/pom.xml b/core/pom.xml
index 9c0987825..0a93b6cea 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -327,7 +327,7 @@
3.3.2
3.3.3-SNAPSHOT
3.4.0
- 3.4.1-SNAPSHOT
+ 3.4.1
3.5.0-SNAPSHOT
2.12
4.3.0
@@ -361,7 +361,7 @@
2.1.1
2.2.0
2.3.0
- 2.4.0rc1
+ 2.4.0
${delta10x.version}
1.8
3.11.0
diff --git a/core/src/main/scala/com/nvidia/spark/rapids/tool/profiling/AutoTuner.scala b/core/src/main/scala/com/nvidia/spark/rapids/tool/profiling/AutoTuner.scala
index 8af8dacb2..6a974cf21 100644
--- a/core/src/main/scala/com/nvidia/spark/rapids/tool/profiling/AutoTuner.scala
+++ b/core/src/main/scala/com/nvidia/spark/rapids/tool/profiling/AutoTuner.scala
@@ -763,8 +763,6 @@ class AutoTuner(
&& appInfoProvider.getRedundantReadSize > DEF_READ_SIZE_THRESHOLD) {
appendRecommendation("spark.rapids.filecache.enabled", "true")
appendComment("Enable file cache only if Spark local disks bandwidth is > 1 GB/s")
- } else {
- null
}
}
diff --git a/core/src/test/scala/com/nvidia/spark/rapids/tool/qualification/QualificationSuite.scala b/core/src/test/scala/com/nvidia/spark/rapids/tool/qualification/QualificationSuite.scala
index e20affa40..95a581b94 100644
--- a/core/src/test/scala/com/nvidia/spark/rapids/tool/qualification/QualificationSuite.scala
+++ b/core/src/test/scala/com/nvidia/spark/rapids/tool/qualification/QualificationSuite.scala
@@ -1154,7 +1154,8 @@ class QualificationSuite extends BaseTestSuite {
try {
val lines = inputSource.getLines.toSeq
// 1 for header, 1 for values
- assert(lines.size == 6)
+ val expLinesSize = if (ToolUtils.isSpark340OrLater()) 8 else 6
+ assert(lines.size == expLinesSize)
assert(lines.head.contains("App ID,Unsupported Type,"))
assert(lines(1).contains("\"Read\",\"JSON\",\"Types not supported - bigint:int\""))
} finally {