Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Jena 3.1.0, Fuseki 2.4.0
-
None
Description
I've been using SPARQL queries with BINDs and/or VALUESs that precede UNION blocks. These used to work efficiently (at least in Jena 2 times) with the bound value being bound also in the subpattern, but no longer do. In addition, at certain times, they produce nonsensical results. For example, the below returns rdf:type statements in the dataset without any regard to ?cl:
SELECT * {
{
BIND("nonexistant" AS ?cl)
{
BIND(?cl AS ?cl2)
?c a ?cl2 .
} UNION {
BIND(?cl AS ?cl2)
?c a ?cl2 .
}
}
}
LIMIT 10
while if you change just one of the subpatterns in the union to directly refer to ?cl, it returns an empty result set:
SELECT * {
{
BIND("nonexistant" AS ?cl)
{
BIND(?cl AS ?cl2)
?c a ?cl .
} UNION {
BIND(?cl AS ?cl2)
?c a ?cl2 .
}
}
}
LIMIT 10