The Bounds object used by IntervalConstraintDescriptor to store the upper and lower bounds of a constraint stores the bounds as doubles. The IntervalConstraintDescriptor.resolve(...) method always uses SPDouble objects constructed from these bounds when slicing the stringpool. This makes it impossible to compare on datatypes derived from xsd:decimal (i.e. xsd:int, xsd:long, etc).
For instance, the following sequence of TQL commands produces no results:
create <rmi://localhost/server1#test>;
insert <test:foo> <rdf:value> '1'^^<http://www.w3.org/2001/XMLSchema#int>
into <rmi://localhost/server1#test>;
select $x from <rmi://localhost/server1#test> where
$x <mulgara:gt> '0'^^<http://www.w3.org/2001/XMLSchema#int> in <sys:xsd>;