- From: Andy Seaborne <andy.seaborne@epimorphics.com>
- Date: Thu, 07 Oct 2010 14:09:40 +0100
- To: Axel Polleres <axel.polleres@deri.org>
- CC: Steve Harris <steve.harris@garlik.com>, SPARQL Working Group <public-rdf-dawg@w3.org>
http://lists.w3.org/Archives/Public/public-rdf-dawg/2010OctDec/0002.html has a proposed clarification for this. >> ListEval(undefined) = error. [[ Definition: ListEval ListEval(ExprList, μ) returns a list E, where Ei = μ(ExprListi) _or error_. _ListEval retains errors in evaluation of the list elements._ A variant, ListEvalE, is the same except that all elements of E which are errors are removed. ]] It's useful to be able to "group by" bound/error. It's very unhelpful to have a query abort just because of the data. I don't know how that would work with the protocol. Andy On 07/10/10 13:51, Axel Polleres wrote: > > 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 13:10:26 UTC