[redland-dev] [Rasqal RDF Query Library 0000354]: Comparing xsd:int and xsd:integer fails in SPARQL

Mantis Bug Tracker mantis-bug-sender at librdf.org
Mon Feb 22 15:52:52 CET 2010


The following issue has been SUBMITTED. 
====================================================================== 
http://bugs.librdf.org/mantis/view.php?id=354 
====================================================================== 
Reported By:                lmazuel
Assigned To:                
====================================================================== 
Project:                    Rasqal RDF Query Library
Issue ID:                   354
Category:                   query engine
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Query Language:             SPARQL 
====================================================================== 
Date Submitted:             2010-02-22 14:52
Last Modified:              2010-02-22 14:52
====================================================================== 
Summary:                    Comparing xsd:int and xsd:integer fails in SPARQL
Description: 
Suppose this triple:
<http://test.com#123> <http://test.com#val>
"42"^^<http://www.w3.org/2001/XMLSchema#int> .

All theses SPARQL queries have to give a positive result:
SELECT ?x WHERE { ?x <http://test.com#val> ?y. FILTER( ?y > 40 ). }
SELECT ?x WHERE { ?x <http://test.com#val> ?y. FILTER( ?y >
"40"^^<http://www.w3.org/2001/XMLSchema#integer> ). }
SELECT ?x WHERE { ?x <http://test.com#val> ?y. FILTER( ?y >
"40"^^<http://www.w3.org/2001/XMLSchema#int> ). }

However, there is no results for any of these queries.

Using this triple:
<http://test.com#123> <http://test.com#val>
"42"^^<http://www.w3.org/2001/XMLSchema#integer> .

Only the two first gives the attended result.

Considering SPARQL recommendation, auto-casting from "int" to "integer" is
correct for numeric operators:
http://www.w3.org/TR/rdf-sparql-query/#operandDataTypes
http://www.w3.org/TR/rdf-sparql-query/#OperatorMapping

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-02-22 14:52 lmazuel        New Issue                                    
2010-02-22 14:52 lmazuel        Query Language            => SPARQL          
======================================================================



More information about the redland-dev mailing list