presto-main/src/main/java/io/prestosql/sql/planner/iterative/rule/InlineProjections.java/InlineProjections/inlineReferences
class InlineProjections:    private static Expression inlineReferences(Expression expression, Assignments assignments)
    {
        Function<Symbol, Expression> mapping = symbol -> {
            Expression result = assignments.get(symbol);
            if (result != null) {
                return result;
            }

            return symbol.toSymbolReference();
        };

        return inlineSymbols(mapping, expression);
    }