presto-main/src/main/java/io/prestosql/metadata/SignatureBinder.java/SignatureBinder/longVariablesOf
class SignatureBinder:    private static Set<String> longVariablesOf(TypeSignature typeSignature)
    {
        Set<String> variables = new HashSet<>();
        for (TypeSignatureParameter parameter : typeSignature.getParameters()) {
            switch (parameter.getKind()) {
                case TYPE:
                    variables.addAll(longVariablesOf(parameter.getTypeSignature()));
                    break;
                case NAMED_TYPE:
                    variables.addAll(longVariablesOf(parameter.getNamedTypeSignature().getTypeSignature()));
                    break;
                case LONG:
                    break;
                case VARIABLE:
                    variables.add(parameter.getVariable());
                    break;
                default:
                    throw new UnsupportedOperationException();
            }
        }

        return variables;
    }