MethodHandle methodHandle = lookup().unreflect(method);
String name = scalarFunction.value();
if (name.isEmpty()) {
name = camelToSnake(method.getName());
}
SqlType returnTypeAnnotation = method.getAnnotation(SqlType.class);
checkArgument(returnTypeAnnotation != null, "Method %s return type does not have a @SqlType annotation", method);
Type returnType = type(typeManager, returnTypeAnnotation);
Signature signature = new Signature(name.toLowerCase(), returnType.getName(), Lists.transform(parameterTypes(typeManager, method), nameGetter()));
verifyMethodSignature(method, signature.getReturnType(), signature.getArgumentTypes(), typeManager);