Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPARQL: ORDER BY returning results in incorrect rows #86

Open
cbdavis opened this issue Sep 2, 2013 · 4 comments
Open

SPARQL: ORDER BY returning results in incorrect rows #86

cbdavis opened this issue Sep 2, 2013 · 4 comments
Assignees

Comments

@cbdavis
Copy link

cbdavis commented Sep 2, 2013

For background, I'm using stable/7 from github:
Driver: 07.00.3203 OpenLink Virtuoso ODBC Driver
OpenLink Interactive SQL (Virtuoso), version 0.9849b.

I'm running into an issue where if I sort the results of a query, I'm seeing the values for rdfs:label appear with the wrong URIs. When I don't sort, the correct values are returned. The URIs have the same values for some of their properties, which may be causing this issue.

A minimal example that can duplicate the bug is a named graph containing only this data:

@prefix rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix a:  <http://enipedia.tudelft.nl/wiki/> .
@prefix rdfs:   <http://www.w3.org/2000/01/rdf-schema#> .
@prefix prop:   <http://enipedia.tudelft.nl/wiki/Property:> .
@prefix cat:    <http://enipedia.tudelft.nl/wiki/Category:> .
a:Ahmedabad_Ashima_Powerplant   rdf:type    cat:Powerplant ;
    rdfs:label  "Ahmedabad Ashima Powerplant" ;
    prop:Latitude   23.0333 ;
    prop:Longitude  72.6167 .
a:Ahmedabad_Electro_Melt_Powerplant rdf:type    cat:Powerplant ;
    rdfs:label  "Ahmedabad Electro Melt Powerplant" ;
    prop:Latitude   23.0333 ;
    prop:Longitude  72.6167 .
a:Arvind_Intex_Powerplant   rdf:type    cat:Powerplant ;
    rdfs:label  "Arvind Intex Powerplant" ;
    prop:Latitude   23.0333 ;
    prop:Longitude  72.6167 .

The error can be seen by running this query:

PREFIX cat: <http://enipedia.tudelft.nl/wiki/Category:>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
select * where {
  ?ppl rdf:type cat:Powerplant .
  ?ppl rdfs:label ?name .
} order by ?ppl
@indeyets
Copy link
Contributor

indeyets commented Sep 3, 2013

@cbdavis please edit the issue, so that the query is wrapped in triple-backtics. see markdown docs

@ghost ghost assigned iv-an-ru Oct 21, 2013
@abarton
Copy link

abarton commented Jan 30, 2014

I'm experiencing the same issue. I'm running Version: 07.00.3203, Build: Aug 3 2013. The problem exists through the SPARQL endpoint or ODBC driver.

This is a high impact bug over any result set needing partitioning without ambiguous ordering.

@cbdavis
Copy link
Author

cbdavis commented Jun 4, 2014

I've just installed the latest version from the stable/7 branch on github (Virtuoso version 07.10.3207 on Linux (x86_64-unknown-linux-gnu), Single Server Edition), and this issue seems to be fixed now.

@abarton
Copy link

abarton commented Jun 11, 2014

I'm unable to reproduce with Version: 07.10.3207.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants