-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Hi all,
I was implementing the support for !!
not-not, and noticed that the spec tests for it did not work on Comunica. I noticed that the definition of EBV had a breaking change between SPARQL 1.1 and SPARQL 1.2, introduced #265 .
Namely, SPARQL 1.1 says:
The EBV of any literal whose type is xsd:boolean or numeric is false if the lexical form is not valid for that datatype (e.g. "abc"^^xsd:integer).
While in 1.2 that rule no longer exists and instead a boolean or numeric evaluates to and error if the lexical form is not valid.
I assume this is intentional and have no issue with it, but maybe some stronger wording could be used in the list of changes between 1.1 and 1.2? (since this change does cause some queries (likely quite exotic onces, but still) to return less results.
(I know from talking to @rubensworks that he did not notice this side effect)
Example in the spec tests we have:
SELECT ?v ?ebv {
VALUES ?v { true 1 "a" false 0 "" "a"@en "z"^^xsd:boolean "2020-01-01T00:00:00Z"^^xsd:dateTime :a }
BIND(!!?v AS ?ebv)
}
The binding for ?v = "z"^^xsd:boolean
in 1.1:
?v = "z"^^xsd:boolean and ?v = "false"^^xsd:boolean
While in sparql 1.2 you only get:
?v = "z"^^xsd:boolean