I'm running into what seems like a bug in virtuoso's SPARQL optimizer. I'm trying to execute a query using the OPTIONAL/!BOUND trick for negation and getting this error message:
Internal error: sparp_gp_detach_all_filters(): optimization tries to break the semantics of LEFT OUTER JOIN for OPTIONAL clause MacTed on #swig told me to send along a copy of the EXPLAIN for the query to the list, but EXPLAIN gives me the same error. Strangely, this seems to happen only when the optional/filter are within a GRAPH graph pattern. The query I'm trying to execute is: PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX void: <http://rdfs.org/ns/void#> SELECT DISTINCT ?dataset ?modified WHERE { GRAPH <http://kasei.us/temp/data-gov-times.rdf> { ?dataset a void:Dataset; dcterms:modified ?modified . OPTIONAL { ?dataset dcterms:modified ?m1 . FILTER(?m1 > ?modified) } FILTER(!BOUND(?m1)) } } ORDER BY ?dataset I'm using virtuoso 06.01.3127. Any thoughts on how to get around this problem and when this might be fixed (perhaps it is in 6.2?) would be greatly appreciated. thanks, .greg
