Re: service tests 4, 7

I think you are right in both tests. I will correct them today. Any more 
opinions?

Carlos

On 28/06/11 11:07, Gregory Williams wrote:
> As I mentioned on the call today, I think service tests 4 and 7 are wrong.
>
> Test 4 is:
>
> PREFIX :<http://example.org/>
> PREFIX foaf:<http://xmlns.com/foaf/0.1/>
> SELECT ?s ?o1 ?o2
> {
>   ?s ?p1 ?o1
>   OPTIONAL { SERVICE<http://example.org/sparql>  {?s foaf:knows ?o2 }}
> } BINDINGS ?o2 {
> (:b)
> }
>
> I think the issue is a misunderstanding of how BINDINGS is used. My understanding of the query is that the results *before* the BINDINGS data is joined contain some rows where ?o2 is unbound (failed to match in the OPTIONAL). When joining these results with the BINDINGS data, rows with ?o2 bound to :b will successfully join, rows bound to other values will disappear, and rows with ?o2 unbound will turn into rows with ?o2 bound to :b (being compatible because ?o2 is only bound in the BINDINGS side of the join). However, the srx file for the test seems to only include results for the first case (where ?o2 was already bound to :b). I think the actual results should be:
>
> ?s	?o1						?o2
> :a	"Alan"					:b
> :a	"alan@example.org"		:b
> :c	"Alice"					:b
> :c	"alice@example.org"		:b
>
>
>
> Test 7 is:
>
> PREFIX :<http://example.org/>
>
> SELECT ?s ?o1 ?o2
> {
>   ?s ?p ?o1 .
>   SERVICE SILENT<http://invalid.endpoint.org/sparql>  {
>     ?s ?p2 ?o2 }
> }
>
> The service endpoint obviously doesn't have any data in it and the call will fail. But my understanding of the use of SILENT is that the entire SERVICE pattern will result in the join identity (one result with no bindings). The local default graph is set up with the data in data07.ttl which has two triples. The srx file suggests the expected results are empty, but since we have two local triples that will match the first pattern, and the service pattern is the join identity, I think the actual results should be:
>
> ?s	?o1		?o2
> :a	"Alan"
> :b	"Bob"
>
>
>
> Can anybody confirm or deny my understanding of these tests?
>
> thanks,
> .greg
>
>

Received on Tuesday, 5 July 2011 13:27:19 UTC