Re: Aggregates question...

On 7 Oct 2010, at 05:34, Steve Harris wrote:

> 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 μ(?var) undefined?
> 
> ListEval(undefined) = error.

As far as I read it, this is not entirely clear from the current definition of ListEval...
ListEval takes an ExpressionList as input... ?Q is an expression list, 
if ?Q is not in the domain of &mu, it is not clear for me that 
μ(?Q) = error, it could likewise just be μ(?Q) = ?Q, or no?
At least I don't think it's clear from the current definition.

best,
Axel


> 
> > It seems, strictly following the definition μ(?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 12:51:58 UTC