- From: Andy Seaborne <andy.seaborne@epimorphics.com>
- Date: Thu, 14 Oct 2010 12:09:04 +0100
- To: Axel Polleres <axel.polleres@deri.org>
- CC: Lee Feigenbaum <lee@thefigtrees.net>, SPARQL Working Group <public-rdf-dawg@w3.org>
On 14/10/10 11:09, Axel Polleres wrote: > Just to get that right: > >>> 1/ BIND terminates the current BGP >>> 2/ FILTER goes after BIND in the BGP > > Sorry, I am a bit confused about what the "FILTER goes after BIND in the BGP" part > means... Do I understand part 2/ of this proposal correctly as follows? > > For Query1: > > ASK { FILTER(?two = 2) . BIND(2 AS ?two) . } > =:= > ASK { BIND(2 AS ?two) . FILTER(?two = 2) } > > this means > > Answer: yes? I don't understand what you are asking. "yes" as the answer to the ASK or "yes" to the "Do I understand" or "yes" as in "do you agree?" > But for Query2: > > ASK { FILTER(?two = 2) . BIND("foo" AS ?bar) . BIND(2 AS ?two) . } > > would this mean > > Answer: no? I suggest that a sequence of BINDs is considered as ending one BGP, not having nested BGPs subject to FILTERs. ASK { BIND("foo" AS ?bar) . BIND(2 AS ?two) . FILTER(?two = 2) } BINDs need to keep their relative order. ASK { BIND(1 AS ?one) . BIND(?one+1 AS ?two) . FILTER(?two = 2) } > (since the first bind terminates the BGP, ?two wouldn't yet be bound?!?) > > Would - alternatively "2/ BIND goes after FILTER in the BGP" also be an option? then the filter can not test the outcome of the BIND. I can't think of a reason why making the FILTER cause an error on unbound when a BIND is used is helpful to the application writer. Do you have use case? { BIND(2 AS ?two) . FILTER(?two = 2) } same as { FILTER(?two = 2) . BIND(2 AS ?two) . } makes more sense to me given we have floating FILTERs. > (might be seen more intuitive from the viewpoint that Query1 and Query2 would behave > the same?) > > Thanks for clarification, > Axel Andy
Received on Thursday, 14 October 2010 11:09:44 UTC