{"record":{"id":"3df240f0e57917e4","repo":"apache/cassandra","slug":"the-s-operation-is-not-supported-between-s-and","errorCode":null,"errorMessage":"the '%s' operation is not supported between %s and %s","messagePattern":"the '(.+?)' operation is not supported between (.+?) and (.+?)","errorType":"validation","errorClass":"InvalidRequestException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/cql3/functions/FunctionResolver.java","lineNumber":160,"sourceCode":"                AssignmentTestable.TestResult r = matchAguments(keyspace, toTest, providedArgs, receiverKeyspace, receiverTable);\n                switch (r)\n                {\n                    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                    }","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/cql3/functions/FunctionResolver.java#L142-L178","documentation":"FunctionResolver.pickBestMatch(), reached from get(), throws this when no candidate overload matches the provided argument types and the requested name is a binary operation: it reports the operator and the two provided argument types. This is the operation-specific 'no matching signature' error.","triggerScenarios":"Binary operations between incompatible types, e.g. `intcol + textcol`, `datecol - doublecol`, `tscol * 2`, or comparisons like `WHERE uuidcol > 5` routed through operation resolution.","commonSituations":"Comparing a UUID/date column to a string/number literal in WHERE; mixing counter with float; filtering with typed literals that don't match the column type.","solutions":["Make the operand types compatible: wrap the literal in the proper type conversion function (e.g. toDate, toTimestamp) or use a correctly-typed literal","Compare only same-type values (uuid = uuidAsText removed; cast the literal client-side)","Check the column types with DESC TABLE and adjust the query operands to match","Restructure the query so the operation happens in application code on typed values"],"exampleFix":"// before\nSELECT * FROM t WHERE tscol > 5;\n// after\nSELECT * FROM t WHERE tscol > toTimestamp(now()); -- or a proper timestamp literal","handlingStrategy":"type-guard","validationCode":"if (typeof literal !== columnJsType) throw new Error(`literal type ${typeof literal} does not match column type for comparison`);","typeGuard":"const sameType = (a, b) => a.constructor === b.constructor;","tryCatchPattern":"try { rs = session.execute(q); } catch (InvalidRequestException e) { if (e.getMessage().includes('operation is not supported between')) { /* convert operands to matching types */ } else throw e; }","preventionTips":["Always use properly typed literals for column comparisons (driver-side typed parameters help)","Convert literals with native type functions (toTimestamp, toUuid-like patterns) rather than raw strings","DESC TABLE to know each column's type before writing WHERE predicates"],"tags":["cql","operations","type-mismatch","resolution"],"backgroundTag":"type-mismatch","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"}