Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-1001

named graphs set not empty if no FROM NAMED clause given

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Later
    • Fuseki 2.0.0
    • None
    • Fuseki
    • None

    Description

      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 data:
      http://example.org/graph1

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

      http://example.org/graph2

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

      and executing the query:

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

      will return

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

      which proves 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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              depressiveRobot Marvin Frommhold
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: