presto-main/src/main/java/io/prestosql/sql/planner/SymbolsExtractor.java/SymbolsExtractor/extractUniqueNonRecursive
class SymbolsExtractor:    public static Set<Symbol> extractUniqueNonRecursive(PlanNode node)
    {
        ImmutableSet.Builder<Symbol> uniqueSymbols = ImmutableSet.builder();
        extractExpressionsNonRecursive(node).forEach(expression -> uniqueSymbols.addAll(extractUnique(expression)));

        return uniqueSymbols.build();
    }