Hi,
I am running OpenLink Virtuoso version 06.01.3127, on Linux (x86_64).
My question is the following. I have a SPARQL construct query with complex
optionals that returns no results. It looks like ...
CONSTRUCT { ?s <http://www.w3.org/2000/01/rdf-schema#label> ?o }
WHERE {
?s <http://www.w3.org/2000/01/rdf-schema#label> ?o .
OPTIONAL { ?s <http://www.w3.org/2000/01/rdf-schema#NOT_EXISTING>
<http://www.w3.org/2000/01/rdf-schema#NOT_EXISTING> . }
}
I know that the pattern in the OPTIONAL clause is not satisfied but, despite
that fact, I should get results. I have tested this query also with Jena-TDB
and 4store and in both cases I get results. Also in the SPARQL spec I could
read ...
"If any such instantiation produces a triple containing an unbound variable or
an illegal RDF construct, such as a literal in subject or predicate position,
then that triple is not included in the output RDF graph." (see also
http://answers.semanticweb.com/questions/2529/sparql-construct-queries-against-optional-data)
So my question is ... whether this is a bug and, if so, if it has been fixed in
latest releases ?
Thanks,
Manuel Salvadores