[ 
https://issues.apache.org/jira/browse/JENA-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andy Seaborne resolved JENA-1203.
---------------------------------
       Resolution: Fixed
    Fix Version/s: Jena 3.1.1

Not just GROUP BY usage - also varibables in BIND are now checked as for 
queries.

> projecting non grouped variable in subquery is incorrectly allowed
> ------------------------------------------------------------------
>
>                 Key: JENA-1203
>                 URL: https://issues.apache.org/jira/browse/JENA-1203
>             Project: Apache Jena
>          Issue Type: Bug
>         Environment: sparql.org's validator
>            Reporter: Joshua Taylor
>            Assignee: Andy Seaborne
>            Priority: Minor
>             Fix For: Jena 3.1.1
>
>
> Described in this Stack Overflow answer, 
> http://stackoverflow.com/a/38104783/1281433 :
> {code}
> SELECT ?sub ?pred ?obj (count(?obj) as ?count)
>     WHERE { ?sub ?pred ?obj .
>         } GROUP BY ?sub
> {code}
> is illegal, because there are non-grouped variables in the projection (?pred, 
> ?obj).  However, when this query appears as a subquery, no syntax error is 
> reported, as in:
> {code}
> DELETE { ?sub ?pred ?obj . } 
> WHERE {  
>     {SELECT ?sub ?pred ?obj (count(?obj) as ?count)
>     WHERE { ?sub ?pred ?obj .
>         } GROUP BY ?sub
>     } FILTER(?count < 14)
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to