openlink / virtuoso-opensource

Virtuoso is a high-performance and scalable Multi-Model RDBMS, Data Integration Middleware, Linked Data Deployment, and HTTP Application Server Platform
https://vos.openlinksw.com
Other
857 stars 210 forks source link

simplistic SPARQL distinct not distinct?!? #282

Open joernhees opened 9 years ago

joernhees commented 9 years ago
SELECT DISTINCT ?o WHERE {
 <http://dbpedia.org/resource/Lumberton,_North_Carolina> <http://www.w3.org/2003/01/geo/wgs84_pos#lat> ?o .
}

returns the same literal twice: (link)

<sparql xmlns="http://www.w3.org/2005/sparql-results#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/sw/DataAccess/rf1/result2.xsd">
 <head>
  <variable name="o"/>
 </head>
 <results distinct="false" ordered="true">
  <result>
   <binding name="o"><literal datatype="http://www.w3.org/2001/XMLSchema#float">34.6272</literal></binding>
  </result>
  <result>
   <binding name="o"><literal datatype="http://www.w3.org/2001/XMLSchema#float">34.6272</literal></binding>
  </result>
 </results>
</sparql>

aggregates over such distinct sub-queries seem to be influenced as well :-/

kidehen commented 9 years ago

On 1/7/15 1:18 PM, Jörn Hees wrote:

SELECT DISTINCT ?o WHERE { http://dbpedia.org/resource/Lumberton,_North_Carolina http://www.w3.org/2003/01/geo/wgs84_pos#lat ?o . }

returns the same literal twice: (link http://dbpedia.org/sparql?default-graph-uri=&qtxt=SELECT+DISTINCT+%3Fo+WHERE+%7B%0D%0A+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2FLumberton%2C_North_Carolina%3E+%3Chttp%3A%2F%2Fwww.w3.org%2F2003%2F01%2Fgeo%2Fwgs84_pos%23lat%3E+%3Fo+.%0D%0A%7D%0D%0A&format=application%2Fsparql-results%2Bxml&timeout=0&debug=on)

34.6272 34.6272

aggregates over such distinct sub-queries seem to be influenced as well :-/

— Reply to this email directly or view it on GitHub https://github.com/openlink/virtuoso-opensource/issues/282.

Yes, but take a look at: http://dbpedia.org/resource/Lumberton,_North_Carolina, the geo:lat relation has two objects and http://dbpedia.org/describe/?uri=http%3A%2F%2Fdbpedia.org%2Fresource%2FLumberton%2C_North_Carolina .

There is a fundamental issue with the data, and it could be from the dump loaded :(

Regards,

Kingsley Idehen Founder & CEO OpenLink Software Company Web: http://www.openlinksw.com Personal Weblog 1: http://kidehen.blogspot.com Personal Weblog 2: http://www.openlinksw.com/blog/~kidehen Twitter Profile: https://twitter.com/kidehen Google+ Profile: https://plus.google.com/+KingsleyIdehen/about LinkedIn Profile: http://www.linkedin.com/in/kidehen Personal WebID: http://kingsley.idehen.net/dataspace/person/kidehen#this

joernhees commented 9 years ago

hmm, interesting: the results in the links you provided seem to have higher precision... why isn't that returned via sparql as well?