hibernate/hibernate-orm · error · UnsupportedOperationException
SingleStore doesn't support ALL clause
Error message
SingleStore doesn't support ALL clause
What it means
SingleStoreSqlAstTranslator.visitEvery() throws UnsupportedOperationException during SQL rendering because SingleStore does not support the ALL quantifier that EVERY maps to (the message says ALL clause). When Hibernate's semantic model contains an Every node - HQL 'x = all(select ...)', 'x <> all(select ...)' and similar - translation aborts before any SQL is sent. Note this covers quantified comparisons, not the every() aggregate over a group.
Source
Thrown at hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/SingleStoreSqlAstTranslator.java:227
// Check if current query part is already row numbering to avoid infinite recursion
return useOffsetFetchClause(
queryPart ) && getQueryPartForRowNumbering() != queryPart && supportsWindowFunctions() && !isRowsOnlyFetchClauseType(
queryPart );
}
@Override
protected boolean shouldEmulateLateralWithIntersect(QueryPart queryPart) {
return getDialect().supportsSimpleQueryGrouping() || !queryPart.hasOffsetOrFetchClause();
}
@Override
public void visitAny(Any any) {
throw new UnsupportedOperationException( "SingleStore doesn't support ANY clause" );
}
@Override
public void visitEvery(Every every) {
throw new UnsupportedOperationException( "SingleStore doesn't support ALL clause" );
}
@Override
public void visitQueryGroup(QueryGroup queryGroup) {
if ( shouldEmulateFetchClause( queryGroup ) ) {
emulateFetchOffsetWithWindowFunctions( queryGroup, true );
}
else {
super.visitQueryGroup( queryGroup );
}
}
@Override
public void visitQuerySpec(QuerySpec querySpec) {
if ( shouldEmulateFetchClause( querySpec ) ) {
emulateFetchOffsetWithWindowFunctions( querySpec, true );
}
else {View on GitHub (pinned to fad1729dce)
Solutions
- Rewrite 'x < all(sub)' as 'x < (select min(s) from sub)' and 'x > all(sub)' as 'x > (select max(s) from sub)'
- Rewrite 'x <> all(sub)' as 'not exists (select 1 from sub where s = x)'
- Rewrite 'x = all(sub)' as 'x = (select min(s) from sub) and x = (select max(s) from sub)' when the subquery is narrow
Example fix
// before select o from Order o where o.code <> all(select c.code from Coupon c) // after select o from Order o where not exists (select 1 from Coupon c where c.code = o.code)
Defensive patterns
Strategy: validation
Validate before calling
static boolean usesAllQuantifier(String hql) {
String lower = hql.toLowerCase();
return lower.contains(' all(') || lower.contains('=all(') || lower.contains('<>all(');
}
if (dialect instanceof SingleStoreDialect && usesAllQuantifier(hql)) {
throw new UnsupportedOperationException(
'SingleStore does not support ALL; rewrite as min/max or not-exists');
} Prevention
- Rewrite '<> all(...)' as 'not exists (...)' for portable exclusion semantics
- Use min/max scalar subqueries for <all/>all comparisons
- Keep quantifier usage out of shared query libraries unless every target DB supports it
When it happens
Trigger: Executing HQL such as 'select o from Order o where o.code <> all(select c.code from Coupon c)' or 'where o.total <= all(select b.cap from Budget b)' on SingleStore; criteria equivalents built with every()/all comparisons.
Common situations: Porting from databases where '= all' / '<> all' are idiomatic; shared repository abstractions that render quantified predicates uniformly; dynamic query builders that choose all() for exclusion semantics.
Related errors
- SingleStore doesn't support ANY clause
- SingleStore doesn't support UNION/UNION ALL with limit claus
- Insert conflict 'do update' clause with constraint name is n
- Insert conflict 'do update' clause with constraint name is n
- field type not supported on Derby: " + unit
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/f360696a58b003fa.
Report an issue: GitHub.