presto-main/src/main/java/io/prestosql/metadata/FunctionRegistry.java/FunctionRegistry/returnTypeIsTheSame
class FunctionRegistry:    private boolean returnTypeIsTheSame(List<ApplicableFunction> applicableFunctions)
    {
        Set<Type> returnTypes = applicableFunctions.stream()
                .map(function -> metadata.getType(function.getBoundSignature().getReturnType()))
                .collect(Collectors.toSet());
        return returnTypes.size() == 1;
    }