apache/cassandra · error · InvalidRequestException
Range deletion is not supported by table
Error message
Range deletion is not supported by table %s
What it means
AbstractMutableVirtualTable's default applyRangeTombstone throws this invalid-request error: deleting a clustering range within a partition is not supported unless the concrete virtual table overrides the method.
Solutions
- Delete fully-specified rows instead of ranges (applyRowDeletion may be supported).
- Enumerate the clustering keys and delete rows individually or with IN.
- If you implement the table, override applyRangeTombstone(ColumnValues, Range<ColumnValues>).
Defensive patterns
Strategy: try-catch
Try / catch
try {
session.execute(slicedDelete);
} catch (InvalidQueryException e) {
if (e.getMessage().contains("Range deletion is not supported")) {
// enumerate clustering keys and delete rows individually
}
} Prevention
- Replace '>'/'<' range DELETE predicates with explicit key lists or per-row deletes.
- Select the keys first and delete rows one by one when range deletes are unsupported.
- Consult the virtual table source/docs to see whether applyRangeTombstone is overridden.
When it happens
Trigger: Executing a DELETE with a clustering range condition, e.g. 'DELETE FROM <virtual_table> WHERE pk = ? AND ck > ? AND ck <= ?', which the coordinator translates into a range tombstone applied via applyRangeTombstone(ColumnValues, Range<ColumnValues>).
Common situations: Range-based cleanup of virtual-table rows; ORMs generating sliced DELETEs; interactive cqlsh sessions deleting ranges of metric-like rows.
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
- Range deletion is not supported by table
- Partition deletion is not supported by table
- Partition deletion is not supported by table
- Row deletion is not supported by table
- Row deletion is not supported by table
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/e2d8aa093ead81cb.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/db/virtual/AbstractMutableVirtualTable.java:145
return Range.downTo(ColumnValues.from(metadata(), startBound), boundType(startBound));
ColumnValues start = ColumnValues.from(metadata(), startBound);
BoundType startType = boundType(startBound);
ColumnValues end = ColumnValues.from(metadata(), endBound);
BoundType endType = boundType(endBound);
return Range.range(start, startType, end, endType);
}
private static BoundType boundType(ClusteringBound<?> bound)
{
return bound.isInclusive() ? BoundType.CLOSED : BoundType.OPEN;
}
protected void applyRangeTombstone(ColumnValues partitionKey, Range<ColumnValues> range)
{
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);
}View on GitHub (pinned to 88fd0f6a0e)