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 8bfe42ea3876..3388f80ce814 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 @@ -59,8 +59,8 @@ protected void setup(Binder binder) .setDefault().toProvider(DefaultGlueMetastoreTableFilterProvider.class).in(Scopes.SINGLETON); binder.bind(GlueHiveMetastore.class).in(Scopes.SINGLETON); - binder.bind(HiveMetastoreFactory.class) - .annotatedWith(RawHiveMetastoreFactory.class) + newOptionalBinder(binder, Key.get(HiveMetastoreFactory.class, RawHiveMetastoreFactory.class)) + .setDefault() .to(GlueHiveMetastoreFactory.class) .in(Scopes.SINGLETON);