Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

ExecuteSPARQLStar query result issue #24

Open
Lars-H opened this issue Jul 11, 2019 · 2 comments
Open

ExecuteSPARQLStar query result issue #24

Lars-H opened this issue Jul 11, 2019 · 2 comments

Comments

@Lars-H
Copy link

Lars-H commented Jul 11, 2019

Hi,

I am trying to re-create the examples given in the paper [1].
I have extended the RDF* File a bit to:

@prefix : <http://example.org/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix dct: <http://purl.org/dc/terms/> .

:Bob foaf:name "Bob" .
<<:Bob foaf:age 23>> dct:creator <http://example.com/crawler#c1> ;
                    dct:source <http://example.net/listings.html> .
<<:Bob foaf:knows :Alice>> dct:creator <http://example.com/crawler#c1> ;
                    dct:source <http://example.net/listings.html> .

Now, I am executing the SPARQL* query also provided in the paper:

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dct: <http://purl.org/dc/terms/>
SELECT ?x ?age ?src
WHERE {
   <<?x foaf:age ?age>> dct:source ?src  .
}

When I execute the presented query over the given RDF* graph using the ExecuteSPARQLStar CLI, I obtain the following results:

{
  "head": {
    "vars": [ "x" , "age" , "src" ]
  } ,
  "results": {
    "bindings": [
      {
        "x": { "type": "uri" , "value": "http://example.org/Bob" } ,
        "age": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "23" } ,
        "src": { "type": "uri" , "value": "http://example.net/listings.html" }
      } ,
      {
        "x": { "type": "uri" , "value": "http://example.org/Bob" } ,
        "age": { "type": "uri" , "value": "http://example.org/Alice" } ,
        "src": { "type": "uri" , "value": "http://example.net/listings.html" }
      }
    ]
  }
}

However, I would expect the results not to include the second solution mapping, since the nested triple <<:Bob foaf:knows :Alice>> does not match the nested triple pattern <<?x foaf:age ?age>> .
It appears as if the query engine merely matches the "outer" triple pattern and does not consider the nested triple. Is this behavior correct according to the semantics of SPARQL*?

Thanks and best regards,
Lars

[1] http://olafhartig.de/files/Hartig_AMW2017_RDFStar.pdf

@hartig
Copy link
Member

hartig commented Jul 12, 2019

You are right. The second solution mappings is indeed incorrect.

I will take a look at the source code to find the bug. However, I am on vacation at the moment. So, it may take a while.

@Lars-H
Copy link
Author

Lars-H commented Jul 12, 2019

Ok, great. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants