The complete case of
SES-1000 should include also INSERT. For purposes of
SES-1000 I removed INSERT part as it was not necessary for test case.
Therefore the problem of this issue is following query :
INSERT
{
GRAPH <
http://www.some.com/context>
{
?thing my:counter ?counter
}
}
WHERE
{
SERVICE <
http://localhost:8080/openrdf-sesame/repositories/repo>
{
SELECT ?thing (COUNT(?thing2) AS ?counter) WHERE
{
?thing foo:predicate ?thing2
} GROUP BY ?thing
}
}
Modified issue title and description to fit the actual problem. Issue is not really related to
SES-1000.
The cause of the NPE appears to be that for update operations, the source string of the original query/update is not set. This source string is used by the SERVICE expression to build up a new remote query to send to the remote endpoint. Possible fix is a parser adaptation to make sure the source string property is set for updates as well.
Turns out actual cause is that source string is set on the ASTUpdateSequence, but ASTServiceGraphPattern tries to read it from ASTOperationContainer. Fixed by delegating getSourceString in ASTUpdateContainer to parent node.
fixed by delegating getSourceString in ASTUpdateContainer to the parent node (a ASTUpdateSequence).