- From: Axel Polleres <axel.polleres@deri.org>
- Date: Tue, 25 May 2010 13:37:38 +0100
- To: Olivier Corby <Olivier.Corby@sophia.inria.fr>
- Cc: "SPARQL Working Group" <public-rdf-dawg@w3.org>
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 > >
Received on Tuesday, 25 May 2010 12:38:13 UTC