This is an automated email from the ASF dual-hosted git repository.

afs pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/jena.git


The following commit(s) were added to refs/heads/main by this push:
     new a5a9b6823b Document SELECT * / GROUP / aggregate checks
a5a9b6823b is described below

commit a5a9b6823bd734bc1b99059fe20e1a8139b2cba3
Author: Andy Seaborne <[email protected]>
AuthorDate: Wed May 20 21:49:54 2026 +0100

    Document SELECT * / GROUP / aggregate checks
---
 .../src/main/java/org/apache/jena/sparql/lang/SyntaxVarScope.java   | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/jena-arq/src/main/java/org/apache/jena/sparql/lang/SyntaxVarScope.java 
b/jena-arq/src/main/java/org/apache/jena/sparql/lang/SyntaxVarScope.java
index 99370edb0d..0be26a5e34 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/lang/SyntaxVarScope.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/lang/SyntaxVarScope.java
@@ -88,7 +88,11 @@ public class SyntaxVarScope {
         checkExprListAssignment(scopeSelectClause, query.getProject());
 
         // Check for SELECT * GROUP BY
-        // Legal in ARQ, not in SPARQL 1.1, 1.2
+        //   - not legal in SPARQL 1.1
+        // Check for SELECT * aggregator (e.g. SELECT * {} HAVING (count(*)>0) 
)
+        //   - not legal in SPARQL 1.2, unclear in SPARQL 1.1
+        // Legal in ARQ
+        //   Query.hasGroupBy() includes a check of aggregators
         if ( !Syntax.syntaxARQ.equals(query.getSyntax()) ) {
             if ( query.isQueryResultStar() && query.hasGroupBy() )
                 throw new QueryParseException("SELECT * not legal with GROUP 
BY", -1, -1);

Reply via email to