{"record":{"id":"4d4fa5563b9464f0","repo":"hibernate/hibernate-orm","slug":"summarization-is-not-supported-by-dbms-4d4fa5","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/H2SqlAstTranslator.java","lineNumber":299,"sourceCode":"\t\tif ( renderAsArray ) {\n\t\t\tappend( OPEN_PARENTHESIS );\n\t\t}\n\t\tsuper.visitSqlSelections( selectClause );\n\t\tif ( renderAsArray ) {\n\t\t\tappend( CLOSE_PARENTHESIS );\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 visitBinaryArithmeticExpression(BinaryArithmeticExpression arithmeticExpression) {\n\t\tappendSql( OPEN_PARENTHESIS );\n\t\tvisitArithmeticOperand( arithmeticExpression.getLeftHandOperand() );\n\t\tappendSql( arithmeticExpression.getOperator().getOperatorSqlTextString() );\n\t\tvisitArithmeticOperand( arithmeticExpression.getRightHandOperand() );\n\t\tappendSql( CLOSE_PARENTHESIS );\n\t}\n\n\t@Override\n\tprotected void visitArithmeticOperand(Expression expression) {\n\t\trender( expression, SqlAstNodeRenderingMode.NO_PLAIN_PARAMETER );","sourceCodeStart":281,"sourceCodeEnd":317,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/dialect/sql/ast/H2SqlAstTranslator.java#L281-L317","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/H2SqlAstTranslator.java:299 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Do not use the summarize construct on H2; compute summaries with ordinary aggregation 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"}