ruby-rdf / sparql

Ruby SPARQL library
http://rubygems.org/gems/sparql
The Unlicense
89 stars 14 forks source link

Query parser should report error when BIND is used with a variable that appears in the preceeding BGP #29

Closed abrisse closed 6 years ago

abrisse commented 7 years ago

The following parsing should raise an error:

SPARQL.parse("SELECT * WHERE { ?s ?p ?o . BIND (?p AS ?o) }")

Indeed "The variable introduced by the BIND clause must not have been used in the group graph pattern up to the point of use in BIND." [Link]

See related fix on Sesame: https://github.com/ansell/openrdf-sesame/commit/9ed322edee4547da0df1cc931959dca7bc7df573