dydra / support

4 stars 1 forks source link

Preserve argument datatype in numeric functions #28

Open knoan opened 9 years ago

knoan commented 9 years ago

The following returns xsd:integer

select (datatype(round(1.5)) as ?t) {}

while according to SPARQL/XSD standards the datatype of the argument (xsd:decimal) should be preserved.

The same applies to ceil and floor.

lisp commented 9 years ago

we promote values according to their native representation, which means, the result in this case is an integer. what is the use case which requires preserving the original type?

knoan commented 9 years ago

No immediate use case: just reporting the possible conformance issue.