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:

INSERT DATA {
    GRAPH <http://www.foo.org/test> {
        :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:

DELETE {
graph <http://www.foo.org/test> {
        ?s ?p ?o.
        ?p rdfs:range ?r }
}
INSERT { graph <http://www.foo.org/test> {
        ?s ?p ?o2.
        ?p rdfs:range xsd:long }
}
WHERE {
    graph <http://www.foo.org/test> {
        {
            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)
        }
}

Hi,

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?

Jess

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.impl.ConnectionCommand.call(ConnectionCommand.java:87)
	at com.complexible.stardog.cli.CLIBase.execute(CLIBase.java:55)
	at com.complexible.stardog.cli.CLI.main(CLI.java:110)
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(BaseHttpClient.java:567)
	at com.complexible.stardog.protocols.http.client.BaseHttpClient.execute(BaseHttpClient.java:385)
	at com.complexible.stardog.protocols.http.client.HttpClientImpl.update(HttpClientImpl.java:270)
	at com.complexible.stardog.protocols.http.client.HttpConnection._update(HttpConnection.java:184)
	at com.complexible.stardog.api.impl.AbstractConnection.executeUpdate(AbstractConnection.java:484)
	at com.complexible.stardog.api.impl.UpdateQueryImpl.execute(UpdateQueryImpl.java:42)
	at com.complexible.stardog.api.impl.UpdateQueryImpl.execute(UpdateQueryImpl.java:22)
	at com.complexible.stardog.cli.impl.QueryWithOutput.writeOutput(QueryWithOutput.java:155)
	at com.complexible.stardog.cli.impl.Query.execute(Query.java:90)
	at com.complexible.stardog.cli.impl.ConnectionCommand.call(ConnectionCommand.java:75)
	... 2 more
Caused by: com.complexible.stardog.StardogException: There was an error while creating a new query plan
	at com.complexible.stardog.ErrorCodes.parseToThrowable(ErrorCodes.java:59)
	at com.complexible.stardog.protocols.http.client.BaseHttpClient.checkResponseCode(BaseHttpClient.java:534)
	... 11 more