Skip to content

Commit 5532931

Browse files
committed
Run Iceberg Spark test w/ comet-enabled Spark
1 parent d1064bb commit 5532931

File tree

3 files changed

+72
-3
lines changed

3 files changed

+72
-3
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: Setup Spark Local Jar
19+
description: 'Build comet-patched Apache Spark for Iceberg Spark tests'
20+
inputs:
21+
spark-short-version:
22+
description: 'The Apache Spark short version (e.g., 3.5) to build'
23+
required: true
24+
spark-version:
25+
description: 'The Apache Spark version (e.g., 3.5.6) to build'
26+
required: true
27+
scala-version:
28+
description: 'The Scala short version (e.g., 2.13) to build'
29+
required: true
30+
runs:
31+
using: "composite"
32+
steps:
33+
- name: Clone Spark repo
34+
uses: actions/checkout@v4
35+
with:
36+
repository: apache/spark
37+
path: apache-spark
38+
ref: v${{inputs.spark-version}}
39+
fetch-depth: 1
40+
41+
- name: Publish local Spark snapshot w/ Comet
42+
shell: bash
43+
run: |
44+
cd apache-spark
45+
git apply ../dev/diffs/${{inputs.spark-version}}.diff
46+
# https://spark.apache.org/docs/3.5.0/building-spark.html#change-scala-version
47+
./dev/change-scala-version.sh ${{inputs.scala-version}
48+
./build/mvn versions:set -DnewVersion=${{inputs.spark-version}}-SNAPSHOT
49+
# Might need to skip enforcer b/c comet is snapshot
50+
./build/mvn -Pscala-${{inputs.scala-version}} -Phive -Phive-thriftserver -DskipTests -Denforcer.skip=true clean install

.github/workflows/iceberg_spark_test.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ jobs:
4646
os: [ubuntu-24.04]
4747
java-version: [11, 17]
4848
iceberg-version: [{short: '1.8', full: '1.8.1'}]
49-
spark-version: [{short: '3.5', full: '3.5.4'}]
50-
scala-version: [ '2.12', '2.13']
49+
spark-version: [{short: '3.5', full: '3.5.6'}]
50+
scala-version: ['2.13']
5151
fail-fast: false
5252
name: iceberg-spark-sql/${{ matrix.os }}/iceberg-${{ matrix.iceberg-version.full }}/spark-${{ matrix.spark-version.full }}/scala-${{ matrix.scala-version }}/java-${{ matrix.java-version }}
5353
runs-on: ${{ matrix.os }}
@@ -62,6 +62,12 @@ jobs:
6262
with:
6363
rust-version: ${{env.RUST_VERSION}}
6464
jdk-version: ${{ matrix.java-version }}
65+
- name: Build local Spark jar with comet patch
66+
uses: ./.github/actions/setup-spark-local-jar
67+
with:
68+
spark-version: ${{ matrix.spark-version.full }}
69+
spark-short-version: ${{ matrix.spark-version.short }}
70+
scala-version: ${{ matrix.scala-version }}
6571
- name: Setup Iceberg
6672
uses: ./.github/actions/setup-iceberg-builder
6773
with:
@@ -73,7 +79,7 @@ jobs:
7379
run: |
7480
cd apache-iceberg
7581
rm -rf /root/.m2/repository/org/apache/parquet # somehow parquet cache requires cleanups
76-
./gradlew -DsparkVersions=${{ matrix.spark-version.short }} -DscalaVersion=${{ matrix.scala-version }} -DflinkVersions= -DkafkaVersions= \
82+
ENABLE_COMET=true ./gradlew -DsparkVersions=${{ matrix.spark-version.short }} -DscalaVersion=${{ matrix.scala-version }} -DflinkVersions= -DkafkaVersions= \
7783
:iceberg-spark:iceberg-spark-${{ matrix.spark-version.short }}_${{ matrix.scala-version }}:check \
7884
:iceberg-spark:iceberg-spark-extensions-${{ matrix.spark-version.short }}_${{ matrix.scala-version }}:check \
7985
:iceberg-spark:iceberg-spark-runtime-${{ matrix.spark-version.short }}_${{ matrix.scala-version }}:check \

dev/diffs/iceberg/1.8.1.diff

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
2+
index 04ffa8f..d4107be 100644
3+
--- a/gradle/libs.versions.toml
4+
+++ b/gradle/libs.versions.toml
5+
@@ -81,7 +81,7 @@ slf4j = "2.0.16"
6+
snowflake-jdbc = "3.22.0"
7+
spark-hive33 = "3.3.4"
8+
spark-hive34 = "3.4.4"
9+
-spark-hive35 = "3.5.4"
10+
+spark-hive35 = "3.5.6-SNAPSHOT"
11+
sqlite-jdbc = "3.48.0.0"
12+
testcontainers = "1.20.4"
13+
tez010 = "0.10.4"
114
diff --git a/spark/v3.4/build.gradle b/spark/v3.4/build.gradle
215
index 6eb26e8..c288e72 100644
316
--- a/spark/v3.4/build.gradle

0 commit comments

Comments
 (0)