- From: Lee Feigenbaum <lee@thefigtrees.net>
- Date: Sun, 04 Apr 2010 22:53:46 -0400
- To: Andy Seaborne <andy.seaborne@talis.com>
- CC: SPARQL Working Group <public-rdf-dawg@w3.org>
On 4/2/2010 5:05 PM, Andy Seaborne wrote: > The decision at F2F3 to have just the form of NOT EXISTs in an explicit > FILTER has a limitation. I should have realised at the time but it > didn't occur to me until after the meeting. > > FILTERs get moved to the end of the BGP during translation from syntax > to algebra. The form without the word "FILTER" does not move e.g. > > { ?s rdf:type :T > NOT EXISTS { ?s :p ?v . } > ?s :q ?v > } > > then NOT EXISTS is not moved about by the FILTER placement rules. Yes, this is a difference. In most cases it doesn't matter, though, right? I'd like to understand better the cases in which moving/not moving the NOT EXISTS changes the answers. > One reason for NOT EXISTS is as a better form of the OPTIONAL/!BOUND > idiom, where the OPTIONAL block anchors the location of the existence > test by it's effect of setting, or not, a variable to be tested later. > > The FILTER could be artificially forced using a extra {} > > { { ?s rdf:type :T > FILTER NOT EXISTS { ?s :p ?v . } > } > ?s :q ?v > } > > This is unnecessary - the more direct syntax is closer to the > OPTIONAL/!BOUND idiom that I think it the important thing to make easier. > > Therefore I propose we adopt both negation proposals without modification. I wouldn't be in favor of this proposal - I'd find it very difficult to justify adding 2 forms of negation to SPARQL that seem virtually indistinguishable from one another in most scenarios. > It only affects the grammar and translation from syntax to algebra - > actual execution is unchanged and there is no additional implementation > cost for execution. To me, it makes sense to have one filter form and one graph pattern form. So far, I can't really make myself comfortable with the idea of adding two new graph pattern operators to the language that both do the same thing in almost all cases. Lee > Andy > > >
Received on Monday, 5 April 2010 02:54:25 UTC