This is an automated email from the ASF dual-hosted git repository.
roryqi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/main by this push:
new b34f4b48c8 [#9989] improvement(iceberg) upgrade iceberg to 1.10.1
(#9972)
b34f4b48c8 is described below
commit b34f4b48c8ac8797d5be37fd97c9889f0e432e93
Author: Xinyi Lu <[email protected]>
AuthorDate: Thu Feb 12 18:02:48 2026 -0800
[#9989] improvement(iceberg) upgrade iceberg to 1.10.1 (#9972)
### What changes were proposed in this pull request?
This change upgrades Iceberg to latest 1.10.1.
### Why are the changes needed?
Iceberg 1.10.1 contains bug fixes from 1.10.0.
Fix: #9989
### Does this PR introduce _any_ user-facing change?
NO
### How was this patch tested?
all the unittests and integration tests in the build
---
gradle/libs.versions.toml | 2 +-
.../integration/test/IcebergRESTServiceIT.java | 13 +++++++++++
.../service/rest/TestIcebergTableOperations.java | 10 ++++-----
.../iceberg/service/rest/TestScanPlanCache.java | 26 ++++++++++------------
4 files changed, 30 insertions(+), 21 deletions(-)
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index d013347d58..429a8fbdcf 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -60,7 +60,7 @@ commons-collections3 = "3.2.2"
commons-configuration1 = "1.6"
commons-dbcp2 = "2.11.0"
caffeine = "2.9.3"
-iceberg = '1.10.0' # used for Gravitino Iceberg catalog and Iceberg REST
service
+iceberg = '1.10.1' # used for Gravitino Iceberg catalog and Iceberg REST
service
iceberg4connector = "1.6.1" # used for compile connectors like Spark, Flink,
etc
paimon = '1.2.0'
spark33 = "3.3.4"
diff --git
a/iceberg/iceberg-rest-server/src/test/java/org/apache/gravitino/iceberg/integration/test/IcebergRESTServiceIT.java
b/iceberg/iceberg-rest-server/src/test/java/org/apache/gravitino/iceberg/integration/test/IcebergRESTServiceIT.java
index b7e95b7937..51aca2dc02 100644
---
a/iceberg/iceberg-rest-server/src/test/java/org/apache/gravitino/iceberg/integration/test/IcebergRESTServiceIT.java
+++
b/iceberg/iceberg-rest-server/src/test/java/org/apache/gravitino/iceberg/integration/test/IcebergRESTServiceIT.java
@@ -117,6 +117,10 @@ public abstract class IcebergRESTServiceIT extends
IcebergRESTServiceBaseIT {
sql(String.format("DROP TABLE %s.%s PURGE", namespace, table));
}
+ private void purgeView(String namespace, String view) {
+ sql(String.format("DROP VIEW %s.%s", namespace, view));
+ }
+
private void purgeNamespace(String namespace) {
if (!namespaceExists(namespace)) {
return;
@@ -129,6 +133,15 @@ public abstract class IcebergRESTServiceIT extends
IcebergRESTServiceBaseIT {
childNamespacesString.forEach(this::purgeNamespace);
}
+ // Drop views first (required by Iceberg 1.10.1+)
+ try {
+ List<Object[]> views = sql("SHOW VIEWS IN " + namespace);
+ Set<String> viewsString = convertToStringSet(views, 1);
+ viewsString.forEach(view -> purgeView(namespace, view));
+ } catch (Exception e) {
+ // Ignore if SHOW VIEWS is not supported
+ }
+
Set<String> tables = convertToStringSet(sql("SHOW TABLES IN " +
namespace), 1);
tables.forEach(table -> purgeTable(namespace, table));
sql("DROP database " + namespace);
diff --git
a/iceberg/iceberg-rest-server/src/test/java/org/apache/gravitino/iceberg/service/rest/TestIcebergTableOperations.java
b/iceberg/iceberg-rest-server/src/test/java/org/apache/gravitino/iceberg/service/rest/TestIcebergTableOperations.java
index de4cfc7e19..f4a9a2b602 100644
---
a/iceberg/iceberg-rest-server/src/test/java/org/apache/gravitino/iceberg/service/rest/TestIcebergTableOperations.java
+++
b/iceberg/iceberg-rest-server/src/test/java/org/apache/gravitino/iceberg/service/rest/TestIcebergTableOperations.java
@@ -176,8 +176,7 @@ public class TestIcebergTableOperations extends
IcebergNamespaceTestBase {
metadata.currentSnapshot() == null ? null :
metadata.currentSnapshot().snapshotId();
JsonNode planResponse = verifyPlanTableScanSucc(namespace,
"plan_scan_table", snapshotId);
- Assertions.assertEquals(
- PlanStatus.COMPLETED.status(),
planResponse.get("plan-status").asText());
+ Assertions.assertEquals(PlanStatus.COMPLETED.status(),
planResponse.get("status").asText());
Assertions.assertTrue(planResponse.has("plan-tasks"));
Assertions.assertTrue(planResponse.get("plan-tasks").isArray());
Assertions.assertTrue(planResponse.get("plan-tasks").size() > 0);
@@ -223,8 +222,7 @@ public class TestIcebergTableOperations extends
IcebergNamespaceTestBase {
JsonNode planResponse =
verifyPlanTableScanSuccWithRange(
namespace, "incremental_scan_valid_table", startSnapshotId,
endSnapshotId);
- Assertions.assertEquals(
- PlanStatus.COMPLETED.status(),
planResponse.get("plan-status").asText());
+ Assertions.assertEquals(PlanStatus.COMPLETED.status(),
planResponse.get("status").asText());
Assertions.assertTrue(planResponse.has("plan-tasks"));
Assertions.assertTrue(planResponse.get("plan-tasks").isArray());
@@ -573,7 +571,7 @@ public class TestIcebergTableOperations extends
IcebergNamespaceTestBase {
}
private PlanTableScanRequest buildPlanTableScanRequest(Long snapshotId) {
- PlanTableScanRequest.Builder builder = new PlanTableScanRequest.Builder();
+ PlanTableScanRequest.Builder builder = PlanTableScanRequest.builder();
if (snapshotId != null) {
builder = builder.withSnapshotId(snapshotId);
} else {
@@ -584,7 +582,7 @@ public class TestIcebergTableOperations extends
IcebergNamespaceTestBase {
private PlanTableScanRequest buildPlanTableScanRequestWithRange(
Long startSnapshotId, Long endSnapshotId) {
- PlanTableScanRequest.Builder builder = new PlanTableScanRequest.Builder();
+ PlanTableScanRequest.Builder builder = PlanTableScanRequest.builder();
if (startSnapshotId != null) {
builder = builder.withStartSnapshotId(startSnapshotId);
}
diff --git
a/iceberg/iceberg-rest-server/src/test/java/org/apache/gravitino/iceberg/service/rest/TestScanPlanCache.java
b/iceberg/iceberg-rest-server/src/test/java/org/apache/gravitino/iceberg/service/rest/TestScanPlanCache.java
index cd4912c6cb..015f1ad9f1 100644
---
a/iceberg/iceberg-rest-server/src/test/java/org/apache/gravitino/iceberg/service/rest/TestScanPlanCache.java
+++
b/iceberg/iceberg-rest-server/src/test/java/org/apache/gravitino/iceberg/service/rest/TestScanPlanCache.java
@@ -72,8 +72,7 @@ public class TestScanPlanCache {
@Test
public void testCacheHit() {
- PlanTableScanRequest scanRequest =
- new PlanTableScanRequest.Builder().withSnapshotId(1L).build();
+ PlanTableScanRequest scanRequest =
PlanTableScanRequest.builder().withSnapshotId(1L).build();
PlanTableScanResponse response =
PlanTableScanResponse.builder()
.withPlanStatus(PlanStatus.COMPLETED)
@@ -95,9 +94,9 @@ public class TestScanPlanCache {
@Test
public void testCacheMiss() {
- PlanTableScanRequest request1 = new
PlanTableScanRequest.Builder().withSnapshotId(1L).build();
+ PlanTableScanRequest request1 =
PlanTableScanRequest.builder().withSnapshotId(1L).build();
PlanTableScanRequest request2 =
- new PlanTableScanRequest.Builder()
+ PlanTableScanRequest.builder()
.withSelect(Arrays.asList("id", "name"))
.withSnapshotId(1L)
.build();
@@ -133,12 +132,12 @@ public class TestScanPlanCache {
@Test
public void testCacheKeyWithDifferentSelectOrder() {
PlanTableScanRequest request1 =
- new PlanTableScanRequest.Builder()
+ PlanTableScanRequest.builder()
.withSelect(Arrays.asList("id", "name"))
.withSnapshotId(1L)
.build();
PlanTableScanRequest request2 =
- new PlanTableScanRequest.Builder()
+ PlanTableScanRequest.builder()
.withSelect(Arrays.asList("name", "id"))
.withSnapshotId(1L)
.build();
@@ -163,8 +162,7 @@ public class TestScanPlanCache {
TableIdentifier table1 = TableIdentifier.of(Namespace.of("db1"), "table1");
TableIdentifier table2 = TableIdentifier.of(Namespace.of("db2"), "table2");
- PlanTableScanRequest scanRequest =
- new PlanTableScanRequest.Builder().withSnapshotId(1L).build();
+ PlanTableScanRequest scanRequest =
PlanTableScanRequest.builder().withSnapshotId(1L).build();
PlanTableScanResponse response1 =
PlanTableScanResponse.builder()
@@ -195,8 +193,8 @@ public class TestScanPlanCache {
@Test
public void testCacheKeyWithDifferentSnapshotId() {
- PlanTableScanRequest request1 = new
PlanTableScanRequest.Builder().withSnapshotId(1L).build();
- PlanTableScanRequest request2 = new
PlanTableScanRequest.Builder().withSnapshotId(2L).build();
+ PlanTableScanRequest request1 =
PlanTableScanRequest.builder().withSnapshotId(1L).build();
+ PlanTableScanRequest request2 =
PlanTableScanRequest.builder().withSnapshotId(2L).build();
PlanTableScanResponse response1 =
PlanTableScanResponse.builder()
@@ -229,9 +227,9 @@ public class TestScanPlanCache {
// if they differ in other parameters
when(mockTable.currentSnapshot()).thenReturn(null);
- PlanTableScanRequest request1 = new
PlanTableScanRequest.Builder().withSnapshotId(1L).build();
+ PlanTableScanRequest request1 =
PlanTableScanRequest.builder().withSnapshotId(1L).build();
PlanTableScanRequest request2 =
- new PlanTableScanRequest.Builder()
+ PlanTableScanRequest.builder()
.withSnapshotId(1L)
.withSelect(Arrays.asList("id", "name"))
.build();
@@ -281,9 +279,9 @@ public class TestScanPlanCache {
"Standard isEquivalentTo() should return false for simple
expression.");
PlanTableScanRequest request1 =
- new
PlanTableScanRequest.Builder().withFilter(expr1).withSnapshotId(1L).build();
+
PlanTableScanRequest.builder().withFilter(expr1).withSnapshotId(1L).build();
PlanTableScanRequest request2 =
- new
PlanTableScanRequest.Builder().withFilter(expr2).withSnapshotId(1L).build();
+
PlanTableScanRequest.builder().withFilter(expr2).withSnapshotId(1L).build();
ScanPlanCacheKey key1 = ScanPlanCacheKey.create(tableIdentifier,
mockTable, request1);
ScanPlanCacheKey key2 = ScanPlanCacheKey.create(tableIdentifier,
mockTable, request2);