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

Already on GitHub? Sign in to your account

NOT EXISTS doesn't play well together with other FILTER clauses #123

Open
joernhees opened this Issue Dec 18, 2013 · 2 comments

Comments

Projects
None yet
4 participants

This query gives you the most specific type in each branch of the transitive type subclass closure only (correct & nice):

select ?t ?p
where {
    dbpedia:Barack_Obama a ?t.
    FILTER(STRSTARTS(STR(?t), "http://dbpedia.org/ontology/"))
    ?t rdfs:subClassOf* ?p.
    FILTER(NOT EXISTS {
        dbpedia:Barack_Obama a ?t2.
        ?t2 rdfs:subClassOf+ ?t.
    })
}

This query doesn't, even though it should be equivalent:

select ?s ?t ?p
where {
    ?s a ?t.
    FILTER(?s = dbpedia:Barack_Obama )
    FILTER(STRSTARTS(STR(?t), "http://dbpedia.org/ontology/"))
    ?t rdfs:subClassOf* ?p.
    FILTER(NOT EXISTS {
        ?s a ?t2.
        ?t2 rdfs:subClassOf+ ?t.
    })
}

If you want more output remove the STRSTARTS Filter clause.

Collaborator

HughWilliams commented Dec 23, 2013

We are looking into this ...

@ghost ghost assigned iv-an-ru Jan 31, 2014

Owner

openlink commented Feb 12, 2014

I believe this problem has been addressed in the latest version on develop/7. Can you build and retest please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment