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

Re: scope of alias variables

From: Steve Harris <steve.harris@garlik.com>
Date: Sat, 14 Nov 2009 06:02:20 +0000
Message-Id: <876C8EB2-FA8E-4F1B-871D-52C07A3F7D69@garlik.com>
To: RDF Data Access Working Group <public-rdf-dawg@w3.org>
On 13 Nov 2009, at 15:10, Andy Seaborne wrote:
> That leaves it whatever is right to do about
>
>    SELECT (?x AS ?A)
>    { <x> :p ?A }

Typo for { ?x :p ?A }?

If so then it's one of those things that in spec terms there's  
probably little cost, but depending on how people's implementations  
work it might end up being a pain. In 4store for example I join an  
extra column for the new expression, then project, so it would be  
tricky for me to handle:
   (?x, ?A) -> (?x, ?A, ?A) -> project (?A)
Not impossible though.

But that example also raises the question about whether it should be  
legal to project variables that haven't been bound. My recollection is  
that SPARQL 1.0 is not very clear about whether it's allowed or not.  
The terminology (bound v's unbound) implies that it might be OK, but  
that's pretty user-unfriendly in my experience - typos like Andy's  
(possible example) are a bit too easy to do.

We issue a warning in 4store, FWIW. Not sure if I'd be in favour of it  
being an error or not.

- 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 Saturday, 14 November 2009 06:02:56 GMT

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