{"record":{"id":"ff3f6da5c086958d","repo":"apache/cassandra","slug":"invalid-call-to-function-s-none-of-its-type-sign","errorCode":null,"errorMessage":"Invalid call to function %s, none of its type signatures match (known type signatures: %s)","messagePattern":"Invalid call to function (.+?), none of its type signatures match \\(known type signatures: (.+?)\\)","errorType":"validation","errorClass":"InvalidRequestException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/cql3/functions/FunctionResolver.java","lineNumber":163,"sourceCode":"                    case EXACT_MATCH:\n                        // We always favor exact matches\n                        return toTest;\n                    case WEAKLY_ASSIGNABLE:\n                        if (compatibles == null)\n                            compatibles = new ArrayList<>();\n                        compatibles.add(toTest);\n                        break;\n                }\n            }\n        }\n\n        if (compatibles == null)\n        {\n            if (OperationFcts.isOperation(name))\n                throw invalidRequest(\"the '%s' operation is not supported between %s and %s\",\n                                     OperationFcts.getOperator(name), providedArgs.get(0), providedArgs.get(1));\n\n            throw invalidRequest(\"Invalid call to function %s, none of its type signatures match (known type signatures: %s)\",\n                                 name, format(candidates));\n        }\n\n        if (compatibles.size() > 1)\n        {\n            if (OperationFcts.isOperation(name))\n            {\n                if (receiverType != null && !containsMarkers(providedArgs))\n                {\n                    for (Function toTest : compatibles)\n                    {\n                        List<AbstractType<?>> argTypes = toTest.argTypes();\n                        if (receiverType.equals(argTypes.get(0)) && receiverType.equals(argTypes.get(1)))\n                            return toTest;\n                    }\n                }\n                throw invalidRequest(\"Ambiguous '%s' operation with args %s and %s: use type hint to disambiguate, example '(int) ?'\",\n                                     OperationFcts.getOperator(name), providedArgs.get(0), providedArgs.get(1));","sourceCodeStart":145,"sourceCodeEnd":181,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/cql3/functions/FunctionResolver.java#L145-L181","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Check the known signatures listed in the error and cast arguments to a matching type, e.g. SELECT abs((int) somevarint_col) FROM t","Verify the argument order and arity against the function's declared signature (DESCRIBE FUNCTIONS / system_schema.functions for UDFs)","For UDFs, recreate the function with the parameter types actually passed at call time","If it's an operator between mismatched types (e.g. int + text), cast both operands to the same type"],"exampleFix":"// before: no signature matches\ndatastax session.execute(\"SELECT max(name, 5) FROM users\");\n// after: cast args to a matching signature\ndatastax session.execute(\"SELECT max(name, '5') FROM users\");","handlingStrategy":"validation","validationCode":"const knownSigs = { token: ['any...'], now: [], uuid: [], max: ['same,same'] };\nfunction checkFunctionCall(fn, argTypes) {\n  if (!(fn in knownSigs)) throw new Error(`unknown function ${fn}`);\n  console.log(`validate ${fn}(${argTypes.join(',')}) against documented signatures before executing`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Cast arguments explicitly whenever column types are not obvious","Keep a test suite that executes every CQL function call pattern you use against a local cluster","Check system_schema.functions signatures before calling UDFs"],"tags":["cql","function-resolution","type-mismatch"],"backgroundTag":"invalid-argument","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}