- From: Toni Schindler <toni.schindler@gmail.com>
- Date: Tue, 30 May 2017 14:38:19 +0200
- To: public-rdf-tests@w3.org
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 Tuesday, 30 May 2017 16:18:08 UTC