{"record":{"id":"00e58b9db03671a3","repo":"hibernate/hibernate-orm","slug":"the-s-set-returning-function-was-not-registered","errorCode":null,"errorMessage":"The %s() set-returning function was not registered for the dialect","messagePattern":"The (.+?)\\(\\) set-returning function was not registered for the dialect","errorType":"exception","errorClass":"SemanticException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java","lineNumber":4566,"sourceCode":"\tprivate String toName(HqlParser.JpaNonstandardFunctionNameContext ctx) {\n\t\treturn ctx.STRING_LITERAL() == null\n\t\t\t\t? ctx.identifier().getText().toLowerCase()\n\t\t\t\t: unquoteStringLiteral( ctx.STRING_LITERAL().getText() ).toLowerCase();\n\t}\n\n\t@Override\n\tpublic SqmSetReturningFunction<?> visitSimpleSetReturningFunction(HqlParser.SimpleSetReturningFunctionContext ctx) {\n\t\tfinal String functionName = visitIdentifier( ctx.identifier() );\n\t\tfinal var argumentsContext = ctx.genericFunctionArguments();\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tfinal List<SqmTypedNode<?>> functionArguments =\n\t\t\t\targumentsContext == null\n\t\t\t\t\t\t? emptyList()\n\t\t\t\t\t\t: (List<SqmTypedNode<?>>) argumentsContext.accept(this);\n\n\t\tSqmSetReturningFunctionDescriptor functionTemplate = getSetReturningFunctionDescriptor( functionName );\n\t\tif ( functionTemplate == null ) {\n\t\t\tthrow new SemanticException(\n\t\t\t\t\t\"The %s() set-returning function was not registered for the dialect\".formatted( functionName ),\n\t\t\t\t\tquery\n\t\t\t);\n\t\t}\n\t\treturn functionTemplate.generateSqmExpression( functionArguments, queryEngine() );\n\t}\n\n\t@Override\n\tpublic SqmExpression<?> visitJpaNonstandardFunction(HqlParser.JpaNonstandardFunctionContext ctx) {\n\t\tfinal String functionName = toName( ctx.jpaNonstandardFunctionName() );\n\t\tfinal var argumentsContext = ctx.genericFunctionArguments();\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tfinal List<SqmTypedNode<?>> functionArguments =\n\t\t\t\targumentsContext == null\n\t\t\t\t\t\t? emptyList()\n\t\t\t\t\t\t: (List<SqmTypedNode<?>>) argumentsContext.accept(this);\n\n\t\tfinal var returnableType = returnType( ctx.castTarget() );","sourceCodeStart":4548,"sourceCodeEnd":4584,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java#L4548-L4584","documentation":"Error \"The %s() set-returning function was not registered for the dialect\" thrown in hibernate/hibernate-orm.","triggerScenarios":"A function is called in HQL that the configured SQL dialect does not register: The <value>() set-returning function was not registered for the dialect","commonSituations":"Using set-returning functions or listagg() on a dialect that does not support them, or a custom Dialect missing the function registration.","solutions":["The set-returning function is not registered in the current SQL dialect. Register the function via a FunctionContributor or dialect contribution, or use a function the dialect supports."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fad1729dce015f908198d57a8d80274a30f905a5","analyzedAt":"2026-08-22T04:13:57.527Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}