blazegraph / database

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

Ordered results in solution set - inconsistent results #66

Open kotlenik opened 7 years ago

kotlenik commented 7 years ago

Hi! On our Blazegraph instances (version 2.1.2) we investigated usage of features regarding ordered values in solution sets. It is use case described within, https://wiki.blazegraph.com/wiki/index.php/SPARQL_Update#Named_Solution_Sets which is used for paging through data set. We ran into problems with this. For sample data in attachment we made solution set with:

prefix ex: <https://example.org/>
   prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
   prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
   prefix xml: <http://www.w3.org/XML/1998/namespace>
   prefix xsd: <http://www.w3.org/2001/XMLSchema#>

   INSERT INTO %entity_label
   SELECT ?e ?e_l
   WHERE {
       SELECT ?e ?e_l
       WHERE {
          ?e a ex:c .
          ?e rdfs:label ?e_l .
       }
   ORDER BY ?e
   }

and when queried with :

prefix ex: <https://example.org/>
  SELECT ?e ?e_l
  WHERE{
     INCLUDE %entity_label
   }
   LIMIT 3
   OFFSET 97

we get proper results which are:

<https://example.org/c/e/3eyl1r2> label 3eyl1r2
  <https://example.org/c/e/3f06245> label 3f06245
  <https://example.org/c/e/3funi1b> label 3funi1b

but not always. We also get wrong data like

<https://example.org/c/e/73fequm> label 73fequm
  <https://example.org/c/e/73wns10> label 73wns10
  <https://example.org/c/e/740peif> label 740peif

or else, from time to time.

Please, can you look at this problem? It breaks regular use case for above mentioned feature described in link.

Best regards, Adam data.zip

beebs-systap commented 7 years ago

Thanks. Do you mind reporting it for us on JIRA?

kotlenik commented 7 years ago

No problem. On Jira it is https://jira.blazegraph.com/browse/BLZG-8997 Thank you! Best, Adam