diff --git a/docs/src/main/sphinx/object-storage/metastores.md b/docs/src/main/sphinx/object-storage/metastores.md
index 476052f1ad3f..e175fe9c8667 100644
--- a/docs/src/main/sphinx/object-storage/metastores.md
+++ b/docs/src/main/sphinx/object-storage/metastores.md
@@ -414,6 +414,12 @@ properties:
* - `hive.metastore.glue.partitions-segments`
- Number of segments for partitioned Glue tables.
- `5`
+* - `hive.metastore.glue.skip-archive`
+ - AWS Glue has the ability to archive older table versions and a user can
+ roll back the table to any historical version if needed. By default, the
+ Hive Connector backed by Glue will not skip the archival of older table
+ versions.
+ - `false`
:::
(iceberg-glue-catalog)=
@@ -430,16 +436,11 @@ described with the following additional property:
* - Property name
- Description
- Default
-* - `iceberg.glue.skip-archive`
- - Skip archiving an old table version when creating a new version in a commit.
- See [AWS Glue Skip
- Archive](https://iceberg.apache.org/docs/latest/aws/#skip-archive).
- - `true`
* - `iceberg.glue.cache-table-metadata`
- While updating the table in AWS Glue, store the table metadata with the
purpose of accelerating `information_schema.columns` and
`system.metadata.table_comments` queries.
- - `true`
+ - `true`
:::
## Iceberg-specific metastores
diff --git a/plugin/trino-hive/pom.xml b/plugin/trino-hive/pom.xml
index 41c71a73f0ea..fc3f324d67a8 100644
--- a/plugin/trino-hive/pom.xml
+++ b/plugin/trino-hive/pom.xml
@@ -650,6 +650,7 @@
**/TestCachedHiveGlueMetastore.java
**/TestGlueHiveMetastore.java
**/TestGlueHiveMetastoreQueries.java
+ **/TestGlueHiveMetastoreSkipArchive.java
**/TestHiveGlueMetadataListing.java
**/TestHiveGlueMetastoreAccessOperations.java
**/TestHiveS3AndGlueMetastoreTest.java
@@ -712,6 +713,7 @@
**/TestCachedHiveGlueMetastore.java
**/TestGlueHiveMetastore.java
**/TestGlueHiveMetastoreQueries.java
+ **/TestGlueHiveMetastoreSkipArchive.java
**/TestHiveGlueMetadataListing.java
**/TestHiveGlueMetastoreAccessOperations.java
**/TestHiveS3AndGlueMetastoreTest.java
diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueHiveExecutionInterceptor.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueHiveExecutionInterceptor.java
new file mode 100644
index 000000000000..5dd7417dfd88
--- /dev/null
+++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueHiveExecutionInterceptor.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.trino.plugin.hive.metastore.glue;
+
+import software.amazon.awssdk.core.SdkRequest;
+import software.amazon.awssdk.core.interceptor.Context;
+import software.amazon.awssdk.core.interceptor.ExecutionAttributes;
+import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;
+import software.amazon.awssdk.services.glue.model.UpdateTableRequest;
+
+public class GlueHiveExecutionInterceptor
+ implements ExecutionInterceptor
+{
+ private final boolean skipArchive;
+
+ GlueHiveExecutionInterceptor(boolean isSkipArchive)
+ {
+ this.skipArchive = isSkipArchive;
+ }
+
+ @Override
+ public SdkRequest modifyRequest(Context.ModifyRequest context, ExecutionAttributes executionAttributes)
+ {
+ if (context.request() instanceof UpdateTableRequest updateTableRequest) {
+ return updateTableRequest.toBuilder().skipArchive(skipArchive).build();
+ }
+ return context.request();
+ }
+}
diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueHiveMetastoreConfig.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueHiveMetastoreConfig.java
index ecf552d189bd..682521467f6e 100644
--- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueHiveMetastoreConfig.java
+++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueHiveMetastoreConfig.java
@@ -49,6 +49,7 @@ public class GlueHiveMetastoreConfig
private int partitionSegments = 5;
private int threads = 40;
private boolean assumeCanonicalPartitionKeys;
+ private boolean skipArchive;
public Optional getGlueRegion()
{
@@ -277,4 +278,17 @@ public GlueHiveMetastoreConfig setAssumeCanonicalPartitionKeys(boolean assumeCan
this.assumeCanonicalPartitionKeys = assumeCanonicalPartitionKeys;
return this;
}
+
+ public boolean isSkipArchive()
+ {
+ return skipArchive;
+ }
+
+ @Config("hive.metastore.glue.skip-archive")
+ @ConfigDescription("Skip archiving an old table version when updating a table in the Glue metastore")
+ public GlueHiveMetastoreConfig setSkipArchive(boolean skipArchive)
+ {
+ this.skipArchive = skipArchive;
+ return this;
+ }
}
diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueMetastoreModule.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueMetastoreModule.java
index 319b2c74724e..8c04a29ff7bb 100644
--- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueMetastoreModule.java
+++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueMetastoreModule.java
@@ -130,6 +130,7 @@ public static GlueClient createGlueClient(GlueHiveMetastoreConfig config, OpenTe
.setCaptureExperimentalSpanAttributes(true)
.setRecordIndividualHttpError(true)
.build().newExecutionInterceptor())
+ .addExecutionInterceptor(new GlueHiveExecutionInterceptor(config.isSkipArchive()))
.retryStrategy(retryBuilder -> retryBuilder
.retryOnException(throwable -> throwable instanceof ConcurrentModificationException)
.backoffStrategy(BackoffStrategy.exponentialDelay(
diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/v1/GlueHiveMetastoreConfig.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/v1/GlueHiveMetastoreConfig.java
index 0f526d34f651..52a185fa1821 100644
--- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/v1/GlueHiveMetastoreConfig.java
+++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/v1/GlueHiveMetastoreConfig.java
@@ -17,6 +17,7 @@
import io.airlift.configuration.ConfigDescription;
import io.airlift.configuration.ConfigSecuritySensitive;
import io.airlift.configuration.DefunctConfig;
+import io.airlift.configuration.LegacyConfig;
import jakarta.annotation.PostConstruct;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
@@ -48,6 +49,7 @@ public class GlueHiveMetastoreConfig
private int readStatisticsThreads = 5;
private int writeStatisticsThreads = 20;
private boolean assumeCanonicalPartitionKeys;
+ private boolean skipArchive;
public Optional getGlueRegion()
{
@@ -276,19 +278,6 @@ public GlueHiveMetastoreConfig setGetPartitionThreads(int getPartitionThreads)
return this;
}
- public boolean isAssumeCanonicalPartitionKeys()
- {
- return assumeCanonicalPartitionKeys;
- }
-
- @Config("hive.metastore.glue.assume-canonical-partition-keys")
- @ConfigDescription("Allow conversion of non-char types (eg BIGINT, timestamp) to canonical string formats")
- public GlueHiveMetastoreConfig setAssumeCanonicalPartitionKeys(boolean assumeCanonicalPartitionKeys)
- {
- this.assumeCanonicalPartitionKeys = assumeCanonicalPartitionKeys;
- return this;
- }
-
@Min(1)
public int getReadStatisticsThreads()
{
@@ -317,6 +306,33 @@ public GlueHiveMetastoreConfig setWriteStatisticsThreads(int writeStatisticsThre
return this;
}
+ public boolean isAssumeCanonicalPartitionKeys()
+ {
+ return assumeCanonicalPartitionKeys;
+ }
+
+ @Config("hive.metastore.glue.assume-canonical-partition-keys")
+ @ConfigDescription("Allow conversion of non-char types (eg BIGINT, timestamp) to canonical string formats")
+ public GlueHiveMetastoreConfig setAssumeCanonicalPartitionKeys(boolean assumeCanonicalPartitionKeys)
+ {
+ this.assumeCanonicalPartitionKeys = assumeCanonicalPartitionKeys;
+ return this;
+ }
+
+ public boolean isSkipArchive()
+ {
+ return skipArchive;
+ }
+
+ @Config("hive.metastore.glue.skip-archive")
+ @LegacyConfig("iceberg.glue.skip-archive")
+ @ConfigDescription("Skip archiving an old table version when updating a table in the Glue metastore")
+ public GlueHiveMetastoreConfig setSkipArchive(boolean skipArchive)
+ {
+ this.skipArchive = skipArchive;
+ return this;
+ }
+
@PostConstruct
public void validate()
{
diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/v1/GlueMetastoreModule.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/v1/GlueMetastoreModule.java
index 4e3450fecb27..5bdd79f6ace3 100644
--- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/v1/GlueMetastoreModule.java
+++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/v1/GlueMetastoreModule.java
@@ -94,7 +94,18 @@ protected void setup(Binder binder)
@ProvidesIntoSet
@Singleton
@ForGlueHiveMetastore
- public RequestHandler2 createRequestHandler(OpenTelemetry openTelemetry)
+ public RequestHandler2 createSkipArchiveRequestHandler(GlueHiveMetastoreConfig config)
+ {
+ if (!config.isSkipArchive()) {
+ return new RequestHandler2() {};
+ }
+ return new SkipArchiveRequestHandler();
+ }
+
+ @ProvidesIntoSet
+ @Singleton
+ @ForGlueHiveMetastore
+ public RequestHandler2 createTelemetryRequestHandler(OpenTelemetry openTelemetry)
{
return AwsSdkTelemetry.builder(openTelemetry)
.setCaptureExperimentalSpanAttributes(true)
diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/glue/SkipArchiveRequestHandler.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/v1/SkipArchiveRequestHandler.java
similarity index 98%
rename from plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/glue/SkipArchiveRequestHandler.java
rename to plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/v1/SkipArchiveRequestHandler.java
index 5bfa765acaa0..d5ba1bc434f2 100644
--- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/glue/SkipArchiveRequestHandler.java
+++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/v1/SkipArchiveRequestHandler.java
@@ -11,7 +11,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package io.trino.plugin.iceberg.catalog.glue;
+package io.trino.plugin.hive.metastore.glue.v1;
import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.handlers.RequestHandler2;
diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/TestGlueHiveMetastoreConfig.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/TestGlueHiveMetastoreConfig.java
index 3ec891481057..903bf49b9657 100644
--- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/TestGlueHiveMetastoreConfig.java
+++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/TestGlueHiveMetastoreConfig.java
@@ -44,7 +44,8 @@ void testDefaults()
.setCatalogId(null)
.setPartitionSegments(5)
.setThreads(40)
- .setAssumeCanonicalPartitionKeys(false));
+ .setAssumeCanonicalPartitionKeys(false)
+ .setSkipArchive(false));
}
@Test
@@ -68,6 +69,7 @@ void testExplicitPropertyMapping()
.put("hive.metastore.glue.partitions-segments", "10")
.put("hive.metastore.glue.threads", "77")
.put("hive.metastore.glue.assume-canonical-partition-keys", "true")
+ .put("hive.metastore.glue.skip-archive", "true")
.buildOrThrow();
GlueHiveMetastoreConfig expected = new GlueHiveMetastoreConfig()
@@ -87,7 +89,8 @@ void testExplicitPropertyMapping()
.setCatalogId("0123456789")
.setPartitionSegments(10)
.setThreads(77)
- .setAssumeCanonicalPartitionKeys(true);
+ .setAssumeCanonicalPartitionKeys(true)
+ .setSkipArchive(true);
assertFullMapping(properties, expected);
}
diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/TestGlueHiveMetastoreSkipArchive.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/TestGlueHiveMetastoreSkipArchive.java
new file mode 100644
index 000000000000..19a0c276d336
--- /dev/null
+++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/TestGlueHiveMetastoreSkipArchive.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.trino.plugin.hive.metastore.glue;
+
+import io.trino.plugin.hive.HiveQueryRunner;
+import io.trino.testing.AbstractTestQueryFramework;
+import io.trino.testing.DistributedQueryRunner;
+import io.trino.testing.QueryRunner;
+import io.trino.testing.sql.TestTable;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.Test;
+import software.amazon.awssdk.services.glue.GlueClient;
+import software.amazon.awssdk.services.glue.model.TableVersion;
+
+import java.util.List;
+
+import static com.google.common.collect.Iterables.getOnlyElement;
+import static io.trino.testing.TestingNames.randomNameSuffix;
+import static io.trino.testing.TestingSession.testSessionBuilder;
+import static org.assertj.core.api.Assertions.assertThat;
+
+final class TestGlueHiveMetastoreSkipArchive
+ extends AbstractTestQueryFramework
+{
+ private final String testSchema = "test_schema_" + randomNameSuffix();
+ private final GlueClient glueClient = GlueClient.create();
+
+ @Override
+ protected QueryRunner createQueryRunner()
+ throws Exception
+ {
+ DistributedQueryRunner queryRunner = HiveQueryRunner.builder(testSessionBuilder()
+ .setCatalog("hive")
+ .setSchema(testSchema)
+ .build())
+ .addHiveProperty("hive.metastore", "glue")
+ .addHiveProperty("hive.metastore.glue.default-warehouse-dir", "local:///glue")
+ .addHiveProperty("hive.security", "allow-all")
+ .addHiveProperty("hive.metastore.glue.skip-archive", "true")
+ .setCreateTpchSchemas(false)
+ .build();
+ queryRunner.execute("CREATE SCHEMA " + testSchema);
+ return queryRunner;
+ }
+
+ @AfterAll
+ void cleanUpSchema()
+ {
+ getQueryRunner().execute("DROP SCHEMA " + testSchema + " CASCADE");
+ }
+
+ @Test
+ void testSkipArchive()
+ {
+ try (TestTable table = new TestTable(getQueryRunner()::execute, "test_skip_archive", "(col int)")) {
+ List tableVersionsBeforeInsert = getTableVersions(testSchema, table.getName());
+ assertThat(tableVersionsBeforeInsert).hasSize(1);
+ String versionIdBeforeInsert = getOnlyElement(tableVersionsBeforeInsert).versionId();
+
+ assertUpdate("INSERT INTO " + table.getName() + " VALUES 1", 1);
+
+ // Verify count of table versions isn't increased, but version id is changed
+ List tableVersionsAfterInsert = getTableVersions(testSchema, table.getName());
+ assertThat(tableVersionsAfterInsert).hasSize(1);
+ String versionIdAfterInsert = getOnlyElement(tableVersionsAfterInsert).versionId();
+ assertThat(versionIdBeforeInsert).isNotEqualTo(versionIdAfterInsert);
+ }
+ }
+
+ private List getTableVersions(String databaseName, String tableName)
+ {
+ return glueClient.getTableVersions(builder -> builder.databaseName(databaseName).tableName(tableName)).tableVersions();
+ }
+}
diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/v1/TestGlueHiveMetastoreConfig.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/v1/TestGlueHiveMetastoreConfig.java
index 4e2ca96e0316..38c71002bbe4 100644
--- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/v1/TestGlueHiveMetastoreConfig.java
+++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/v1/TestGlueHiveMetastoreConfig.java
@@ -46,6 +46,7 @@ public void testDefaults()
.setPartitionSegments(5)
.setGetPartitionThreads(20)
.setAssumeCanonicalPartitionKeys(false)
+ .setSkipArchive(false)
.setReadStatisticsThreads(5)
.setWriteStatisticsThreads(20));
}
@@ -72,6 +73,7 @@ public void testExplicitPropertyMapping()
.put("hive.metastore.glue.partitions-segments", "10")
.put("hive.metastore.glue.get-partition-threads", "42")
.put("hive.metastore.glue.assume-canonical-partition-keys", "true")
+ .put("hive.metastore.glue.skip-archive", "true")
.put("hive.metastore.glue.read-statistics-threads", "42")
.put("hive.metastore.glue.write-statistics-threads", "43")
.buildOrThrow();
@@ -95,6 +97,7 @@ public void testExplicitPropertyMapping()
.setPartitionSegments(10)
.setGetPartitionThreads(42)
.setAssumeCanonicalPartitionKeys(true)
+ .setSkipArchive(true)
.setReadStatisticsThreads(42)
.setWriteStatisticsThreads(43);
diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/glue/IcebergGlueCatalogConfig.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/glue/IcebergGlueCatalogConfig.java
index 156f48acebc0..b692527ab903 100644
--- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/glue/IcebergGlueCatalogConfig.java
+++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/glue/IcebergGlueCatalogConfig.java
@@ -14,12 +14,10 @@
package io.trino.plugin.iceberg.catalog.glue;
import io.airlift.configuration.Config;
-import io.airlift.configuration.ConfigDescription;
public class IcebergGlueCatalogConfig
{
private boolean cacheTableMetadata = true;
- private boolean skipArchive = true;
public boolean isCacheTableMetadata()
{
@@ -32,17 +30,4 @@ public IcebergGlueCatalogConfig setCacheTableMetadata(boolean cacheTableMetadata
this.cacheTableMetadata = cacheTableMetadata;
return this;
}
-
- public boolean isSkipArchive()
- {
- return skipArchive;
- }
-
- @Config("iceberg.glue.skip-archive")
- @ConfigDescription("Skip archiving an old table version when creating a new version in a commit")
- public IcebergGlueCatalogConfig setSkipArchive(boolean skipArchive)
- {
- this.skipArchive = skipArchive;
- return this;
- }
}
diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/glue/IcebergGlueCatalogModule.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/glue/IcebergGlueCatalogModule.java
index f86128a7da76..3aeef110d388 100644
--- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/glue/IcebergGlueCatalogModule.java
+++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/glue/IcebergGlueCatalogModule.java
@@ -14,7 +14,6 @@
package io.trino.plugin.iceberg.catalog.glue;
import com.amazonaws.auth.AWSCredentialsProvider;
-import com.amazonaws.handlers.RequestHandler2;
import com.amazonaws.services.glue.model.Table;
import com.google.inject.Binder;
import com.google.inject.Key;
@@ -37,7 +36,6 @@
import static com.google.inject.multibindings.Multibinder.newSetBinder;
import static com.google.inject.multibindings.OptionalBinder.newOptionalBinder;
-import static io.airlift.configuration.ConditionalModule.conditionalModule;
import static io.airlift.configuration.ConfigBinder.configBinder;
import static org.weakref.jmx.guice.ExportBinder.newExporter;
@@ -48,6 +46,7 @@ public class IcebergGlueCatalogModule
protected void setup(Binder binder)
{
configBinder(binder).bindConfig(GlueHiveMetastoreConfig.class);
+ configBinder(binder).bindConfigDefaults(GlueHiveMetastoreConfig.class, config -> config.setSkipArchive(true));
configBinder(binder).bindConfig(IcebergGlueCatalogConfig.class);
binder.bind(GlueMetastoreStats.class).in(Scopes.SINGLETON);
newExporter(binder).export(GlueMetastoreStats.class).withGeneratedName();
@@ -56,11 +55,6 @@ protected void setup(Binder binder)
binder.bind(TrinoCatalogFactory.class).to(TrinoGlueCatalogFactory.class).in(Scopes.SINGLETON);
newExporter(binder).export(TrinoCatalogFactory.class).withGeneratedName();
- install(conditionalModule(
- IcebergGlueCatalogConfig.class,
- IcebergGlueCatalogConfig::isSkipArchive,
- internalBinder -> newSetBinder(internalBinder, RequestHandler2.class, ForGlueHiveMetastore.class).addBinding().toInstance(new SkipArchiveRequestHandler())));
-
// Required to inject HiveMetastoreFactory for migrate procedure
binder.bind(Key.get(boolean.class, HideDeltaLakeTables.class)).toInstance(false);
newOptionalBinder(binder, Key.get(new TypeLiteral>() {}, ForGlueHiveMetastore.class))
diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/catalog/glue/TestIcebergGlueCatalogConfig.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/catalog/glue/TestIcebergGlueCatalogConfig.java
index c6b329340154..1833bf9c3337 100644
--- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/catalog/glue/TestIcebergGlueCatalogConfig.java
+++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/catalog/glue/TestIcebergGlueCatalogConfig.java
@@ -28,8 +28,7 @@ public class TestIcebergGlueCatalogConfig
public void testDefaults()
{
assertRecordedDefaults(recordDefaults(IcebergGlueCatalogConfig.class)
- .setCacheTableMetadata(true)
- .setSkipArchive(true));
+ .setCacheTableMetadata(true));
}
@Test
@@ -37,12 +36,10 @@ public void testExplicitPropertyMapping()
{
Map properties = ImmutableMap.builder()
.put("iceberg.glue.cache-table-metadata", "false")
- .put("iceberg.glue.skip-archive", "false")
.buildOrThrow();
IcebergGlueCatalogConfig expected = new IcebergGlueCatalogConfig()
- .setCacheTableMetadata(false)
- .setSkipArchive(false);
+ .setCacheTableMetadata(false);
assertFullMapping(properties, expected);
}
diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/catalog/glue/TestingIcebergGlueCatalogModule.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/catalog/glue/TestingIcebergGlueCatalogModule.java
index 765081865a67..2db57a9288f1 100644
--- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/catalog/glue/TestingIcebergGlueCatalogModule.java
+++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/catalog/glue/TestingIcebergGlueCatalogModule.java
@@ -14,7 +14,6 @@
package io.trino.plugin.iceberg.catalog.glue;
import com.amazonaws.auth.AWSCredentialsProvider;
-import com.amazonaws.handlers.RequestHandler2;
import com.amazonaws.services.glue.model.Table;
import com.google.inject.Binder;
import com.google.inject.Key;
@@ -32,9 +31,7 @@
import java.util.function.Predicate;
-import static com.google.inject.multibindings.Multibinder.newSetBinder;
import static com.google.inject.multibindings.OptionalBinder.newOptionalBinder;
-import static io.airlift.configuration.ConditionalModule.conditionalModule;
import static io.airlift.configuration.ConfigBinder.configBinder;
import static java.util.Objects.requireNonNull;
import static org.weakref.jmx.guice.ExportBinder.newExporter;
@@ -53,6 +50,7 @@ public TestingIcebergGlueCatalogModule(AWSGlueAsyncAdapterProvider awsGlueAsyncA
protected void setup(Binder binder)
{
configBinder(binder).bindConfig(GlueHiveMetastoreConfig.class);
+ configBinder(binder).bindConfigDefaults(GlueHiveMetastoreConfig.class, config -> config.setSkipArchive(true));
configBinder(binder).bindConfig(IcebergGlueCatalogConfig.class);
binder.bind(GlueMetastoreStats.class).in(Scopes.SINGLETON);
newExporter(binder).export(GlueMetastoreStats.class).withGeneratedName();
@@ -62,11 +60,6 @@ protected void setup(Binder binder)
newExporter(binder).export(TrinoCatalogFactory.class).withGeneratedName();
binder.bind(AWSGlueAsyncAdapterProvider.class).toInstance(awsGlueAsyncAdapterProvider);
- install(conditionalModule(
- IcebergGlueCatalogConfig.class,
- IcebergGlueCatalogConfig::isSkipArchive,
- internalBinder -> newSetBinder(internalBinder, RequestHandler2.class, ForGlueHiveMetastore.class).addBinding().toInstance(new SkipArchiveRequestHandler())));
-
// Required to inject HiveMetastoreFactory for migrate procedure
binder.bind(Key.get(boolean.class, HideDeltaLakeTables.class)).toInstance(false);
newOptionalBinder(binder, Key.get(new TypeLiteral>() {}, ForGlueHiveMetastore.class))