Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPTIONAL with empty default graph produces SPARQL compiler error #452

depressiveRobot opened this issue Jul 29, 2015 · 1 comment


Copy link

@depressiveRobot depressiveRobot commented Jul 29, 2015

When executing the following query:

FROM NAMED <urn:graph>
  OPTIONAL { ?s ?p ?o . }

Virtuoso throws this error:

Virtuoso 37000 Error SP031: SPARQL compiler: Variable 's' can not be bound due to mutually exclusive restrictions on its value

SPARQL query:
define sql:big-data-const 0 
define sql:signal-void-variables 1 SELECT ?s
FROM NAMED <urn:graph>
  OPTIONAL { ?s ?p ?o . }

According to the SPARQL specification the default graph of the query's dataset is empty:

If there is no FROM clause, but there is one or more FROM NAMED clauses, then the dataset includes an empty graph for the default graph.

So my opinion is that the compiler is aware of this fact and therefore produces this error.

But, I see no reason why this should happen as this is a correct SPARQL query.

Tested with Virtuoso 7.2.1

Copy link

@HughWilliams HughWilliams commented Jul 29, 2015


We are checking this ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.