blazegraph / database

Blazegraph High Performance Graph Database
GNU General Public License v2.0
872 stars 170 forks source link

Unexpected (false?) positives for ?a <b>+ ?a #215

Open streetmathematician opened 2 years ago

streetmathematician commented 2 years ago

Hi!

Sorry if I'm just being incredibly stupid, but I believe there might be a bug in the nightly snapshot of blazegraph, particularly the SPARQL query handling which returns different results, in some circumstances, for ?a <b>/<b>* ?a and ?a <b>+ ?a

Steps to reproduce:

  1. Launch:

    java -server -jar blazegraph.jar
  2. Update (the default namespace):

    INSERT DATA { <a> <b> <c>. <d> <b> <a>. }

Note that there are no cycles, just a path of length 2 connecting <d> to <c> via <a>.

  1. Query:
    SELECT ?a WHERE { ?a <b>+ ?a. }

Actual Result: <a>, <c>.

Expected Result: 0 results.

The query

SELECT ?a WHERE { ?a <b>/<b>* ?a. }

returns the expected empty result set, but

SELECT ?a WHERE { ?a <b>* ?a. }

also returns <a> and <c>, but not <d>.

Fuseki returns the expected results for all queries.