diff --git a/core/src/main/java/org/apache/calcite/sql/type/SqlTypeMappingRules.java b/core/src/main/java/org/apache/calcite/sql/type/SqlTypeMappingRules.java index 93c786bbde98..047667b323f3 100644 --- a/core/src/main/java/org/apache/calcite/sql/type/SqlTypeMappingRules.java +++ b/core/src/main/java/org/apache/calcite/sql/type/SqlTypeMappingRules.java @@ -72,9 +72,9 @@ public static class Builder { } /** Add a map entry to the existing {@link Builder} mapping. */ - void add(SqlTypeName fromType, Set toTypes) { + void add(SqlTypeName toType, Set fromTypes) { try { - map.put(fromType, sets.get(toTypes)); + map.put(toType, sets.get(fromTypes)); } catch (UncheckedExecutionException | ExecutionException e) { throw Util.throwAsRuntime("populating SqlTypeAssignmentRules", Util.causeOrSelf(e)); }