apache/cassandra · error · InvalidRequestException

Column modification is not supported by table

Error message

Column modification is not supported by table %s

What it means

applyColumnUpdate is the base-class hook invoked when a mutation writes or nulls a column value on a virtual table. The default implementation throws this InvalidRequestException, meaning the table accepts no column modifications unless a subclass overrides applyColumnUpdate. It signals that the virtual table is effectively read-only for cell-level writes.

Solutions

  1. Use the supported mutation hook of the table (e.g. full-row INSERT if applyRowUpdate is overridden) or the documented mechanism (nodetool, config keyspace table) to change the value.
  2. Remove the UPDATE/INSERT if the table is intended read-only.
  3. If you own the virtual table, override applyColumnUpdate to implement the write.
  4. Verify which mutations the table supports before writing (check its class or DESCRIBE output).

Example fix

// before
UPDATE system_views.sstable_tasks SET status = 'done' WHERE task_id = ...; // rejected
// after
-- use the supported API, e.g. nodetool or the dedicated settings table:
UPDATE system.config SET value = 'true' WHERE key = 'some_setting';
Defensive patterns

Strategy: validation

Validate before calling

// Only issue UPDATE/INSERT against virtual tables known to override applyColumnUpdate
boolean writable = tableClass != null && !AbstractMutableVirtualTable.class.getDeclaredMethod("applyColumnUpdate", ...)
    .getDeclaringClass().equals(tableClass);

Try / catch

try { session.execute(updateStmt); }
catch (InvalidRequestException e) { if (e.getMessage().contains("Column modification is not supported")) { /* use nodetool / config table instead */ } else throw e; }

Prevention

When it happens

Trigger: An INSERT or UPDATE that sets any column (or sets one to null) on a virtual table whose class does not override applyColumnUpdate, dispatched via apply() -> applyColumnUpdate(partitionKey, clusteringColumns, Optional<ColumnValue>).

Common situations: Users try to tweak virtual-table metrics/settings via UPDATE but the specific table only implements full-row application (applyRowUpdate) or is entirely immutable; scripts ported from normal-table workflows to virtual tables.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/640e74ab7cc6b7bb. Report an issue: GitHub.

Appendix: source

Thrown at src/java/org/apache/cassandra/db/virtual/AbstractMutableVirtualTable.java:162

    {
        throw invalidRequest("Range deletion is not supported by table %s", metadata);
    }

    protected void applyRowDeletion(ColumnValues partitionKey, ColumnValues clusteringColumns)
    {
        throw invalidRequest("Row deletion is not supported by table %s", metadata);
    }

    protected void applyColumnDeletion(ColumnValues partitionKey, ColumnValues clusteringColumns, String columnName)
    {
        throw invalidRequest("Column deletion is not supported by table %s", metadata);
    }

    protected void applyColumnUpdate(ColumnValues partitionKey,
                                     ColumnValues clusteringColumns,
                                     Optional<ColumnValue> columnValue)
    {
        throw invalidRequest("Column modification is not supported by table %s", metadata);
    }

    private static String columnName(Cell<?> cell)
    {
        return cell.column().name.toCQLString();
    }

    /**
     * A set of partition key or clustering column values.
     */
    public static final class ColumnValues implements Comparable<ColumnValues>
    {
        /**
         * An empty set of column values.
         */
        private static final ColumnValues EMPTY = new ColumnValues(ImmutableList.of(), ArrayUtils.EMPTY_OBJECT_ARRAY);

        /**

View on GitHub (pinned to 88fd0f6a0e)