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

depressiveRobot opened this Issue Jul 28, 2015 · 0 comments


None yet
2 participants

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.


Having the following two named graphs in Virtuoso

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

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

and executing this query:

  GRAPH ?g { ?s ?p ?o . }

returns this result set:


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