presto-main/src/main/java/io/prestosql/sql/planner/optimizations/BeginTableWrite.java/BeginTableWrite/optimize
class BeginTableWrite:    @Override
    public PlanNode optimize(PlanNode plan, Session session, TypeProvider types, SymbolAllocator symbolAllocator, PlanNodeIdAllocator idAllocator, WarningCollector warningCollector)
    {
        return SimplePlanRewriter.rewriteWith(new Rewriter(session), plan, new Context());
    }