From 1158ed124efd97a952b128b366fba70f22cb71b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Walkiewicz?= Date: Wed, 14 Dec 2022 10:53:18 +0100 Subject: [PATCH] Use optional binding for GlueHiveMetastoreFactory --- .../trino/plugin/hive/metastore/glue/GlueMetastoreModule.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);