diff --git a/sql/src/main/java/org/apache/druid/sql/calcite/run/DruidHook.java b/sql/src/main/java/org/apache/druid/sql/calcite/run/DruidHook.java index c790033ab7f..c502e08ced4 100644 --- a/sql/src/main/java/org/apache/druid/sql/calcite/run/DruidHook.java +++ b/sql/src/main/java/org/apache/druid/sql/calcite/run/DruidHook.java @@ -19,6 +19,7 @@ package org.apache.druid.sql.calcite.run; +import com.google.errorprone.annotations.Immutable; import org.apache.calcite.rel.RelNode; import java.io.Closeable; import java.util.ArrayList; @@ -30,10 +31,11 @@ import java.util.Objects; @FunctionalInterface public interface DruidHook { + @Immutable class HookKey { - private String label; - private Class type; + private final String label; + private final Class type; public HookKey(String label, Class type) {