Open lucafabbian opened 2 years ago
Hi,
Thank you for using sparql-engine
👍 It is in deed a regression: in v0.7.0, we introduced a query plan optimizer, to, optimize the execution plan regardless of the syntax of the query. However, we didn't account for the very special case your issue highlight: a BIND clause sued to feed data into the res tof the query. The plan optimizer doesn't recognize the dependency between the BIND clause and the triple patterns, and pushes the BIND evaluation after the triple pattern evaluation. This pattern is evaluated first and then the BIND overrides ?s
with http://example.org#a
, leading to this results.
I will look into this if there's a quick fix, thank you for sharing it!
Describe the bug Bind operator working wrong since 7.0
To Reproduce Just use a query with BIND inside one of the examples (here I chose the one about using a storage based on N3.js).
Expected behavior On 6.0 and below, I get the expected result:
While on 7.0 and above, I get: