{"record":{"id":"62b1647a7a869162","repo":"apache/cassandra","slug":"row-deletion-is-not-supported-by-table-s-62b164","errorCode":null,"errorMessage":"Row deletion is not supported by table %s","messagePattern":"Row deletion is not supported by table (.+?)","errorType":"exception","errorClass":"InvalidRequestException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/db/virtual/AbstractMutableVirtualTable.java","lineNumber":150,"sourceCode":"        ColumnValues end = ColumnValues.from(metadata(), endBound);\n        BoundType endType = boundType(endBound);\n\n        return Range.range(start, startType, end, endType);\n    }\n\n    private static BoundType boundType(ClusteringBound<?> bound)\n    {\n        return bound.isInclusive() ? BoundType.CLOSED : BoundType.OPEN;\n    }\n\n    protected void applyRangeTombstone(ColumnValues partitionKey, Range<ColumnValues> range)\n    {\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    }","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/db/virtual/AbstractMutableVirtualTable.java#L132-L168","documentation":"AbstractMutableVirtualTable's default applyRowDeletion throws this invalid-request error: single-row DELETEs are not supported unless the concrete virtual table overrides this method. Related defaults also reject column deletion (applyColumnDeletion).","triggerScenarios":"Executing 'DELETE FROM <virtual_table> WHERE <partition key> AND <clustering key>' against a virtual table extending AbstractMutableVirtualTable that has not overridden applyRowDeletion(ColumnValues, ColumnValues).","commonSituations":"Users deleting individual rows from virtual tables that look writable; automated jobs pruning virtual-table entries; attempting to remove entries such as failed-endpoint or sstable-task rows.","solutions":["Consult the virtual table's documentation to confirm which mutations it permits.","Operate on the underlying state (via nodetool or the appropriate API) instead of DELETE.","If you implement the table, override applyRowDeletion(ColumnValues, ColumnValues) to support row deletes."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    session.execute(\"DELETE FROM some_virtual_table WHERE pk = ? AND ck = ?\", pk, ck);\n} catch (InvalidQueryException e) {\n    if (e.getMessage().contains(\"Row deletion is not supported\")) {\n        // use nodetool/admin API to remove the underlying entry instead\n    }\n}","preventionTips":["Check whether the specific virtual table supports deletes before scripting cleanup.","Clear the underlying runtime state (endpoints, tasks, metrics) at its source.","Never assume DELETE works on a table just because it appears in system_views/system."],"tags":["virtual-tables","cql","delete"],"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"}