- From: Axel Polleres <axel.polleres@deri.org>
- Date: Wed, 26 May 2010 14:25:33 +0100
- To: Birte Glimm <birte.glimm@comlab.ox.ac.uk>
- Cc: "Olivier Corby" <Olivier.Corby@sophia.inria.fr>, "SPARQL Working Group" <public-rdf-dawg@w3.org>
We have at least two people agreeing and two potential test cases... not too bad anyways ;-) On 26 May 2010, at 11:50, Birte Glimm wrote: > Axel, > I also tried you examples to test my understanding and I come to the > same results that you have (not that this gives a guarantee the we get > it right ;-) ). > Birte > > On 25 May 2010 13:37, Axel Polleres <axel.polleres@deri.org> wrote: > > I would assume that existing bindings should prevail in an exists > > pattern... i.e. before computing the filter, you replace all variables with all existing (non-null) bindings... > > do you see any problem with that? > > > > > > just thinking out loud... would that also work with unbounds from optionals? > > seems not to be a problem... e.g. > > > > let't assume graph: > > > > g1: > > a p b > > a q p > > > > q1: > >> select ?x ?y where { > >> ?x p ?y OPTIONAL { ?y q ?z} > >> filter( ! exists {?y q ?z }) > > > > > > would return {?x/a ?y/b}, whereas > > > > q2: > >> select ?x ?y where { > >> ?x p ?y OPTIONAL { ?y q ?z} > >> filter( ! exists {?v q ?z FILTER(?y != ?v) }) > > > > would return the empty solution set {} > > > > on graph > > > > g2: > > a p b > > b q p > > > > in reverse, q1 would return {} and q2 would return {?x/a ?y/b}, yes? > > > > Axel > > > > > > > > > > On 25 May 2010, at 12:44, Olivier Corby wrote: > > > >> What is the scope of variables in nested exists pattern? > >> For example, is the inner ?x the same as the outer ?x > >> > >> > >> select * where { > >> ?x p ?y > >> filter(! exists {?y q ?z > >> filter(! exists {?x r ?z}) > >> }) > >> > >> } > >> > >> > >> Olivier > >> > >> > > > > > > > > > > -- > Dr. Birte Glimm, Room 306 > Computing Laboratory > Parks Road > Oxford > OX1 3QD > United Kingdom > +44 (0)1865 283529 >
Received on Wednesday, 26 May 2010 13:26:20 UTC