class UpdateSettingsPlan implements Plan {

    private final Collection<Assignment<Symbol>> settings;
    private final boolean isPersistent;

    public UpdateSettingsPlan(Collection<Assignment<Symbol>> settings, boolean isPersistent) {
        this.settings = settings;
        this.isPersistent = isPersistent;
    }

    @VisibleForTesting
    public Collection<Assignment<Symbol>> settings() {
        return settings;
    }

    @VisibleForTesting
    public boolean isPersistent() {
        return isPersistent;
    }

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

    @Override
    public void executeOrFail(DependencyCarrier dependencies,
                              PlannerContext plannerContext,
                              RowConsumer consumer,
                              Row params,
                              SubQueryResults subQueryResults) {

        Function<? super Symbol, Object> eval = x -> SymbolEvaluator.evaluate(plannerContext.transactionContext(),
                                                                              plannerContext.nodeContext(),
                                                                              x,
                                                                              params,
                                                                              subQueryResults);
        ClusterUpdateSettingsRequest request = isPersistent
            ? new ClusterUpdateSettingsRequest().persistentSettings(buildSettingsFrom(settings, eval))
            : new ClusterUpdateSettingsRequest().transientSettings(buildSettingsFrom(settings, eval));

        OneRowActionListener<ClusterUpdateSettingsResponse> actionListener = new OneRowActionListener<>(
            consumer,
            r -> r.isAcknowledged() ? new Row1(1L) : new Row1(0L));
        dependencies.client().execute(ClusterUpdateSettingsAction.INSTANCE, request)
            .whenComplete(actionListener);
    }

    @VisibleForTesting
    static Settings buildSettingsFrom(Collection<Assignment<Symbol>> assignments,
                                      Function<? super Symbol, Object> eval) {<FILL_FUNCTION_BODY>}
}

        Settings.Builder settingsBuilder = Settings.builder();
        for (Assignment<Symbol> entry : assignments) {
            String settingsName = eval.apply(entry.columnName()).toString();

            if (CrateSettings.isValidSetting(settingsName) == false) {
                throw new IllegalArgumentException("Setting '" + settingsName + "' is not supported");
            }
            Symbol expression = Lists.getOnlyElement(entry.expressions());
            Object value = eval.apply(expression);
            CrateSettings.flattenSettings(settingsBuilder, settingsName, value);
        }

        Settings settings = settingsBuilder.build();
        for (String checkForRuntime : settings.keySet()) {
            CrateSettings.checkIfRuntimeSetting(checkForRuntime);
        }
        return settings;
    
<no_super_class>