{"record":{"id":"4b2d8386151784fe","repo":"hibernate/hibernate-orm","slug":"summarization-is-not-supported-by-dbms-4b2d83","errorCode":null,"errorMessage":"Summarization is not supported by DBMS","messagePattern":"Summarization is not supported by DBMS","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/dialect/sql/ast/CockroachSqlAstTranslator.java","lineNumber":207,"sourceCode":"\t}\n\n\t@Override\n\tpublic void visitOffsetFetchClause(QueryPart queryPart) {\n\t\tif ( !isRowNumberingCurrentQueryPart() ) {\n\t\t\trenderLimitOffsetClause( queryPart );\n\t\t}\n\t}\n\n\t@Override\n\tprotected void renderPartitionItem(Expression expression) {\n\t\tif ( expression instanceof Literal ) {\n\t\t\tappendSql( \"'0' || '0'\" );\n\t\t}\n\t\telse if ( expression instanceof Summarization ) {\n\t\t\t// This could theoretically be emulated by rendering all grouping variations of the query and\n\t\t\t// connect them via union all but that's probably pretty inefficient and would have to happen\n\t\t\t// on the query spec level\n\t\t\tthrow new UnsupportedOperationException( \"Summarization is not supported by DBMS\" );\n\t\t}\n\t\telse {\n\t\t\texpression.accept( this );\n\t\t}\n\t}\n\n\t@Override\n\tpublic void visitLikePredicate(LikePredicate likePredicate) {\n\t\t// Custom implementation because CockroachDB uses backslash as default escape character\n\t\tlikePredicate.getMatchExpression().accept( this );\n\t\tif ( likePredicate.isNegated() ) {\n\t\t\tappendSql( \" not\" );\n\t\t}\n\t\tif ( likePredicate.isCaseSensitive() ) {\n\t\t\tappendSql( \" like \" );\n\t\t}\n\t\telse {\n\t\t\tappendSql( WHITESPACE );","sourceCodeStart":189,"sourceCodeEnd":225,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/dialect/sql/ast/CockroachSqlAstTranslator.java#L189-L225","documentation":"Error \"Summarization is not supported by DBMS\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Thrown at hibernate-core/src/main/java/org/hibernate/dialect/sql/ast/CockroachSqlAstTranslator.java:207 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Do not use the summarize query construct on CockroachDB; perform aggregation manually with group by queries"],"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"}