Standardizing RDF merge of all graphs in FROM clause

HI All,

Many RDF stores implement different ways to query over the merge/union of all graphs in the store.
This may be done as a configuration (for example specifying the default graph is the merger of all named graphs), or by introducing a vendor-specific IRI for the merged graph (for example Jena has <urn:x-arq:UnionGraph>).

Seems this could be easily standardized by extending the FROM clause.

For example, to query across the RDF merge of the DEFAULT and all named graphs:

SELECT *
FROM UNION ALL
WHERE { ?s ?p ?o }
LIMIT 10

Or to query across the RDF merge of all named graphs:

SELECT *
FROM UNION NAMED
WHERE { ?s ?p ?o }
LIMIT 10

The UNION may be somewhat superfluous, but would avoid possible confusion with the FROM NAMED syntax.
Of course, one could argue FROM GRAPH may be more consistent with overall SPARQL syntax (e.g. DROP) than current FROM NAMED syntax, but probably too late for those kind of changes.

Could be considered for next SPARQL version, be it 1.2 or 2.0.

Thoughts welcome!

Regards,
John Walker

Received on Thursday, 25 May 2017 06:13:53 UTC