Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Jena 4.1.0
-
None
Description
If
SELECT * WHERE { GRAPH ?g { ?s ?p ?o BIND(str(?g) AS ?g1) } }
algebra:
(graph ?g (extend ((?g1 (str ?g))) (bgp (triple ?s ?p ?o))))
generates quad form:
(extend ((?g1 (str ?g))) (quadpattern (quad ?g ?s ?p ?o)))
Note quadpattern sets ?g.
but if a FILTER is present, a correct expression is generated:
SELECT * WHERE { GRAPH ?g { ?s ?p ?o FILTER ( ?g != 123 ) BIND(?g AS ?g1) } }
algebra:
(graph ?g (filter (!= ?g 123) (extend ((?g1 (str ?g))) (bgp (triple ?s ?p ?o)))))
generates quad form:
(assign ((?g ?*g0)) (filter (!= ?g 123) (extend ((?g1 (str ?g))) (quadpattern (quad ?*g0 ?s ?p ?o)))))
Delayed setting of ?g.
The problem is in OpVars.OpVarsMentioned not processing BIND expressions.
Attachments
Issue Links
- links to