Code review comment: i think, maybe could simplify to ```java  new DeleteFromUsingCommand(nameParts, tableAlias, isTempPart, partitions,                         logicalQuery, Optional.empty()).run(ctx, executor); ```

Code under review:
public void run(ConnectContext ctx, StmtExecutor executor) throws Exception {
        LogicalPlanAdapter logicalPlanAdapter = new LogicalPlanAdapter(logicalQuery, ctx.getStatementContext());
        updateSessionVariableForDelete(ctx.getSessionVariable());
        NereidsPlanner planner = new NereidsPlanner(ctx.getStatementContext());
        planner.plan(logicalPlanAdapter, ctx.getSessionVariable().toThrift());
        executor.setPlanner(planner);
        executor.checkBlockRules();
        
        if (planner.getPhysicalPlan() instanceof PhysicalEmptyRelation) {
            Env.getCurrentEnv()
                    .getDeleteHandler().processEmptyRelation(ctx.getState());
            return;
        }
        Optional<PhysicalFilter<?>> optFilter = (planner.getPhysicalPlan()
                .<PhysicalFilter<?>>collect(PhysicalFilter.class::isInstance)).stream()
                .findAny();
        Optional<PhysicalOlapScan> optScan = (planner.getPhysicalPlan()
                .<PhysicalOlapScan>collect(PhysicalOlapScan.class::isInstance)).stream()
                .findAny();
        Optional<UnboundRelation> optRelation = (logicalQuery
                .<UnboundRelation>collect(UnboundRelation.class::isInstance)).stream()
                .findAny();
        Preconditions.checkArgument(optFilter.isPresent(), "delete command must contain filter");
        Preconditions.checkArgument(optScan.isPresent(), "delete command could be only used on olap table");
        Preconditions.checkArgument(optRelation.isPresent(), "delete command could be only used on olap table");
        PhysicalOlapScan scan = optScan.get();
        UnboundRelation relation = optRelation.get();
        PhysicalFilter<?> filter = optFilter.get();

        if (!Env.getCurrentEnv().getAccessManager()
                .checkTblPriv(ConnectContext.get(), scan.getDatabase().getCatalog().getName(),
                        scan.getDatabase().getFullName(),
                        scan.getTable().getName(), PrivPredicate.LOAD)) {
            String message = ErrorCode.ERR_TABLEACCESS_DENIED_ERROR.formatErrorMsg("LOAD",
                    ConnectContext.get().getQualifiedUser(), ConnectContext.get().getRemoteIP(),
                    scan.getDatabase().getFullName() + ": " + scan.getTable().getName());
            throw new AnalysisException(message);
        }

        
        OlapTable olapTable = scan.getTable();
        Set<String> columns = olapTable.getFullSchema().stream().map(Column::getName).collect(Collectors.toSet());
        try {
            Plan plan = planner.getPhysicalPlan();
            checkSubQuery(plan);
            for (Expression conjunct : filter.getConjuncts()) {
                conjunct.<SlotReference>collect(SlotReference.class::isInstance)
                        .forEach(s -> checkColumn(columns, s, olapTable));
                checkPredicate(conjunct);
            }
        } catch (Exception e) {
            try {
                new DeleteFromUsingCommand(nameParts, tableAlias, isTempPart, partitions,
                        logicalQuery, Optional.empty()).run(ctx, executor);
                return;
            } catch (Exception e2) {
                throw e;
            }
        }

        if (olapTable.getKeysType() == KeysType.UNIQUE_KEYS && olapTable.getEnableUniqueKeyMergeOnWrite()) {
            EqualTo deleteSignEqualTo =
                    (EqualTo) new NereidsParser().parseExpression("__DORIS_DELETE_SIGN__ = 1");
            UpdateCommand updateCommand = new UpdateCommand(this.nameParts, this.tableAlias,
                    Collections.singletonList(deleteSignEqualTo), this.logicalQuery, Optional.empty());
            updateCommand.setDeleteCommand(true);
            updateCommand.run(ctx, executor);
            return;
        }

        
        List<Predicate> predicates = planner.getScanNodes().get(0).getConjuncts().stream()
                .filter(c -> {
                    
                    List<Expr> slotRefs = Lists.newArrayList();
                    c.collect(SlotRef.class::isInstance, slotRefs);
                    return slotRefs.stream().map(SlotRef.class::cast)
                            .noneMatch(s -> Column.DELETE_SIGN.equalsIgnoreCase(s.getColumnName()));
                })
                .map(c -> {
                    if (c instanceof Predicate) {
                        return (Predicate) c;
                    } else {
                        throw new AnalysisException("non predicate in filter: " + c.toSql());
                    }
                }).collect(Collectors.toList());
        if (predicates.isEmpty()) {
            
            
            throw new AnalysisException("delete all rows is forbidden temporary.");
        }
        Env.getCurrentEnv()
                .getDeleteHandler()
                .process((Database) scan.getDatabase(), scan.getTable(),
                        Lists.newArrayList(relation.getPartNames()), predicates, ctx.getState());
    }

