Re: ungrouped variables used in projections - Further implications?

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 UTC