presto-main/src/main/java/io/prestosql/metadata/FunctionRegistry.java/FunctionRegistry/getSpecializedFunctionKey
class FunctionRegistry:    private SpecializedFunctionKey getSpecializedFunctionKey(ResolvedFunction resolvedFunction)
    {
        SqlFunction function = functions.get(resolvedFunction.getFunctionId());
        Signature signature = resolvedFunction.getSignature();
        BoundVariables boundVariables = new SignatureBinder(metadata, function.getFunctionMetadata().getSignature(), false)
                .bindVariables(fromTypeSignatures(signature.getArgumentTypes()), signature.getReturnType())
                .orElseThrow(() -> new IllegalArgumentException("Could not extract bound variables"));
        return new SpecializedFunctionKey(
                function,
                boundVariables,
                signature.getArgumentTypes().size());
    }