Skip to content

Commit b195684

Browse files
committed
Test Iceberg 1.10.0 snapshot
1 parent 8827893 commit b195684

File tree

11 files changed

+24
-66
lines changed

11 files changed

+24
-66
lines changed

plugin/trino-iceberg/pom.xml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@
4949
<dependency>
5050
<groupId>com.google.guava</groupId>
5151
<artifactId>guava</artifactId>
52-
<exclusions>
53-
<exclusion>
54-
<groupId>org.jspecify</groupId>
55-
<artifactId>jspecify</artifactId>
56-
</exclusion>
57-
</exclusions>
5852
</dependency>
5953

6054
<dependency>
@@ -224,12 +218,6 @@
224218
<dependency>
225219
<groupId>org.apache.iceberg</groupId>
226220
<artifactId>iceberg-aws</artifactId>
227-
<exclusions>
228-
<exclusion>
229-
<groupId>org.jspecify</groupId>
230-
<artifactId>jspecify</artifactId>
231-
</exclusion>
232-
</exclusions>
233221
</dependency>
234222

235223
<dependency>
@@ -451,6 +439,12 @@
451439
<scope>runtime</scope>
452440
</dependency>
453441

442+
<dependency>
443+
<groupId>software.amazon.awssdk</groupId>
444+
<artifactId>kms</artifactId>
445+
<scope>runtime</scope>
446+
</dependency>
447+
454448
<dependency>
455449
<groupId>software.amazon.awssdk</groupId>
456450
<artifactId>s3</artifactId>

plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2736,16 +2736,6 @@ private void dropField(ConnectorSession session, ConnectorTableHandle tableHandl
27362736
if (isPartitionColumn) {
27372737
throw new TrinoException(NOT_SUPPORTED, "Cannot drop partition field: " + name);
27382738
}
2739-
int currentSpecId = icebergTable.spec().specId();
2740-
boolean columnUsedInOlderPartitionSpecs = icebergTable.specs().entrySet().stream()
2741-
.filter(spec -> spec.getValue().specId() != currentSpecId)
2742-
.flatMap(spec -> spec.getValue().fields().stream())
2743-
.anyMatch(field -> field.sourceId() == fieldId);
2744-
if (columnUsedInOlderPartitionSpecs) {
2745-
// After dropping a column which was used in older partition specs, insert/update/select fails on the table.
2746-
// So restricting user to dropping that column. https://github.com/trinodb/trino/issues/15729
2747-
throw new TrinoException(NOT_SUPPORTED, "Cannot drop column which is used by an old partition spec: " + name);
2748-
}
27492739
try {
27502740
icebergTable.updateSchema()
27512741
.deleteColumn(name)

plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergConnectorTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,10 +1076,10 @@ public void testCreateTableWithUnsupportedNestedFieldPartitioning()
10761076
"\\QUnable to parse partitioning value: Cannot partition by non-primitive source field: struct<3: child: optional string>");
10771077
assertQueryFails(
10781078
"CREATE TABLE test_partitioned_table_nested_field_inside_array (parent ARRAY(ROW(child VARCHAR))) WITH (partitioning = ARRAY['\"parent.child\"'])",
1079-
"\\QPartitioning field [parent.element.child] cannot be contained in a array");
1079+
"\\QUnable to parse partitioning value: Invalid partition field parent: list<struct<3: child: optional string>>");
10801080
assertQueryFails(
10811081
"CREATE TABLE test_partitioned_table_nested_field_inside_map (parent MAP(ROW(child INTEGER), ARRAY(VARCHAR))) WITH (partitioning = ARRAY['\"parent.key.child\"'])",
1082-
"\\QPartitioning field [parent.key.child] cannot be contained in a map");
1082+
"\\QUnable to parse partitioning value: Invalid partition field parent: map<struct<4: child: optional int>, list<string>>");
10831083
assertQueryFails(
10841084
"CREATE TABLE test_partitioned_table_nested_field_year_transform_in_string (parent ROW(child VARCHAR)) WITH (partitioning = ARRAY['year(\"parent.child\")'])",
10851085
"\\QUnable to parse partitioning value: Invalid source type string for transform: year");
@@ -1831,9 +1831,9 @@ public void testDropColumnUsedInOlderPartitionSpecs()
18311831
String tableName = "test_drop_partition_column_" + randomNameSuffix();
18321832
assertUpdate("CREATE TABLE " + tableName + " (id INTEGER, name VARCHAR, age INTEGER) WITH (partitioning = ARRAY['id', 'truncate(name, 5)', 'void(age)'])");
18331833
assertUpdate("ALTER TABLE " + tableName + " SET PROPERTIES partitioning = ARRAY[]");
1834-
assertQueryFails("ALTER TABLE " + tableName + " DROP COLUMN id", "Cannot drop column which is used by an old partition spec: id");
1835-
assertQueryFails("ALTER TABLE " + tableName + " DROP COLUMN name", "Cannot drop column which is used by an old partition spec: name");
1836-
assertQueryFails("ALTER TABLE " + tableName + " DROP COLUMN age", "Cannot drop column which is used by an old partition spec: age");
1834+
assertUpdate("ALTER TABLE " + tableName + " DROP COLUMN id");
1835+
assertUpdate("ALTER TABLE " + tableName + " DROP COLUMN name");
1836+
assertQueryReturnsEmptyResult("SELECT * FROM " + tableName);
18371837
assertUpdate("DROP TABLE " + tableName);
18381838
}
18391839

plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/catalog/rest/TestIcebergRestCatalogNestedNamespaceConnectorSmokeTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,7 @@ public void testDropTableWithMissingSnapshotFile()
236236
.isInstanceOf(QueryFailedException.class)
237237
.cause()
238238
.hasMessageContaining("Failed to drop table")
239-
.cause()
240-
.hasMessageMatching("Server error: NotFoundException: Failed to open input stream for file: (.*)");
239+
.hasNoCause();
241240
}
242241

243242
@Test

plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/catalog/rest/TestIcebergTrinoRestCatalogConnectorSmokeTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,7 @@ public void testDropTableWithMissingSnapshotFile()
232232
.isInstanceOf(QueryFailedException.class)
233233
.cause()
234234
.hasMessageContaining("Failed to drop table")
235-
.cause()
236-
.hasMessageMatching("Server error: NotFoundException: Failed to open input stream for file: (.*)");
235+
.hasNoCause();
237236
}
238237

239238
@Test

plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/catalog/rest/TestIcebergVendingRestCatalogConnectorSmokeTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,7 @@ public void testDropTableWithMissingSnapshotFile()
292292
.isInstanceOf(QueryFailedException.class)
293293
.cause()
294294
.hasMessageContaining("Failed to drop table")
295-
.cause()
296-
.hasMessageMatching("Server error: NoSuchKeyException:.*");
295+
.hasNoCause();
297296
}
298297

299298
@Test

plugin/trino-lakehouse/pom.xml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@
1818
<dependency>
1919
<groupId>com.google.guava</groupId>
2020
<artifactId>guava</artifactId>
21-
<exclusions>
22-
<exclusion>
23-
<groupId>org.jspecify</groupId>
24-
<artifactId>jspecify</artifactId>
25-
</exclusion>
26-
</exclusions>
2721
</dependency>
2822

2923
<dependency>
@@ -65,12 +59,6 @@
6559
<dependency>
6660
<groupId>io.trino</groupId>
6761
<artifactId>trino-hudi</artifactId>
68-
<exclusions>
69-
<exclusion>
70-
<groupId>org.jspecify</groupId>
71-
<artifactId>jspecify</artifactId>
72-
</exclusion>
73-
</exclusions>
7462
</dependency>
7563

7664
<dependency>

pom.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
<dep.frontend-npm.version>11.2.0</dep.frontend-npm.version>
198198
<dep.gib.version>4.5.4</dep.gib.version>
199199
<dep.httpcore5.version>5.3.4</dep.httpcore5.version>
200-
<dep.iceberg.version>1.9.2</dep.iceberg.version>
200+
<dep.iceberg.version>1.10.0-SNAPSHOT</dep.iceberg.version>
201201
<dep.jna.version>5.17.0</dep.jna.version>
202202
<dep.jsonwebtoken.version>0.12.6</dep.jsonwebtoken.version>
203203
<dep.jts.version>1.20.0</dep.jts.version>
@@ -2436,6 +2436,13 @@
24362436
</dependencies>
24372437
</dependencyManagement>
24382438

2439+
<repositories>
2440+
<repository>
2441+
<id>apache-snapshots</id>
2442+
<url>https://repository.apache.org/content/repositories/snapshots</url>
2443+
</repository>
2444+
</repositories>
2445+
24392446
<build>
24402447
<pluginManagement>
24412448
<plugins>

testing/trino-faulttolerant-tests/pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@
2424
<groupId>com.google.guava</groupId>
2525
<artifactId>guava</artifactId>
2626
<scope>runtime</scope>
27-
<exclusions>
28-
<exclusion>
29-
<groupId>org.jspecify</groupId>
30-
<artifactId>jspecify</artifactId>
31-
</exclusion>
32-
</exclusions>
3327
</dependency>
3428

3529
<dependency>

testing/trino-product-tests/src/main/java/io/trino/tests/product/iceberg/TestIcebergSparkCompatibility.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2518,8 +2518,8 @@ public void testDropPastPartitionedField()
25182518
onSpark().executeQuery("ALTER TABLE " + sparkTableName + " ADD PARTITION FIELD parent.nested");
25192519
onTrino().executeQuery("ALTER TABLE " + trinoTableName + " SET PROPERTIES partitioning = ARRAY[]");
25202520

2521-
assertQueryFailure(() -> onTrino().executeQuery("ALTER TABLE " + trinoTableName + " DROP COLUMN parent.nested"))
2522-
.hasMessageContaining("Cannot drop column which is used by an old partition spec: parent.nested");
2521+
onTrino().executeQuery("ALTER TABLE " + trinoTableName + " DROP COLUMN parent.nested");
2522+
assertThat(onSpark().executeQuery("SELECT * FROM " + sparkTableName)).hasNoRows();
25232523

25242524
onTrino().executeQuery("DROP TABLE " + trinoTableName);
25252525
}

0 commit comments

Comments
 (0)