presto-main/src/main/java/io/prestosql/sql/planner/iterative/rule/PushDeleteIntoConnector.java/PushDeleteIntoConnector/apply
class PushDeleteIntoConnector:    @Override
    public Result apply(TableFinishNode node, Captures captures, Context context)
    {
        TableScanNode tableScan = captures.get(TABLE_SCAN);

        return metadata.applyDelete(context.getSession(), tableScan.getTable())
                .map(newHandle -> new TableDeleteNode(
                        context.getIdAllocator().getNextId(),
                        newHandle,
                        getOnlyElement(node.getOutputSymbols())))
                .map(Result::ofPlanNode)
                .orElseGet(Result::empty);
    }