- From: Lee Feigenbaum <lee@thefigtrees.net>
- Date: Mon, 24 Jan 2011 10:20:00 -0500
- To: Andy Seaborne <andy.seaborne@epimorphics.com>
- CC: SPARQL Working Group <public-rdf-dawg@w3.org>
On 1/24/2011 4:33 AM, Andy Seaborne wrote: > > > On 24/01/11 03:22, Lee Feigenbaum wrote: >> Hi everyone, >> >> This mail discharged my ACTION-371 >> (http://www.w3.org/2009/sparql/track/actions/371), to look at the bind >> tests. >> >> I looked over the 7 tests in >> http://www.w3.org/2009/sparql/docs/tests/data-sparql11/bind/ and >> believed them to be accurate and reasonable coverage of the BIND keyword. >> >> I added one new test, bind08, which I believe tests correctly the fact >> that BIND occurs _after_ a group is ended, and hence a FILTER appearing >> before BIND cannot act on the BINDed variables. This is the test: >> >> == query == >> >> PREFIX : <http://example.org/> >> >> SELECT ?s ?p ?o ?z >> { >> ?s ?p ?o . >> FILTER(?z = 3 ) >> BIND(?o+1 AS ?z) >> } >> >> == results == >> >> (no solutions) >> >> Can someone please check the truth of this test? I don't have a BIND >> implementation to test this with at the moment. Also, if you feel that >> this should not be the semantics of BIND as the WG agreed on a couple of >> months ago, please let us know. >> >> Once this test has been looked at, I'd like to propose that we approve >> these 8 bind tests either this Tuesday or (more likely) one week from >> Tuesday. >> >> Lee > > Unfortunately, we missed that the WG agreement is at odds with SPARQL > 1.0 [1] > > In SPARQL 1.0, a filter applies to the whole group, where "group" means > syntax units between the {}. > > Andy > > [1] http://www.w3.org/TR/rdf-sparql-query/#scopeFilters > > [[ > A constraint, expressed by the keyword FILTER, is a restriction on > solutions over the whole group in which the filter appears. > ]] Well, I think that it's less that it changes that part of SPARQL 1.0 and more that it provides a new way to mark the end of the group. (BIND is effectively the equivalent of "} {".) Still, it clearly makes for some weirdness, which is what bind08 is showing. We discussed exactly bind08 at http://www.w3.org/2009/sparql/meeting/2010-11-02#BIND_and_FILTER_order_execution, and there was consensus that this is the behavior that we want, so while it is a strange new way to mark the end of the group (and start of a new group), I don't think it's a decision we ought to revisit now... Lee
Received on Monday, 24 January 2011 15:20:36 UTC