1717 * under the License.
1818 */
1919
20- String sparkMajorVersion = ' 4.1 '
20+ String sparkMajorVersion = ' 4.2 '
2121String scalaVersion = ' 2.13'
2222
2323JavaVersion javaVersion = JavaVersion . current()
2424Boolean javaVersionSupported = javaVersion == JavaVersion . VERSION_17 || javaVersion == JavaVersion . VERSION_21
2525if (! javaVersionSupported) {
26- logger. warn(" Skip Spark 4.1 build which requires JDK 17 or 21 but was executed with JDK " + javaVersion)
26+ logger. warn(" Skip Spark 4.2 build which requires JDK 17 or 21 but was executed with JDK " + javaVersion)
2727}
2828
2929def sparkProjects = [
@@ -51,14 +51,6 @@ project(":iceberg-spark:iceberg-spark-${sparkMajorVersion}_${scalaVersion}") {
5151 apply plugin : ' scala'
5252 apply plugin : ' com.github.alisiikh.scalastyle'
5353
54- // Set target to JDK17 for Spark 4.1 to fix following error
55- // "spark/v4.1/spark/src/main/scala/org/apache/spark/sql/stats/ThetaSketchAgg.scala:52:12: Class java.lang.Record not found"
56- tasks. withType(ScalaCompile . class) {
57- sourceCompatibility = " 17"
58- targetCompatibility = " 17"
59- scalaCompileOptions. additionalParameters. add(" -release:17" )
60- }
61-
6254 sourceSets {
6355 main {
6456 scala. srcDirs = [' src/main/scala' , ' src/main/java' ]
@@ -82,17 +74,17 @@ project(":iceberg-spark:iceberg-spark-${sparkMajorVersion}_${scalaVersion}") {
8274
8375 compileOnly libs. errorprone. annotations
8476 compileOnly libs. avro. avro
85- compileOnly(" org.apache.spark:spark-hive_${ scalaVersion} :${ libs.versions.spark41 .get()} " ) {
77+ compileOnly(" org.apache.spark:spark-hive_${ scalaVersion} :${ libs.versions.spark42 .get()} " ) {
8678 exclude group : ' org.apache.avro' , module : ' avro'
8779 exclude group : ' org.apache.arrow'
8880 exclude group : ' org.apache.parquet'
8981 // to make sure netty libs only come from project(':iceberg-arrow')
9082 exclude group : ' io.netty' , module : ' netty-buffer'
9183 exclude group : ' io.netty' , module : ' netty-common'
92- exclude group : ' org.roaringbitmap '
84+ exclude group : ' com.github.RoaringBitmap.RoaringBitmap '
9385 }
9486
95- // TODO: datafusion-comet Spark 4.1 support
87+ // TODO: datafusion-comet Spark 4.2 support
9688 compileOnly " org.apache.datafusion:comet-spark-spark4.0_2.13:${ libs.versions.comet.get()} "
9789
9890 implementation libs. parquet. column
@@ -174,14 +166,14 @@ project(":iceberg-spark:iceberg-spark-extensions-${sparkMajorVersion}_${scalaVer
174166 compileOnly project(' :iceberg-core' )
175167 compileOnly project(' :iceberg-common' )
176168 compileOnly project(" :iceberg-spark:iceberg-spark-${ sparkMajorVersion} _${ scalaVersion} " )
177- compileOnly(" org.apache.spark:spark-hive_${ scalaVersion} :${ libs.versions.spark41 .get()} " ) {
169+ compileOnly(" org.apache.spark:spark-hive_${ scalaVersion} :${ libs.versions.spark42 .get()} " ) {
178170 exclude group : ' org.apache.avro' , module : ' avro'
179171 exclude group : ' org.apache.arrow'
180172 exclude group : ' org.apache.parquet'
181173 // to make sure netty libs only come from project(':iceberg-arrow')
182174 exclude group : ' io.netty' , module : ' netty-buffer'
183175 exclude group : ' io.netty' , module : ' netty-common'
184- exclude group : ' org.roaringbitmap '
176+ exclude group : ' com.github.RoaringBitmap.RoaringBitmap '
185177 }
186178 compileOnly libs. errorprone. annotations
187179
@@ -203,7 +195,7 @@ project(":iceberg-spark:iceberg-spark-extensions-${sparkMajorVersion}_${scalaVer
203195 testImplementation libs. avro. avro
204196 testImplementation libs. parquet. hadoop
205197 testImplementation libs. awaitility
206- // TODO: datafusion-comet Spark 4.1 support
198+ // TODO: datafusion-comet Spark 4.2 support
207199 testImplementation " org.apache.datafusion:comet-spark-spark4.0_2.13:${ libs.versions.comet.get()} "
208200 testImplementation(testFixtures(project(' :iceberg-parquet' )))
209201
@@ -277,7 +269,7 @@ project(":iceberg-spark:iceberg-spark-runtime-${sparkMajorVersion}_${scalaVersio
277269 }
278270
279271 integrationImplementation " org.scala-lang.modules:scala-collection-compat_${ scalaVersion} :${ libs.versions.scala.collection.compat.get()} "
280- integrationImplementation(" org.apache.spark:spark-hive_${ scalaVersion} :${ libs.versions.spark41 .get()} " ) {
272+ integrationImplementation(" org.apache.spark:spark-hive_${ scalaVersion} :${ libs.versions.spark42 .get()} " ) {
281273 exclude group : ' org.roaringbitmap'
282274 }
283275 integrationImplementation libs. junit. jupiter
0 commit comments