STRDT not working on INSERT

While manipulating data in a named graph I discovered that changing the type of a literal with STRDT is not working correctly.
Given the following data:

    GRAPH <> {
        :i :p "123"^^xsd:integer . 
        :p rdfs:range xsd:integer

The following DELETE/INSERT combination should switch the range as well as all assertions into xsd:long. This fails for the assertions:

graph <> {
        ?s ?p ?o.
        ?p rdfs:range ?r }
INSERT { graph <> {
        ?s ?p ?o2.
        ?p rdfs:range xsd:long }
    graph <> {
            SELECT ?p {
                ?x ?p ?y.
                FILTER(datatype(?y) = xsd:integer)
                FILTER (?y > 10)
        ?s ?p ?o .
        ?p rdfs:range ?r
        BIND(STRDT(STR(?o), xsd:long) AS ?o2)


Try using xsd:long as a casting function:

BIND(xsd:long(STR(?o)) AS ?o2)

Ok, I replaced the BIND clause with the one you provided. Unfortunately I get the following on execution:
Failed to run query: 00UOE2. There was an error while creating a new query plan (not implemented).

(Stardog server 7.0.3)

Hi Thorsten,

Can you share the error from the stardog.log file on your server?


When I run: ./stardog query my graph long-query.sparql -v
I get:

The detailed stack trace for the error is:
com.complexible.stardog.cli.CliException: There was an error while creating a new query plan
	at com.complexible.stardog.cli.CLIBase.execute(
	at com.complexible.stardog.cli.CLI.main(
Caused by: com.complexible.stardog.protocols.http.client.BaseHttpClient$HttpClientException: There was an error while creating a new query plan
	at com.complexible.stardog.protocols.http.client.BaseHttpClient.checkResponseCode(
	at com.complexible.stardog.protocols.http.client.BaseHttpClient.execute(
	at com.complexible.stardog.protocols.http.client.HttpClientImpl.update(
	at com.complexible.stardog.protocols.http.client.HttpConnection._update(
	at com.complexible.stardog.api.impl.AbstractConnection.executeUpdate(
	at com.complexible.stardog.api.impl.UpdateQueryImpl.execute(
	at com.complexible.stardog.api.impl.UpdateQueryImpl.execute(
	at com.complexible.stardog.cli.impl.QueryWithOutput.writeOutput(
	at com.complexible.stardog.cli.impl.Query.execute(
	... 2 more
Caused by: com.complexible.stardog.StardogException: There was an error while creating a new query plan
	at com.complexible.stardog.ErrorCodes.parseToThrowable(
	at com.complexible.stardog.protocols.http.client.BaseHttpClient.checkResponseCode(
	... 11 more