class SelectAnalysis {

    private final Map<RelationName, AnalyzedRelation> sources;
    private final ExpressionAnalyzer expressionAnalyzer;
    private final ExpressionAnalysisContext expressionAnalysisContext;
    private final List<Symbol> outputSymbols;
    private final Map<String, Set<Symbol>> outputMap;

    public SelectAnalysis(int expectedItems,
                          Map<RelationName, AnalyzedRelation> sources,
                          ExpressionAnalyzer expressionAnalyzer,
                          ExpressionAnalysisContext expressionAnalysisContext) {
        this.sources = sources;
        this.expressionAnalyzer = expressionAnalyzer;
        this.expressionAnalysisContext = expressionAnalysisContext;
        outputMap = new HashMap<>();
        outputSymbols = new ArrayList<>(expectedItems);
    }

    public List<Symbol> outputSymbols() {
        return outputSymbols;
    }

    Symbol toSymbol(Expression expression) {
        return expressionAnalyzer.convert(expression, expressionAnalysisContext);
    }

    public Map<RelationName, AnalyzedRelation> sources() {
        return sources;
    }

    /**
     * multiMap containing outputNames() as keys and outputSymbols() as values.
     * Can be used to resolve expressions in ORDER BY or GROUP BY where it is important to know
     * if a outputName is unique
     */
    public Map<String, Set<Symbol>> outputMultiMap() {
        return outputMap;
    }

    public void add(ColumnIdent path, Symbol symbol) {<FILL_FUNCTION_BODY>}
}

        outputSymbols.add(symbol);
        var symbols = outputMap.get(path.sqlFqn());
        if (symbols == null) {
            symbols = new HashSet<>();
        }
        symbols.add(symbol);
        outputMap.put(path.sqlFqn(), symbols);
    
<no_super_class>