Line commented on: updateCommand.run(ctx, executor);

Revised code:
public void run(ConnectContext ctx, StmtExecutor executor) throws Exception {
        LogicalPlanAdapter logicalPlanAdapter = new LogicalPlanAdapter(logicalQuery, ctx.getStatementContext());
        updateSessionVariableForDelete(ctx.getSessionVariable());
        NereidsPlanner planner = new NereidsPlanner(ctx.getStatementContext());
        planner.plan(logicalPlanAdapter, ctx.getSessionVariable().toThrift());
        executor.setPlanner(planner);
        executor.checkBlockRules();
        
        if (planner.getPhysicalPlan() instanceof PhysicalEmptyRelation) {
            Env.getCurrentEnv()
                    .getDeleteHandler().processEmptyRelation(ctx.getState());
            return;
        }
        Optional<PhysicalFilter<?>> optFilter = (planner.getPhysicalPlan()
                .<PhysicalFilter<?>>collect(PhysicalFilter.class::isInstance)).stream()
                .findAny();
        Optional<PhysicalOlapScan> optScan = (planner.getPhysicalPlan()
                .<PhysicalOlapScan>collect(PhysicalOlapScan.class::isInstance)).stream()
                .findAny();
        Optional<UnboundRelation> optRelation = (logicalQuery
                .<UnboundRelation>collect(UnboundRelation.class::isInstance)).stream()
                .findAny();
        Preconditions.checkArgument(optFilter.isPresent(), "delete command must contain filter");
        Preconditions.checkArgument(optScan.isPresent(), "delete command could be only used on olap table");
        Preconditions.checkArgument(optRelation.isPresent(), "delete command could be only used on olap table");
        PhysicalOlapScan scan = optScan.get();
        UnboundRelation relation = optRelation.get();
        PhysicalFilter<?> filter = optFilter.get();

        if (!Env.getCurrentEnv().getAccessManager()
                .checkTblPriv(ConnectContext.get(), scan.getDatabase().getCatalog().getName(),
                        scan.getDatabase().getFullName(),
                        scan.getTable().getName(), PrivPredicate.LOAD)) {
            String message = ErrorCode.ERR_TABLEACCESS_DENIED_ERROR.formatErrorMsg("LOAD",
                    ConnectContext.get().getQualifiedUser(), ConnectContext.get().getRemoteIP(),
                    scan.getDatabase().getFullName() + ": " + scan.getTable().getName());
            throw new AnalysisException(message);
        }

        
        OlapTable olapTable = scan.getTable();
        Set<String> columns = olapTable.getFullSchema().stream().map(Column::getName).collect(Collectors.toSet());
        try {
            Plan plan = planner.getPhysicalPlan();
            checkSubQuery(plan);
            for (Expression conjunct : filter.getConjuncts()) {
                conjunct.<SlotReference>collect(SlotReference.class::isInstance)
                        .forEach(s -> checkColumn(columns, s, olapTable));
                checkPredicate(conjunct);
            }
        } catch (Exception e) {
            try {
                new DeleteFromUsingCommand(nameParts, tableAlias, isTempPart, partitions,
                        logicalQuery, Optional.empty()).run(ctx, executor);
                return;
            } catch (Exception e2) {
                throw e;
            }
        }

        if (olapTable.getKeysType() == KeysType.UNIQUE_KEYS && olapTable.getEnableUniqueKeyMergeOnWrite()
                && !olapTable.getEnableDeleteOnDeletePredicate()) {
            new DeleteFromUsingCommand(nameParts, tableAlias, isTempPart, partitions,
                    logicalQuery, Optional.empty()).run(ctx, executor);
            return;
        }

        
        List<Predicate> predicates = planner.getScanNodes().get(0).getConjuncts().stream()
                .filter(c -> {
                    
                    List<Expr> slotRefs = Lists.newArrayList();
                    c.collect(SlotRef.class::isInstance, slotRefs);
                    return slotRefs.stream().map(SlotRef.class::cast)
                            .noneMatch(s -> Column.DELETE_SIGN.equalsIgnoreCase(s.getColumnName()));
                })
                .map(c -> {
                    if (c instanceof Predicate) {
                        return (Predicate) c;
                    } else {
                        throw new AnalysisException("non predicate in filter: " + c.toSql());
                    }
                }).collect(Collectors.toList());
        if (predicates.isEmpty()) {
            
            
            throw new AnalysisException("delete all rows is forbidden temporary.");
        }
        Env.getCurrentEnv()
                .getDeleteHandler()
                .process((Database) scan.getDatabase(), scan.getTable(),
                        Lists.newArrayList(relation.getPartNames()), predicates, ctx.getState());
    }