Lorenz Bühmann created JENA-1327:
------------------------------------

             Summary: HAVING clause accepts projected expression
                 Key: JENA-1327
                 URL: https://issues.apache.org/jira/browse/JENA-1327
             Project: Apache Jena
          Issue Type: Question
          Components: ARQ
    Affects Versions: Jena 3.2.0, Jena 3.1.1
            Reporter: Lorenz Bühmann
            Priority: Minor


I'm wondering whether the SPARQL parser is correct with accepting the following 
query:

{noformat}
PREFIX  dbo:  <http://purl.org/dc/elements/1.1/>

SELECT  (COUNT(?work) AS ?tw) ?author
WHERE
  { ?work  dbo:author  ?author }
GROUP BY ?author
HAVING ( ?tw > 3 )
{noformat}

According to the 
[specs|https://www.w3.org/TR/sparql11-query/#sparqlHavingClause], I would 
assume that this is not allowed and one has to use

{noformat}
PREFIX  dbo:  <http://purl.org/dc/elements/1.1/>

SELECT  (COUNT(?work) AS ?tw) ?author
WHERE
  { ?work  dbo:author  ?author }
GROUP BY ?author
HAVING ( COUNT(?tw) > 3 )
{noformat}

But as always, I might misunderstand the specs. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to