Hi,
While querying one of our projects I noticed that FILTER EXISTS and FILTER NOT EXISTS interact in unexpected ways with BIND.
Thus, the query in [1] works as expected.
However, the query in [2] does not:
According to the spec, the filters apply to the entire group graph pattern: scope is not restricted to the basic graph pattern. Although BIND in [2] ends the preceding basic graph pattern, I think the scope of the filters should not be affected.
The two variants of the query work the same (as I think they should) when I tested this on a Jena database.
Is this a known issue? Am I overlooking something?
(I can send the data graph if you like.)
Best regards, -Jan
[1]
SELECT *
WHERE {
BIND ( https://identifier.overheid.nl/tooi/def/thes/kern/skosCollection_475dff96 AS ?root )
BIND ( https://identifier.overheid.nl/tooi/set/ccw_plooi/AS ?workURI )
?root skos:member* ?collection .
FILTER EXISTS { ?collection rdf:type skos:Collection }
FILTER NOT EXISTS { ?collection tooiont:expandeert ?_expansion}
}
[2]
SELECT *
WHERE {
FILTER EXISTS { ?collection rdf:type skos:Collection }
FILTER NOT EXISTS { ?collection tooiont:expandeert ?_expansion}
BIND ( https://identifier.overheid.nl/tooi/def/thes/kern/skosCollection_475dff96 AS ?root )
BIND ( https://identifier.overheid.nl/tooi/set/ccw_plooi/AS ?workURI )
?root skos:member* ?collection .
}
Jan Voskuil | CEO Taxonic | Ontologist
Veldzigt 2, 3454 PW, De Meern, The Netherlands
T +31 (0)88 829 66 00 | M:+31 (0)6 14488335
jan.v...@taxonic.com | www.taxonic.com
Registered office in Den Haag, The Netherlands
Registration Number Chamber of Commerce: 54529190
Dear Jan,
I’m traveling so can’t test it properly. However, a first clarification: VB performs additional checks client side and has some additional features on the query editor (completion, etc..), however basically, once the query is ready to go, it is sent as-is to the triple store, so you can check directly on the triple store and, in case, report where appropriate.
If it’s GraphDB or a RDF4J separated stores you can use their workbench, if it’s the RDF4J store embedded in VB3, you could try downloading the full server of RDF4J and test it there; the version currently embedded in VB is RDF4J 3.7.3, just to be sure you replicate the scenario. It could be an already fixed bug and would disappear once we move to a new version (not expected with the next, imminent, minor release, but definitely happening with the subsequent major release within the year).
Kind Regards,
Armando
--
You received this message because you are subscribed to the Google Groups "vocbench-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
vocbench-use...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/vocbench-user/AM0PR03MB3745A2BD364C3ACA4E38BB74E9889%40AM0PR03MB3745.eurprd03.prod.outlook.com.
Thanks Armando, will do, -Jan