Aklakan opened a new issue, #3028: URL: https://github.com/apache/jena/issues/3028
### Version 5.4.0-SNAPSHOT ### What happened? `LATERAL` with `SERVICE` sends non-standard SPARQL making use of `LET` to the remote target. Not sure whether this is a conceptual issue of [SEP-0007](https://github.com/w3c/sparql-dev/blob/main/SEP/SEP-0007/sep-0007.md) or an implementation issue in Jena. ```java // TestQueryExecution.java @Test public void lateral_with_service() { // Register a custom service handler to capture the // algebra of what is being executed. ServiceExecutorRegistry reg = new ServiceExecutorRegistry(); Op[] executedOpHolder = {null}; reg.addSingleLink((opExecute, opOriginal, binding, execCxt, chain) -> { executedOpHolder[0] = opExecute; return QueryIterRoot.create(execCxt); }); String qsReport = """ PREFIX eg: <http://www.example.org/> SELECT * { BIND(eg:MyClass AS ?t) LATERAL { SERVICE <urn:my:service> { { SELECT * { ?s a ?t } LIMIT 2 } } } } """; QueryExec.dataset(DatasetGraphFactory.empty()) .query(qsReport) .set(ARQConstants.registryServiceExecutors, reg) .table(); Op executedOp = executedOpHolder[0]; Query executedQuery = OpAsQuery.asQuery(executedOp); System.out.println("Query:"); System.out.println(executedQuery); System.out.println(); System.out.println("Algebra:"); System.out.println(executedOp); } ``` ## Output Query: ```sparql SELECT * WHERE { SERVICE <urn:my:service> { SELECT * WHERE { ?s a <http://www.example.org/MyClass> LET (?t := <http://www.example.org/MyClass>) } LIMIT 2 } } ``` Algebra: ```lisp (service <urn:my:service> (slice _ 2 (assign ((?t <http://www.example.org/MyClass>)) (bgp (triple ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.example.org/MyClass>))))) ``` ### Relevant output and stacktrace ```shell ``` ### Are you interested in making a pull request? None -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
