On 19/11/14 09:20, Dave Reynolds wrote:
On 19/11/14 05:41, Arthur Keen wrote:
When comparing 28 days to 1 month and 365 days to 1 year in Fuseki 1.1.1

SELECT ("P28D"^^<http://www.w3.org/2001/XMLSchema#duration>
="P1M"^^<http://www.w3.org/2001/XMLSchema#duration> as ?same) {}
--------
| same |
========
| true |
--------
SELECT ("P365D"^^<http://www.w3.org/2001/XMLSchema#duration>
="P1Y"^^<http://www.w3.org/2001/XMLSchema#duration> as ?same) {}
--------
| same |
========
| true |
--------
Shouldn't this be indeterminate in both cases?

xsd:duration was not a supported datatype in RDF 1.0 and isn't included
in the SPARQL 1.1 specification [1] so I wouldn't rely on behaviour here.

SPARQL 1.1 does allow = to be extended to other datatypes but as far as
I can see it doesn't specify how indeterminate values should be handled.

I see that RDF 1.1 does list xsd:duration as a supported datatype (!)
which seems like a terrible idea, no idea why they did that.

I can't speak for whether there is any intention for ARQ to support
xsd:duration fully.

ARQ supports xsd:duration using javax.xml.datatype.Duration.

P29D = P1M is correctly an indeterminant comparison but a a quick investigation suggests that javax... Duration.compare is returning the wrong answer for P28D but it might be garbage-in, garbage-out (i.e bad ARQ oproicessing).

Arthur - could you raise a JIRA please so this does not get forgotten?

Thanks

        Andy


Dave

[1] http://www.w3.org/TR/sparql11-query/#OperatorMapping

Reply via email to