Re: question on sparql query testcases subquery/sq02 and sq03

Never mind.

Drank some more coffee, looked again, and figured out that in sq03,
binding of ?g in the sub-select should not propagate up to the graph
clause (because ?g is not in the projection).

Apologies for wasting your time.

Jeen


On 20/02/12 17:08, Jeen Broekstra wrote:
> 
> Dear WG,
> 
> could someone please explain to me what the difference is between
> testcases subquery/sq02 and subquery/sq03?
> 
> Query sq02 is :
> 
> select  ?x ?p where {
> graph ?g {
> {select * where {?x ?p ?g}}
> }
> }
> 
> Query sq03 is :
> 
> select ?x where {
> graph ?g {
>   {select ?x where {?x ?p ?g}}
> }
> }
> 
> Both queries are tested on the same dataset
> (http://www.w3.org/2009/sparql/docs/tests/data-sparql11/subquery/sq01.rdf).
> Apart from a slightly different projection, both queries are identical.
> 
> Yet for some reason sq02 is expected to return only a binding of ?x to
> in:c, while sq03 is expected to return bindings of ?x to both in:c and
> in:a.
> 
> Could it be that there is a mistake in test case sq03? I would at first
> glance expect that both queries should only return bindings of ?x to
> in:c, and not in:a.
> 
> Regards,
> 
> Jeen

Received on Monday, 20 February 2012 06:08:50 UTC