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

Re: "Unbound" in SPARQL

From: Steve Harris <steve.harris@garlik.com>
Date: Wed, 18 Nov 2009 11:27:07 +0000
Cc: SPARQL Working Group <public-rdf-dawg@w3.org>
Message-Id: <A4353F4F-A77C-461B-A160-7DC8A0CBCDC0@garlik.com>
To: Andy Seaborne <andy.seaborne@talis.com>
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 GMT

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