W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > April to June 2011

Re: Draft response to GK-1

From: Steve Harris <steve.harris@garlik.com>
Date: Tue, 19 Apr 2011 23:22:27 +0100
Cc: public-rdf-dawg@w3.org
Message-Id: <0323A90A-A049-4576-947A-79E60AABAA5E@garlik.com>
To: Andy Seaborne <andy.seaborne@epimorphics.com>
On 2011-04-19, at 21:50, Andy Seaborne wrote:
> 
> 
> On 19/04/11 21:34, Steve Harris wrote:
>> Ping?
>> 
>> - Steve
> 
> [[
> > Also, I can't find any indication of the interaction between GROUP BY and ORDER
> > BY, where the ORDER BY specifies a variable not named in the GROUP BY: is this
> > allowed? If so, what effect does it have (e.g. on GROUP_CONCAT)?
> 
> Aggregate operations are performed on a multiset, so order is not preserved. We have added an ISSUE [1] about whether or not to allow order for aggregates, which we will address if time allows it before going to last call. However, since we are on a tight schedule, we might have to move this feature for a future working group.
> ]]
> 
> Suggest adding:
> """
> ORDER BY after a GROUP BY must only use variables exposed by the GROUP.  Use of non-grouping variable outside the GROUP BY is not legal and a required syntax error.
> """
> 
> For example:
> 
> SELECT ?book ?title
> WHERE
>   { ?book dc:title ?title }
> GROUP BY ?book
> ORDER BY ?title
> 
> ==> error.

Good suggestion, thanks.

- Steve

-- 
Steve Harris, CTO, Garlik Limited
1-3 Halford Road, Richmond, TW10 6AW, UK
+44 20 8439 8203  http://www.garlik.com/
Registered in England and Wales 535 7233 VAT # 849 0517 11
Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10 9AD
Received on Tuesday, 19 April 2011 22:23:03 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:46 GMT