- From: Peter F. Patel-Schneider <pfpschneider@gmail.com>
- Date: Thu, 14 Jul 2016 10:57:28 -0700
- To: Gregory Williams <greg@evilfunhouse.com>
- Cc: Andy Seaborne <andy@apache.org>, public-sparql-exists@w3.org
On 07/14/2016 10:43 AM, Gregory Williams wrote: > >> On Jul 14, 2016, at 10:37 AM, Peter F. Patel-Schneider <pfpschneider@gmail.com> wrote: >> >> You have to put the multiset and Join in the right place. If you think >> syntactically, it is like putting a generalized VALUES construct as the first >> element of the GroupGraphPattern that is the argument to EXISTS, i.e., changing >> { ?x :q ?y FILTER(?y = ?o) } >> to >> { VALUES* (?s ?o) { ... } ?x :q ?y FILTER(?y = ?o) } >> where ... is the correct values for ?s and ?o (and can be blank nodes). To >> make that all easy, an initial replacement has to be done on the syntactic >> level, i.e., when FILTERS are gathered (18.2.2.2), and then when the exists is >> evaluated (18.6) the current solution mapping has to be pushed to the correct .... >> >> Evaluating the query on the graph >> :b :p :c . >> :d :q :c . >> results in the exists evaluating something like >> Filter( (?y=?o), Join( { { (:s,:b), (:o,:c) } } , BGP( ?x :q ?y ) >> which should all work out. > > Might this approach require injecting the syntactic token in multiple places in the exists pattern? If you start combining filters as above with branching constructs like unions and multiple group graph patterns, it sounds like the injection might need to occur in many locations. > > thanks, > .greg To get the maximum conformance to the SPARQL spec, yes, you have to do the injection into every group graph pattern. I don't think that that is the best way to go. However, it may be that this group shouldn't produce the best solution but instead a worse solution that is closer to the spec. peter
Received on Thursday, 14 July 2016 17:57:59 UTC