class DecommissionNodePlan implements Plan {

    private final AnalyzedDecommissionNode analyzedDecommissionNode;

    DecommissionNodePlan(AnalyzedDecommissionNode analyzedDecommissionNode) {
        this.analyzedDecommissionNode = analyzedDecommissionNode;
    }

    @Override
    public StatementType type() {
        return StatementType.MANAGEMENT;
    }

    @Override
    public void executeOrFail(DependencyCarrier dependencies,
                              PlannerContext plannerContext,
                              RowConsumer consumer,
                              Row params,
                              SubQueryResults subQueryResults) {
        var boundedNodeIdOrName = boundNodeIdOrName(
            analyzedDecommissionNode,
            plannerContext.transactionContext(),
            plannerContext.nodeContext(),
            params,
            subQueryResults);

        String targetNodeId = NodeSelection.resolveNodeId(
            dependencies.clusterService().state().nodes(),
            boundedNodeIdOrName
        );

        dependencies.client()
            .execute(DecommissionNodeAction.INSTANCE, DecommissionRequest.of(targetNodeId))
            .whenComplete(new OneRowActionListener<>(
                consumer,
                r -> r.isAcknowledged() ? new Row1(1L) : new Row1(0L)));
    }

    @VisibleForTesting
    public static String boundNodeIdOrName(AnalyzedDecommissionNode decommissionNode,
                                           CoordinatorTxnCtx txnCtx,
                                           NodeContext nodeCtx,
                                           Row parameters,
                                           SubQueryResults subQueryResults) {<FILL_FUNCTION_BODY>}
}

        var boundedNodeIdOrName = SymbolEvaluator.evaluate(
            txnCtx,
            nodeCtx,
            decommissionNode.nodeIdOrName(),
            parameters,
            subQueryResults
        );
        return DataTypes.STRING.sanitizeValue(boundedNodeIdOrName);
    
<no_super_class>