Re: basic vs group graph pattern issue in bnode test

Thanks Gregg.
This has been resolved [1]; my understanding of "matching a basic graph
pattern" was wrong.

Toni

[1]
https://lists.w3.org/Archives/Public/public-sparql-dev/2017AprJun/0008.html


2017-05-30 20:16 GMT+02:00 Gregg Kellogg <gregg@greggkellogg.net>:

> Hi Toni, for questions about how SPARQL should be have, you may want to
> try public-sparql-dev@w3.org or even Stack Exchange. Certainly, if it is
> determined that a test case needs to be updated, this is the appropriate
> forum.
>
> Gregg Kellogg
> gregg@greggkellogg.net
>
> On May 30, 2017, at 5:38 AM, Toni Schindler <toni.schindler@gmail.com>
> wrote:
>
> Hi,
>
> I'm Toni. I've been reading the RDF and SPARQL standards for a while and
> I'm working on an implementation at Wolfram.
> I came across a test that seems wrong, given my current understanding of
> basic graph pattern matching.
> Consider the query [1]
>
> WHERE {
>    ?a :str ?s1 .
>    ?b :str ?s2 .
>    FILTER (?a = :s1 || ?a = :s3)
>    FILTER (?b = :s1 || ?b = :s3)
> }
>
> with data [2]
>
> ...
> :s1 :str "foo" .
> :s2 :str "bar"@en .
> :s3 :str "BAZ" .
> ...
>
> and the result [3] expecting four solutions, including for instance
> ?s1 -> "BAZ", ?s2 -> "BAZ", ...
>
> However, the data graph does not contain a length-2 subgraph of the form
> {... ... "BAZ". ... ... "BAZ"}. With the current query there is only one
> matching subgraph (after filtering), and two ways to bind variables in
> this subgraph, giving two solutions.
> There would be four solutions if the query were updated to
>
> WHERE {
>    { ?a :str ?s1 . }
>    { ?b :str ?s2 . }
>    ...
> }
>
> so that there are two length-1 graph patterns to be matched (each
> effectively with two solutions when taking into account the filters),
> whose solutions are joined (giving four solutions, after filtering).
>
> What do you think? Should the test be updated? Did I misunderstand
> something?
>
> Toni
>
> [1]
> https://github.com/w3c/rdf-tests/blob/gh-pages/sparql11/
> data-sparql11/functions/bnode01.rq
> [2]
> https://github.com/w3c/rdf-tests/blob/gh-pages/sparql11/
> data-sparql11/functions/data.ttl
> [3]
> https://github.com/w3c/rdf-tests/blob/gh-pages/sparql11/
> data-sparql11/functions/bnode01.srx
>
>
>
>
>

Received on Wednesday, 31 May 2017 11:08:47 UTC