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

Re: Aggregates question...

From: Steve Harris <steve.harris@garlik.com>
Date: Thu, 7 Oct 2010 10:34:48 +0100
Cc: SPARQL Working Group <public-rdf-dawg@w3.org>
Message-Id: <8EE9453A-6D3A-4333-B998-4567E33110EB@garlik.com>
To: Axel Polleres <axel.polleres@deri.org>
On 2010-10-07, at 02:31, Axel Polleres wrote:

> What happens when grouping for UNBOUND variables?
> 
> E.g. 
> 
> Graph:
> :s1 :p :o1.
> :s1 :p :o2.
> :s1 :q :o3.
> :s2 :p :o1.
> :s2 :p :o2.
> 
> Query:
> 
>  SELECT ?Q (COUNT(?P) as ?CP)
>  WHERE { ?S :p ?P  OPTIONAL {?S :q ?Q } }
>  GROUP BY ?Q
> 
> My current understanding is:
> 
>  that this returns 
> 
>   ?Q | ?CP
>  =========
>  :o3 | 2

That's correct. It could be made clearer in the text though.

> rather than
> 
>   ?Q | ?CP
>  =========
>  :o3 | 2
>      | 2
> 
> yes?
> 
> 
> In general, what is unclear to me is what ListEval returns when for ExprList = ?var and &mu;(?var) undefined?

ListEval(undefined) = error.

> It seems, strictly following the definition &mu;(?var) would then just amount to ?var , then again, I don't know what that 
> should mean for the rest of the aggregation semantics? 

I'm not sure I understand.

- 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, 7 October 2010 09:35:22 GMT

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