{"record":{"id":"1572ecdccbd0398e","repo":"prestodb/presto","slug":"function-implementation-missing-1572ec","errorCode":"FUNCTION_IMPLEMENTATION_MISSING","errorMessage":"Unsupported type parameters (%s) for %s","messagePattern":"Unsupported type parameters \\((.+?)\\) for (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-main-base/src/main/java/com/facebook/presto/operator/aggregation/ParametricAggregation.java","lineNumber":171,"sourceCode":"    private AggregationImplementation findMatchingImplementation(Signature boundSignature, BoundVariables variables, FunctionAndTypeManager functionAndTypeManager)\n    {\n        Optional<AggregationImplementation> foundImplementation = Optional.empty();\n        if (implementations.getExactImplementations().containsKey(boundSignature)) {\n            foundImplementation = Optional.of(implementations.getExactImplementations().get(boundSignature));\n        }\n        else {\n            for (AggregationImplementation candidate : implementations.getGenericImplementations()) {\n                if (candidate.areTypesAssignable(boundSignature, variables, functionAndTypeManager)) {\n                    if (foundImplementation.isPresent()) {\n                        throw new PrestoException(AMBIGUOUS_FUNCTION_CALL, format(\"Ambiguous function call (%s) for %s\", variables, getSignature()));\n                    }\n                    foundImplementation = Optional.of(candidate);\n                }\n            }\n        }\n\n        if (!foundImplementation.isPresent()) {\n            throw new PrestoException(FUNCTION_IMPLEMENTATION_MISSING, format(\"Unsupported type parameters (%s) for %s\", variables, getSignature()));\n        }\n        return foundImplementation.get();\n    }\n\n    private static AccumulatorStateSerializer<?> getAccumulatorStateSerializer(AggregationImplementation implementation, BoundVariables variables, FunctionAndTypeManager functionAndTypeManager, Class<?> stateClass, DynamicClassLoader classLoader)\n    {\n        AccumulatorStateSerializer<?> stateSerializer;\n        Optional<MethodHandle> stateSerializerFactory = implementation.getStateSerializerFactory();\n        if (stateSerializerFactory.isPresent()) {\n            try {\n                MethodHandle factoryHandle = bindDependencies(stateSerializerFactory.get(), implementation.getStateSerializerFactoryDependencies(), variables, functionAndTypeManager);\n                stateSerializer = (AccumulatorStateSerializer<?>) factoryHandle.invoke();\n            }\n            catch (Throwable t) {\n                throwIfUnchecked(t);\n                throw new RuntimeException(t);\n            }\n        }","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-main-base/src/main/java/com/facebook/presto/operator/aggregation/ParametricAggregation.java#L153-L189","documentation":"Specialization failure in ParametricAggregation.findMatchingImplementation: no exact implementation exists for the bound signature and no generic implementation's type constraints accept the given type parameters, so the aggregation cannot be compiled for these arguments.","triggerScenarios":"Thrown at presto-main-base/src/main/java/com/facebook/presto/operator/aggregation/ParametricAggregation.java:171 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Cast the arguments to types the aggregation declares support for","Check the function's documented signatures for accepted type parameters","Use a different aggregation that supports the desired argument types"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}