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

Andy Seaborne commented on JENA-803:
------------------------------------

{{DISTINCT}} can be added in the {{AGG}} case. Style-wise, I agree with you 
that different URIs is better but there is not reason why the syntax and 
execution requires no {{DISTINCT}}.

There is a related case - custom aggregation without {{AGG}}. 

{code}
  SELECT (<aggFunction>(?x) AS ?A) 
{code}

When a custom aggregate URI is used in what looks like a function call, it is 
distinguished by looking in the aggregate registry, then {{DISTINCT}} can't be 
added. This is strict SPARQL 1.1 syntax.

In that case, {{DISTINCT}} is not allowed - it would open up syntax forms like:
{code}
  FILTER (<function>(DISTINCT ?x))
{code}

when function forms are used where aggregate are not allowed without (1) 
changes to the strict SPARQL 1.1 compliance and (2) context sensitive parsing 
based on the registry.

If that case, no {{DISTINCT}} for function call, is acceptable even when 
{{AGG}} accepts {{DISTINCT}} then it can be added. We could also make the 
function form generate a parsing error.

For grammar changes, I'd like to coordinate with the CONSTRUCT-quads work 
(JENA-491).


> Custom aggregates in SPARQL.
> ----------------------------
>
>                 Key: JENA-803
>                 URL: https://issues.apache.org/jira/browse/JENA-803
>             Project: Apache Jena
>          Issue Type: New Feature
>          Components: ARQ
>    Affects Versions: Jena 2.12.1
>            Reporter: Andy Seaborne
>            Assignee: Andy Seaborne
>             Fix For: Jena 2.13.0
>
>
> Support SPARQL custom aggregates.



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

Reply via email to