presto-main/src/main/java/io/prestosql/sql/planner/SubqueryPlanner.java/SubqueryPlanner/collectScalarSubqueries
class SubqueryPlanner:    public Set<SubqueryExpression> collectScalarSubqueries(Expression expression, Node node)
    {
        return analysis.getScalarSubqueries(node)
                .stream()
                .filter(subquery -> nodeContains(expression, subquery))
                .collect(toImmutableSet());
    }