apache/cassandra · error · InvalidRequestException

Invalid call to function %s, none of its type signatures mat

Error message

Invalid call to function %s, none of its type signatures match (known type signatures: %s)

What it means

FunctionResolver is Cassandra's overload-resolution engine for CQL functions. When a function call is made, it collects candidate signatures (candidates) and tries to pick one compatible with the provided argument types. If none of the known type signatures match the provided arguments, and the function is not an operator (operators get a more specific message), it throws this InvalidRequestException naming the function and listing all known signatures.

Source

Thrown at src/java/org/apache/cassandra/cql3/functions/FunctionResolver.java:163

                    case EXACT_MATCH:
                        // We always favor exact matches
                        return toTest;
                    case WEAKLY_ASSIGNABLE:
                        if (compatibles == null)
                            compatibles = new ArrayList<>();
                        compatibles.add(toTest);
                        break;
                }
            }
        }

        if (compatibles == null)
        {
            if (OperationFcts.isOperation(name))
                throw invalidRequest("the '%s' operation is not supported between %s and %s",
                                     OperationFcts.getOperator(name), providedArgs.get(0), providedArgs.get(1));

            throw invalidRequest("Invalid call to function %s, none of its type signatures match (known type signatures: %s)",
                                 name, format(candidates));
        }

        if (compatibles.size() > 1)
        {
            if (OperationFcts.isOperation(name))
            {
                if (receiverType != null && !containsMarkers(providedArgs))
                {
                    for (Function toTest : compatibles)
                    {
                        List<AbstractType<?>> argTypes = toTest.argTypes();
                        if (receiverType.equals(argTypes.get(0)) && receiverType.equals(argTypes.get(1)))
                            return toTest;
                    }
                }
                throw invalidRequest("Ambiguous '%s' operation with args %s and %s: use type hint to disambiguate, example '(int) ?'",
                                     OperationFcts.getOperator(name), providedArgs.get(0), providedArgs.get(1));

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Check the known signatures listed in the error and cast arguments to a matching type, e.g. SELECT abs((int) somevarint_col) FROM t
  2. Verify the argument order and arity against the function's declared signature (DESCRIBE FUNCTIONS / system_schema.functions for UDFs)
  3. For UDFs, recreate the function with the parameter types actually passed at call time
  4. If it's an operator between mismatched types (e.g. int + text), cast both operands to the same type

Example fix

// before: no signature matches
datastax session.execute("SELECT max(name, 5) FROM users");
// after: cast args to a matching signature
datastax session.execute("SELECT max(name, '5') FROM users");
Defensive patterns

Strategy: validation

Validate before calling

const knownSigs = { token: ['any...'], now: [], uuid: [], max: ['same,same'] };
function checkFunctionCall(fn, argTypes) {
  if (!(fn in knownSigs)) throw new Error(`unknown function ${fn}`);
  console.log(`validate ${fn}(${argTypes.join(',')}) against documented signatures before executing`);
}

Prevention

When it happens

Trigger: Executing CQL like SELECT now(1) or calling any native/user-defined function with argument types that match no declared overload, e.g. token('abc', 5) with wrong arity/types, max(text_col, 3), or a UDF call whose signature doesn't accept the supplied column types.

Common situations: Typos in argument order; passing a string where a numeric overload expects a number (e.g. abs('5')); calling a UDF created with different parameter types than used at call time; upgrades where an overload was removed; confusion between blob/text/uuid literals.

Understand the failure class

Background: "must be a positive integer", "cannot be empty", "invalid argument": how invalid-argument errors work across open-source libraries — this error's family across 33 libraries.

Related errors


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