Re: "Unbound" in SPARQL

On 17 Nov 2009, at 14:32, Andy Seaborne wrote:

> We're mixing several things here:
>
> 1/ What happens with AS in SELECT when the expression evaluates to  
> an error.
> 2/ What happens for aggregates of empty groups.
> 3/ What happens with errors in the expression being aggregated.

True.

> Another design to consider, is (case 1) that
>
>  error AS ?x
>
> leaves ?x unbound and (2) aggregates of empty sets are errors.
>
> We then have what aggregates do about errors in their aggregate  
> expression (case 3).  Skip or error.  I prefer skip because I want  
> SUM(xsd:integer(?x)) to return something.

That more-or-less matches what MySQL does in this case, though it  
issues warnings when you have dodgy casts. SPARQL (and SQL as far as I  
know) has no concept of warnings though.

Agreed that it would good for SUM(xsd:integer(?x)) to return something.

- Steve

-- 
Steve Harris, CTO, Garlik Limited
2 Sheen Road, Richmond, TW9 1AE, UK
+44(0)20 8973 2465  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 Wednesday, 18 November 2009 11:27:36 UTC