{"record":{"id":"640e74ab7cc6b7bb","repo":"apache/cassandra","slug":"column-modification-is-not-supported-by-table-s-640e74","errorCode":null,"errorMessage":"Column modification is not supported by table %s","messagePattern":"Column modification is not supported by table (.+?)","errorType":"exception","errorClass":"InvalidRequestException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/db/virtual/AbstractMutableVirtualTable.java","lineNumber":162,"sourceCode":"    {\n        throw invalidRequest(\"Range deletion is not supported by table %s\", metadata);\n    }\n\n    protected void applyRowDeletion(ColumnValues partitionKey, ColumnValues clusteringColumns)\n    {\n        throw invalidRequest(\"Row deletion is not supported by table %s\", metadata);\n    }\n\n    protected void applyColumnDeletion(ColumnValues partitionKey, ColumnValues clusteringColumns, String columnName)\n    {\n        throw invalidRequest(\"Column deletion is not supported by table %s\", metadata);\n    }\n\n    protected void applyColumnUpdate(ColumnValues partitionKey,\n                                     ColumnValues clusteringColumns,\n                                     Optional<ColumnValue> columnValue)\n    {\n        throw invalidRequest(\"Column modification is not supported by table %s\", metadata);\n    }\n\n    private static String columnName(Cell<?> cell)\n    {\n        return cell.column().name.toCQLString();\n    }\n\n    /**\n     * A set of partition key or clustering column values.\n     */\n    public static final class ColumnValues implements Comparable<ColumnValues>\n    {\n        /**\n         * An empty set of column values.\n         */\n        private static final ColumnValues EMPTY = new ColumnValues(ImmutableList.of(), ArrayUtils.EMPTY_OBJECT_ARRAY);\n\n        /**","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/db/virtual/AbstractMutableVirtualTable.java#L144-L180","documentation":"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.","triggerScenarios":"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>).","commonSituations":"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.","solutions":["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.","Remove the UPDATE/INSERT if the table is intended read-only.","If you own the virtual table, override applyColumnUpdate to implement the write.","Verify which mutations the table supports before writing (check its class or DESCRIBE output)."],"exampleFix":"// before\nUPDATE system_views.sstable_tasks SET status = 'done' WHERE task_id = ...; // rejected\n// after\n-- use the supported API, e.g. nodetool or the dedicated settings table:\nUPDATE system.config SET value = 'true' WHERE key = 'some_setting';","handlingStrategy":"validation","validationCode":"// Only issue UPDATE/INSERT against virtual tables known to override applyColumnUpdate\nboolean writable = tableClass != null && !AbstractMutableVirtualTable.class.getDeclaredMethod(\"applyColumnUpdate\", ...)\n    .getDeclaringClass().equals(tableClass);","typeGuard":null,"tryCatchPattern":"try { session.execute(updateStmt); }\ncatch (InvalidRequestException e) { if (e.getMessage().contains(\"Column modification is not supported\")) { /* use nodetool / config table instead */ } else throw e; }","preventionTips":["Treat virtual tables as read-only unless documented writable.","Use nodetool or the system config keyspace for runtime settings changes.","When implementing virtual tables, override applyColumnUpdate if writes should be allowed."],"tags":["virtual-table","invalid-request","unsupported-update"],"backgroundTag":"unsupported-operation","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}