Order of numeric values

I try to get results ordered by an integer variable (in numerical order), but Stardog always sorts alphabetically.

SELECT ?x (DATATYPE(?x) AS ?dt)
WHERE {
VALUES ?x {-100 -2 0 2 100} #expected order
} ORDER BY ?x

gives:

x dt
0 xsd:integer
2 xsd:integer
100 xsd:integer
-100 xsd:integer
-2 xsd:integer

Magnus,

Thanks for reporting this. We will fix it before the next release. One workaround would be to set memory.management=JVM in stardog.properties file in your $STARDOG_HOME.

Thanks,
Pavel

Upon further investigation it's not really an alphabetical ordering, the problem is incorrect handling of negative numbers. This is about to be fixed in the development branch and will be in the next release.

Thanks for the concise bug report,
Pavel

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.