- From: Jeremy J Carroll <jjc@syapse.com>
- Date: Thu, 2 Jul 2015 19:51:34 -0700
- To: Matthew Horridge <matthew.horridge@stanford.edu>
- Cc: public-sparql-dev@w3.org
- Message-Id: <ED16224C-A0A4-4CE7-AED6-CF2FDAE277DB@syapse.com>
Yes this text seems to be in tension with 11.4 http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#aggregateRestrictions <http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#aggregateRestrictions> In a query level which uses aggregates, only expressions consisting of aggregates and constants may be projected I guess it may be talking about the exception, the variables in the GROUP BY itself, which would be treated correctly by replacing with a SAMPLE() aggregation, since in each group the values of the group by variable are always the same, and SAMPLE of the multiset of values is just the value itself. Jeremy > On Jul 2, 2015, at 9:12 AM, Matthew Horridge <matthew.horridge@stanford.edu> wrote: > > Hi, > > I’ve been reading through the definition of SPARQL in the SPARQL 1.1. Query Language Document. In particular, section 18.2.4, which describes how to convert aggregate queries into the SPARQL algebra. > > The algorithm listed in 18.2.4.1, which I’ve pasted in below talks about “unaggregated variables”. However, there isn’t a definition for “unaggregated variable” in the spec, and it isn’t totally clear to me what an “unaggregated variable” is. If anyone could provide me with a precise definition for what an “unaggregated variable” is, and thus clarify this part of the spec, I would really appreciate it. > > Thanks a lot, > > Matthew > > > > > > For each (X AS Var) in SELECT, each HAVING(X), and each ORDER BY X in Q > For each unaggregated variable V in X > Replace V with Sample(V) > End > For each aggregate R(args ; scalarvals) now in X > # note scalarvals may be omitted, then it's equivalent to the empty set > Ai := Aggregation(args, R, scalarvals, G) > Replace R(...) with aggi in Q > i := i + 1 > End > End >
Received on Friday, 3 July 2015 02:52:08 UTC