W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > January to March 2010

Re: [TF-LIB] IN operator

From: Steve Harris <steve.harris@garlik.com>
Date: Mon, 8 Feb 2010 11:50:19 +0000
Cc: Andy Seaborne <andy.seaborne@talis.com>, SPARQL Working Group <public-rdf-dawg@w3.org>
Message-Id: <0F3B4F13-98CC-4EA1-A065-A62F83A16D97@garlik.com>
To: Ivan Mikhailov <imikhailov@openlinksw.com>
On 8 Feb 2010, at 11:00, Ivan Mikhailov wrote:
> IN should be based on equality. For IN based on SAMETERM, a special
> function might be introduced.

What special function? SPARQL already has sameTerm: http://www.w3.org/TR/rdf-sparql-query/#func-sameTerm

Another reason to base it on sameTerm is optimisation. You can replace  
FILTER(?x = <uri1> || ?x = <uri2> ...) with a simple disjunctive  
expression on ?x, but you can't with numeric literals as there are an  
infinite number of literals that are = to "1"^^xsd:integer, for example.

This may not matter in anyone else's engine though, so I didn't bring  
it up before.

> If both scalar subqueries and IN are supported then
> ?expn IN (SELECT...)
> should also be supported, of course.

That's a bit of a leap, and I don't think I agree.

- Steve

-- 
Steve Harris, Garlik Limited
2 Sheen Road, Richmond, TW9 1AE, UK
+44 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 Monday, 8 February 2010 11:50:51 GMT

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