openlink / virtuoso-opensource

Virtuoso is a high-performance and scalable Multi-Model RDBMS, Data Integration Middleware, Linked Data Deployment, and HTTP Application Server Platform
https://vos.openlinksw.com
Other
863 stars 210 forks source link

No results with VALUES + non-matching OPTIONAL #391

Open knoan opened 9 years ago

knoan commented 9 years ago

The following query unexpectedly returns an empty result set on the http://dbpedia.org/sparql endpoint (Virtuoso 7.20).

prefix dbr: <http://dbpedia.org/resource/>

select ?a ?i where {

    values ?a {
        dbr:Fiat_500
        dbr:Smart_Fortwo
    }

    optional { ?a <http://schema.org/image> ?i }

}

The query breaks with a pattern like

optional { ?a <http://schema.org/image> ?i }

which doesn't match any triples.

It works as expected with a a matching pattern like:

optional { ?a <http://dbpedia.org/ontology/thumbnail> ?i }
HughWilliams commented 9 years ago

This issue has been reported to development to look into ...