Skip to content

ql:contains-word rejects string literals with explicit xsd:string datatype #2688

@ddeboer

Description

@ddeboer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions