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

Re: exists

From: Olivier Corby <Olivier.Corby@sophia.inria.fr>
Date: Wed, 26 May 2010 10:17:36 +0200
Message-ID: <4BFCD920.1040506@sophia.inria.fr>
To: SPARQL Working Group <public-rdf-dawg@w3.org>
I would like to draw the attention on  the fact that, due to different 
scoping rules between patterns and filters, we may obtain unexpected 
results.
In the example below, the first query returns a result while the second 
query fails.
So, if I check the existence of a pattern it succeeds but if I check the 
pattern itself, it fails.


:Jules :memberOf :abc
:Jules :related  :Jim
:Jim   :memberOf :def

select * where {
?x n:memberOf ?org .
filter(exists {{?x n:related ?y} minus {?y n:memberOf ?org}})
}

select * where {
?x n:memberOf ?org .
{{?x n:related ?y} minus {?y n:memberOf ?org}}
}


Olivier
Received on Wednesday, 26 May 2010 08:18:13 GMT

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