Replies: 1 comment 1 reply
-
Fuseki (actually ARQ - the query engine) is failing to apply step 3 after step 2 has happened. On the second part - SPARQL allows for extensions where error happens in minimal spec-complete SPARQL. Normally, Fuseki is running SPARQL 1.1+extensions. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
so my team and I had a long discussion about casting bool to numerics in SPARQL and how to correctly implement it. For reference we checked to see what Fuseki does and found that it does not fit with any of our interpretations.
Our first interpretation is when implementing XPath: https://www.w3.org/TR/xpath-functions/#casting-across-hierarchy would suggest that
SELECT xsd:positiveInteger("true"^^xsd:boolean) WHERE {}
should return"1"^^xsd:positiveInteger
as step 3 requires down casting to the requested type. In Fuseki however it returns"1"^^xsd:integer
. Note, that the same does not happen when castingxsd:int -> xsd:unsignedInt
for example, that cast returnsxsd:unsignedInt
directly and notxsd:integer
.Our second interpretation is that when not implementing all of XPath and instead just implementing SPARQL: https://www.w3.org/TR/sparql11-query/#FunctionMapping would suggest that the same query should return an error since the constructor is not defined in SPARQL.
It would be highly appreciated if you could share your thoughts on this behaviour, just to double check that neither Fuseki nor us is misinterpreting the standard. Thanks :)
Beta Was this translation helpful? Give feedback.
All reactions