Description
The ql:contains-word function rejects string literals that have an explicit ^^xsd:string datatype suffix, even though "text" and "text"^^xsd:string are semantically equivalent in SPARQL.
Query that fails
PREFIX ql: <http://qlever.cs.uni-freiburg.de/builtin-functions/>
SELECT * WHERE {
?text ql:contains-word "amsterdam"^^<http://www.w3.org/2001/XMLSchema#string> .
}
Expected behaviour
The query should work, treating "amsterdam"^^xsd:string the same as "amsterdam".
Context
This issue arises when using Comunica with initialBindings. Comunica's Traqula serializer adds explicit ^^xsd:string datatypes to bound string literals when re-serializing queries, which causes QLever to reject them.
Workaround
We're currently stripping the explicit datatype in our client before sending queries to QLever.