apache/cassandra · error · InvalidRequestException
Argument ' ' cannot be frozen; remove frozen<> modifier from
Error message
Argument '%s' cannot be frozen; remove frozen<> modifier from '%s'
What it means
Thrown by DROP FUNCTION when one of the declared argument types uses the frozen<> modifier. Cassandra implicitly freezes UDT arguments in function signatures, so explicitly writing frozen<> is redundant and rejected to keep signatures canonical.
Solutions
- Remove the frozen<> modifier from the function argument type in the statement.
- If the argument is a UDT, declare the bare UDT name and rely on implicit freezing.
- Re-run the DROP FUNCTION statement with the corrected signature.
Example fix
// before DROP FUNCTION ks.my_fn (frozen<address>); // after DROP FUNCTION ks.my_fn (address);
Defensive patterns
Strategy: validation
Validate before calling
// reject before sending
for (String arg : args) if (arg.matches("frozen<.*>")) throw new IllegalArgumentException("remove frozen<> from function argument: " + arg); Type guard
boolean isExplicitlyFrozen(AbstractType<?> t) { return t instanceof FrozenType; } Try / catch
try { dropFunction(keyspace, args); } catch (InvalidRequestException e) { if (e.getMessage().contains("cannot be frozen")) { /* rewrite signature without frozen<> */ } else throw e; } Prevention
- Never write frozen<> in function/procedure argument lists
- Copy canonical signatures from DESCRIBE FUNCTION
- Remember UDT function args are implicitly frozen
When it happens
Trigger: Executing DROP FUNCTION whose target signature declares an argument as frozen<some_udt>; detected in apply() by filtering raw argument types with raw.isFrozen() && !raw.isImplicitlyFrozen().
Common situations: Copying a function signature from a frozen table column definition; older CQL examples predating implicit freezing of UDT arguments in function signatures.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- Function ' ' is still referenced by aggregates
- Function ' ' is still referenced by column masks in tables
- ACCESS TO DATACENTERS operations not supported by…
- Aggregate ' ' already exists
- Argument ' ' cannot be frozen; remove frozen<> modifier from
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/a4aaac62d7480d28.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/cql3/statements/schema/DropFunctionStatement.java:110
return schema;
throw ire("Function '%s' doesn't exist", name);
}
Collection<UserFunction> functions = keyspace.userFunctions.get(new FunctionName(keyspaceName, functionName));
if (functions.size() > 1 && !argumentsSpeficied)
{
throw ire("'DROP FUNCTION %s' matches multiple function definitions; " +
"specify the argument types by issuing a statement like " +
"'DROP FUNCTION %s (type, type, ...)'. You can use cqlsh " +
"'DESCRIBE FUNCTION %s' command to find all overloads",
functionName, functionName, functionName);
}
arguments.stream()
.filter(raw -> !raw.isImplicitlyFrozen() && raw.isFrozen())
.findFirst()
.ifPresent(t -> { throw ire("Argument '%s' cannot be frozen; remove frozen<> modifier from '%s'", t, t); });
List<AbstractType<?>> argumentTypes = prepareArgumentTypes(keyspace.types);
Predicate<UserFunction> filter = UserFunctions.Filter.UDF;
if (argumentsSpeficied)
filter = filter.and(f -> f.typesMatch(argumentTypes));
UserFunction function = functions.stream().filter(filter).findAny().orElse(null);
if (null == function)
{
if (ifExists)
return schema;
throw ire("Function '%s' doesn't exist", name);
}
String dependentAggregates =
keyspace.userFunctionsView on GitHub (pinned to 88fd0f6a0e)