presto-main/src/main/java/io/prestosql/sql/ExpressionUtils.java/ExpressionUtils/referencesAny
class ExpressionUtils:    public static boolean referencesAny(Expression expression, Collection<Symbol> variables)
    {
        Set<Symbol> references = SymbolsExtractor.extractUnique(expression);

        return variables.stream().anyMatch(references::contains);
    }