Ticket #515 (closed defect: fixed)
Query with two "FILTER NOT EXISTS" expressions returns no results
| Reported by: | gjdev | Owned by: | mrpersonick |
|---|---|---|---|
| Priority: | major | Milestone: | Query |
| Component: | Bigdata RDF Database | Version: | BIGDATA_RELEASE_1_1_0 |
| Keywords: | Cc: | thompsonbry |
Description
This can be reproduced by creating a testcase for the following testdata, query and expected results, which will return no results while it should return os:2:
filter-not-exists.rq:
SELECT ?ar
WHERE {
?ar a <os:class/AnalysisResults>.
FILTER NOT EXISTS {
?ar <os:prop/analysis/refEntity> <os:elem/loc/Artis>.
}.
FILTER NOT EXISTS {
?ar <os:prop/analysis/refEntity> <os:elem/loc/Kriterion>.
}.
}
filter-not-exists.ttl:
<os:0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <os:class/AnalysisResults> . <os:0> <os:prop/analysis/refEntity> <os:elem/loc/Artis> . <os:0> <os:prop/analysis/refEntity> <os:elem/loc/Kriterion> . <os:1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <os:class/AnalysisResults> . <os:1> <os:prop/analysis/refEntity> <os:elem/loc/Artis> . <os:2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <os:class/AnalysisResults> .
filter-not-exists.srx:
<?xml version="1.0"?>
<sparql
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xs="http://www.w3.org/2001/XMLSchema#"
xmlns="http://www.w3.org/2005/sparql-results#" >
<head>
<variable name="ar"/>
</head>
<results>
<result>
<binding name="ar">
<uri>os:2</uri>
</binding>
</result>
</results>
</sparql>
Change History
Note: See
TracTickets for help on using
tickets.