I've run into what I believe is another bug in virtuoso's SPARQL
implementation. Unless you've got some perverse RDF loaded into the database,
this following query shouldn't return any variable bindings:
SELECT * WHERE { OPTIONAL { [] <http://example.com/some_uri_that_doesnt_exist>
?f . FILTER(?f = 1234567890) } }
However, I've confirmed that it returns ?f=1234567890 from both DBPedia and
from my own virtuoso installation. I would guess the optimizer is trying to be
a bit too clever and rewriting the ?f variable with the numeric literal in the
filter and binding ?f with the same value in the results, but this isn't
correct when the BGP in the OPTIONAL doesn't match anything in the dataset.
thanks,
.greg