basic vs group graph pattern

Hi.

Given the data

:x1 :p "s1"
:x2 :p "s2"

I expect query 1

{
 ?x1 :p ?s1.
 ?x2 :p ?s2.
}

to return two solutions,

?x1    ?s1    ?x2    ?s2
:x1    "s1"    :x2    "s2"
:x2    "s2"    :x1    "s1"

while query 2

{
 { ?x1 :p ?s1. }
 { ?x2 :p ?s2. }
}

should have four solutions:

?x1    ?s1    ?x2    ?s2
:x1    "s1"    :x2    "s2"
:x2    "s2"    :x1    "s1"
:x1    "s1"    :x1    "s1"
:x2    "s2"    :x2    "s2"

This is because in the first case, there is one length-2 basic graph
pattern, matching a length-2 subgraph (the whole graph) with two
different ways to bind the variables to the matched graph.
In the second case, there is a group graph pattern of two length-1 basic
graph patterns, each matching two subgraphs, and in each case there is
one way to bind variables; both length-2 solutions are joined, giving a
total of four solutions.

Can someone confirm that this is the correct interpretation?
This is a reduced example of my question about a test case I asked here:
https://lists.w3.org/Archives/Public/public-rdf-tests/2017May/0000.html

Toni

Received on Tuesday, 30 May 2017 19:57:17 UTC