named graphs set not empty if no FROM NAMED clause given #451

Open
depressiveRobot opened this Issue Jul 28, 2015 · 0 comments

Comments

Projects
None yet
2 participants
@depressiveRobot

According to the SPARQL 1.1 Query Language specification the set of named graphs must be empty if a query only specifies FROM clauses and no FROM NAMED clauses:

An RDF Dataset comprises [...] zero or more named graphs

That means, the only way to express zero named graphs is to specify no FROM NAMED clause.

But:

Having the following two named graphs in Virtuoso
http://example.org/graph1

<urn:subject1> rdfs:label "Subject one" .

http://example.org/graph2

<urn:subject2> rdfs:label "Subject two" .

and executing this query:

SELECT ?g
FROM <http://example.org/graph1>
WHERE {
  GRAPH ?g { ?s ?p ?o . }
}

returns this result set:

 ?g
===========
 ex:graph1
 ex:graph2

Which states, that the set of named graphs is not empty:

GRAPH can [...] use a variable which will range over the IRI of all the named graphs in the query's RDF dataset.

I know this is by intent, but unfortunately this is against the specification. Do you plan to fix this?

Other services like Oracle and Stardog are doing it right.

Tested with Virtuoso v7.2.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment