W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > July to September 2010

Re: ungrouped variables used in projections - Further implications?

From: Steve Harris <steve.harris@garlik.com>
Date: Thu, 26 Aug 2010 10:18:37 +0100
Cc: Andy Seaborne <andy.seaborne@epimorphics.com>, SPARQL Working Group <public-rdf-dawg@w3.org>, Lee Feigenbaum <lee@thefigtrees.net>
Message-Id: <96DDC2B9-B9CF-40A4-90B9-4F8F7B35025F@garlik.com>
To: Axel Polleres <axel.polleres@deri.org>
On 2010-08-25, at 18:15, Axel Polleres wrote:
>> Personally, I'd be happy with forbidding the use variables of grouping
>> expressions:
>> 
>>  SELECT (1/(1-?o) AS ?o1) { ?s ?p ?o } GROUP BY (1/(1-?o)) # Forbiddable
>>  SELECT ?o WHERE { ?s ?p ?o } GROUP BY (1/(1-?o)) # Forbiddable
> 
> Without expressing any strong opinion here: This rules out the new test case agg08, or, resp., 
> turns it into a negativeSyntaxTest. I had assumed for the current version of agg08 that the 
> former would be allowed whereas the latter wouldn't. That's why I had "*or expressions*" in 
> my rewording proposal.
> 
> I assume what Andy means here (and which I think holds) is that we could forbid expressions 
> in Grouping alltogether, since they can be always emulated by subqueries, i.e. 
> 
>   SELECT (1/(1-?o) AS ?o1) { ?s ?p ?o } GROUP BY (1/(1-?o))
> 
> could be written without expression in the GROUP BY clause as:
> 
>   SELECT ?o1 { SELECT (1/(1-?o) AS ?o1) { ?s ?p ?o } } GROUP BY ?o1 } 
> 
> So, why not just doing just that and forbidding expressions in GROUP BY in the grammar already?

We already made a decision to do that I believe.

> 4) BTW, what about
>     SELECT * { ?s ?p ?o } GROUP BY ?s 
> Just to make sure everybody is on the same page here: is this also forbidden?

I seem to remember discussing that previously, but not the outcome. It looks confusing to me, certainly.

- 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 Thursday, 26 August 2010 09:19:13 GMT

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