Skip to content

Commit 6999622

Browse files
committed
[KYUUBI #3050] Bump Apache Iceberg 0.14.0
### _Why are the changes needed?_ https://github.com/apache/iceberg/releases/tag/apache-iceberg-0.14.0 Notable changes: - Support Spark 3.3 - Unified package name ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #3050 from pan3793/iceberg. Closes #3050 3e700a1 [Cheng Pan] Fix ut caused by SPARK-37931 039c4e2 [Cheng Pan] Enable Iceberg test w/ Spark 3.3 53cac39 [Cheng Pan] Bump Apache Iceberg 0.14.0 Authored-by: Cheng Pan <chengpan@apache.org> Signed-off-by: Cheng Pan <chengpan@apache.org>
1 parent 720bc00 commit 6999622

File tree

4 files changed

+27
-12
lines changed

4 files changed

+27
-12
lines changed

externals/kyuubi-spark-sql-engine/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137

138138
<dependency>
139139
<groupId>org.apache.iceberg</groupId>
140-
<artifactId>${iceberg.name}</artifactId>
140+
<artifactId>iceberg-spark-runtime-${spark.binary.version}_${scala.binary.version}</artifactId>
141141
<scope>test</scope>
142142
</dependency>
143143

kyuubi-common/src/test/scala/org/apache/kyuubi/operation/IcebergMetadataTests.scala

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,22 @@
1717

1818
package org.apache.kyuubi.operation
1919

20-
import org.apache.kyuubi.IcebergSuiteMixin
20+
import org.apache.kyuubi.{IcebergSuiteMixin, SPARK_COMPILE_VERSION}
21+
import org.apache.kyuubi.Utils._
2122
import org.apache.kyuubi.operation.meta.ResultSetSchemaConstant._
2223

2324
trait IcebergMetadataTests extends HiveJDBCTestHelper with IcebergSuiteMixin {
2425

26+
def isSparkVersionAtLeast(ver: String): Boolean = {
27+
val runtimeMajor = majorVersion(SPARK_COMPILE_VERSION)
28+
val targetMajor = majorVersion(ver)
29+
(runtimeMajor > targetMajor) || {
30+
val runtimeMinor = minorVersion(SPARK_COMPILE_VERSION)
31+
val targetMinor = minorVersion(ver)
32+
runtimeMajor == targetMajor && runtimeMinor >= targetMinor
33+
}
34+
}
35+
2536
test("get catalogs") {
2637
withJdbcStatement() { statement =>
2738
val metaData = statement.getConnection.getMetaData
@@ -151,9 +162,12 @@ trait IcebergMetadataTests extends HiveJDBCTestHelper with IcebergSuiteMixin {
151162
"map<int, bigint>",
152163
"date",
153164
"timestamp",
154-
"struct<`X`: bigint, `Y`: double>",
165+
// SPARK-37931
166+
if (isSparkVersionAtLeast("3.3")) "struct<X: bigint, Y: double>"
167+
else "struct<`X`: bigint, `Y`: double>",
155168
"binary",
156-
"struct<`X`: string>")
169+
// SPARK-37931
170+
if (isSparkVersionAtLeast("3.3")) "struct<X: string>" else "struct<`X`: string>")
157171
val cols = dataTypes.zipWithIndex.map { case (dt, idx) => s"c$idx" -> dt }
158172
val (colNames, _) = cols.unzip
159173

kyuubi-server/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@
384384

385385
<dependency>
386386
<groupId>org.apache.iceberg</groupId>
387-
<artifactId>${iceberg.name}</artifactId>
387+
<artifactId>iceberg-spark-runtime-${spark.binary.version}_${scala.binary.version}</artifactId>
388388
<scope>test</scope>
389389
</dependency>
390390

pom.xml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,7 @@
138138
<httpclient.version>4.5.13</httpclient.version>
139139
<httpcore.version>4.4.15</httpcore.version>
140140
<hudi.version>0.11.1</hudi.version>
141-
<iceberg.name>iceberg-spark-runtime-3.2_${scala.binary.version}</iceberg.name>
142-
<iceberg.version>0.13.2</iceberg.version>
141+
<iceberg.version>0.14.0</iceberg.version>
143142
<jackson.version>2.13.3</jackson.version>
144143
<jakarta.servlet-api.version>4.0.4</jakarta.servlet-api.version>
145144
<jakarta.xml-bind.version>2.3.2</jakarta.xml-bind.version>
@@ -165,9 +164,10 @@
165164
<snakeyaml.version>1.30</snakeyaml.version>
166165
<!--
167166
DO NOT forget to change the following properties when change the minor version of Spark:
168-
`delta.version`, `iceberg.name`, `maven.plugin.scalatest.exclude.tags`
167+
`delta.version`, `maven.plugin.scalatest.exclude.tags`
169168
-->
170169
<spark.version>3.2.2</spark.version>
170+
<spark.binary.version>3.2</spark.binary.version>
171171
<spark.archive.name>spark-${spark.version}-bin-hadoop3.2.tgz</spark.archive.name>
172172
<spark.archive.mirror>${apache.archive.dist}/spark/spark-${spark.version}</spark.archive.mirror>
173173
<spark.archive.download.skip>false</spark.archive.download.skip>
@@ -1075,7 +1075,7 @@
10751075

10761076
<dependency>
10771077
<groupId>org.apache.iceberg</groupId>
1078-
<artifactId>${iceberg.name}</artifactId>
1078+
<artifactId>iceberg-spark-runtime-${spark.binary.version}_${scala.binary.version}</artifactId>
10791079
<version>${iceberg.version}</version>
10801080
</dependency>
10811081

@@ -2039,8 +2039,8 @@
20392039
<id>spark-3.1</id>
20402040
<properties>
20412041
<spark.version>3.1.3</spark.version>
2042+
<spark.binary.version>3.1</spark.binary.version>
20422043
<delta.version>1.0.1</delta.version>
2043-
<iceberg.name>iceberg-spark-runtime-3.1_${scala.binary.version}</iceberg.name>
20442044
<maven.plugin.scalatest.exclude.tags>org.scalatest.tags.Slow</maven.plugin.scalatest.exclude.tags>
20452045
</properties>
20462046
<modules>
@@ -2054,8 +2054,8 @@
20542054
<id>spark-3.2</id>
20552055
<properties>
20562056
<spark.version>3.2.2</spark.version>
2057+
<spark.binary.version>3.2</spark.binary.version>
20572058
<delta.version>2.0.0rc1</delta.version>
2058-
<iceberg.name>iceberg-spark-runtime-3.2_${scala.binary.version}</iceberg.name>
20592059
<!--
20602060
See https://github.com/apache/incubator-kyuubi/pull/2576
20612061
Hudi 0.11 requires hudi-spark3.2-bundle to execute UT
@@ -2073,8 +2073,9 @@
20732073
<id>spark-3.3</id>
20742074
<properties>
20752075
<spark.version>3.3.0</spark.version>
2076+
<spark.binary.version>3.3</spark.binary.version>
20762077
<spark.archive.name>spark-${spark.version}-bin-hadoop3.tgz</spark.archive.name>
2077-
<maven.plugin.scalatest.exclude.tags>org.scalatest.tags.Slow,org.apache.kyuubi.tags.DeltaTest,org.apache.kyuubi.tags.IcebergTest,org.apache.kyuubi.tags.HudiTest</maven.plugin.scalatest.exclude.tags>
2078+
<maven.plugin.scalatest.exclude.tags>org.scalatest.tags.Slow,org.apache.kyuubi.tags.DeltaTest,org.apache.kyuubi.tags.HudiTest</maven.plugin.scalatest.exclude.tags>
20782079
</properties>
20792080
<modules>
20802081
<module>extensions/spark/kyuubi-extension-spark-common</module>

0 commit comments

Comments
 (0)