[redland-dev] [Redland librdf RDF API 0000407]: ORDER BY does not appear to handle undefined values correctly

Mantis Bug Tracker mantis-bug-sender at librdf.org
Tue Dec 21 15:45:14 CET 2010


The following issue has been SUBMITTED. 
====================================================================== 
http://bugs.librdf.org/mantis/view.php?id=407 
====================================================================== 
Reported By:                vermonster
Assigned To:                
====================================================================== 
Project:                    Redland librdf RDF API
Issue ID:                   407
Category:                   query engine
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2010-12-21 14:45
Last Modified:              2010-12-21 14:45
====================================================================== 
Summary:                    ORDER BY does not appear to handle undefined values
correctly
Description: 
According to the SPARQL spec, 

SPARQL ... fixes an order between some kinds of RDF terms that would not
otherwise be ordered:

(Lowest) no value assigned to the variable or expression in this solution. 
Blank nodes 
IRIs 
RDF literals 

However, I am noticing if I do a SPARQL query where I specify ORDER BY (?x), and
?x is defined using an OPTIONAL clause, so it is not always bound, then the
tuples for which ?x is undefined always appear first in the SPARQL output,
irrespective of whether I do an ORDER BY (?x) or ORDER BY DESC(?x).  

If I do an ORDER BY ?x, then they should appear first; if I do an ORDER BY
DESC(?x), then they should appear last.

Steps to Reproduce: 
Please see description.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-12-21 14:45 vermonster     New Issue                                    
======================================================================



More information about the redland-dev mailing list