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:48:11 +0100
Cc: Lee Feigenbaum <lee@thefigtrees.net>, SPARQL Working Group <public-rdf-dawg@w3.org>
Message-Id: <E2692ACA-60B8-40A0-A8A1-9A77E3EBC527@garlik.com>
To: Axel Polleres <axel.polleres@deri.org>
[sorry, just found this mail sitting on my desktop, must have forgotten to send it]

On 2010-08-25, at 13:33, Axel Polleres wrote:

> The more I think about this, I am afraid there are possibly further implications 
> of this discussion...
> This is the current text:
> "In aggregate queries and sub-queries variables that appear in the query
> pattern, but are not grouped by cannot be projected nor used in project
> expressions. In order to project arbitrary expressions the SAMPLE
> aggregate may be used."
> I am afraid it is still potentially not totally clear:
> 1) in principle this forbids 
> WHERE { ?S :p ?O1; :q ?O2 } GROUP BY (?O1 + ?O2)
> (currently this is reflected within testcase agg08)
> I am not sure we intended to forbid this?

Yeah, that's caused by the addition of the "... nor used in project expressions" text.

it needs to say something like "... project expressions, other than as expressions passed to aggregates". That's just getting more complex though. I will add some examples of what's ok and not, later today.

> 2) 
> ACTION-209 reflects our understanding that we shouldn't allow projected variables being reused 
> in HAVING clauses.  Now how about non-grouped variables and expressions in HAVING clauses?

That should have the same restriction.

- 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:48:46 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:01:01 UTC