Re: [TF-LIB] IN operator

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 UTC