[ 
https://issues.apache.org/jira/browse/JENA-963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14589519#comment-14589519
 ] 

Andy Seaborne commented on JENA-963:
------------------------------------

These are the different cases:

_Case 1_
{noformat}
SELECT ?s { ?s ?p ?o } GROUP BY ?s
{noformat}
select => project-group

_Case 2_
{noformat}
SELECT (count(?p) as ?cp) { ?s ?p ?o } GROUP BY ?s
{noformat}
select/aggregate => project-extend-group

_Case 3_
{noformat}
SELECT ?s { ?s ?p ?o } GROUP BY ?s HAVING (count(*) > 1 )
{noformat}
select/having+aggregate => project-filter-group

_Case 4_
{noformat}
SELECT ?s { ?s ?p ?o } GROUP BY ?s HAVING (?s > 1 )
{noformat}
select/having-expression => project-filter-group

_Case 5_
{noformat}
SELECT (count(?p) as ?cp) { ?s ?p ?o } GROUP BY ?s HAVING (?cp > 1 )
{noformat}
select/aggregate/having => project-filter-extend-group

An approach is to classifiy at the point {{(project)}} is seen.  
Programmtically match {{project filter? extend? group}}, then process a group 
specially to extract the parts that go into the {{Query}} object.

Related: make clear that the OpAsQuery.Converter works on one query level.


> OpAsQuery does not process HAVING (COUNT(?value) > 1) correctly.
> ----------------------------------------------------------------
>
>                 Key: JENA-963
>                 URL: https://issues.apache.org/jira/browse/JENA-963
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: ARQ
>    Affects Versions: Jena 3.0.0
>            Reporter: Andy Seaborne
>         Attachments: Jena963_OpAsQuery.java, ReportOpAsQuery.java
>
>
> Reported: 
> http://mail-archives.apache.org/mod_mbox/jena-users/201506.mbox/%3CCA%2BEd63nzgDA_bShyhQvukED%2BPTiPxSAggo2VmD30J8ZwHr6vUA%40mail.gmail.com%3E



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

Reply via email to