You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (Jira)" <ji...@apache.org> on 2021/12/07 10:51:00 UTC

[jira] [Comment Edited] (JENA-2207) A SERVICE call involving a SELECT projection may generate illegal syntax

    [ https://issues.apache.org/jira/browse/JENA-2207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17454573#comment-17454573 ] 

Andy Seaborne edited comment on JENA-2207 at 12/7/21, 10:50 AM:
----------------------------------------------------------------

See code comment in PR :-) and the "{{if ( false )}}" block in {{Service.exec}}.

Rename used to be applied but got missed out in the reworked Service.java in 4.3.0.

It is easier said than done to avoid renaming. It risks contamination because the variable name may be used elsewhere.

The SERVICE block can still be specialised for outer defined variables in the query making the SERVICE call more specific. This then has small results, quicker - potentially important for remote services that restrictions and timeouts.

If substitution wasn't being done, using the original query syntax or unmodified algebra would be possible. (And IIRC as done in the earliest implementation.)

So short term - the PR puts back what should have been there and is the safest change. Long term, we can consider redesign.



was (Author: andy.seaborne):
See comment in PR :-) and the "{{if ( false )}}" block in {{Service.exec}}.

Rename used to be applied but got missed out in the reworked Service.java in 4.3.0.

It is easier said than done to avoid renaming. It risks contamination because the variable name may be used elsewhere.

The SERVICE block can still be specialised for outer defined variables in the query making the SERVICE call more specific. This then has small results, quicker - potentially important for remote services that restrictions and timeouts.

If substitution wasn't being done, using the original query syntax or unmodified algebra would be possible. (And IIRC as done in the earliest implementation.)

So short term - the PR puts back what should have been there and is the safest change. Long term, we can consider redesign.


> A SERVICE call involving a SELECT projection may generate illegal syntax
> ------------------------------------------------------------------------
>
>                 Key: JENA-2207
>                 URL: https://issues.apache.org/jira/browse/JENA-2207
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: ARQ, SPARQL
>    Affects Versions: Jena 4.3.0
>            Reporter: Andy Seaborne
>            Assignee: Andy Seaborne
>            Priority: Major
>             Fix For: Jena 4.4.0
>
>
> This is a regression in Jena 4.3.0.
> Example:
> {noformat}
> SELECT * {
>   SERVICE <http://localhost:3030/ds> {
>       SELECT ?s { ?s ?p ?o }
>   }
> }
> {noformat}
> will have a compiled inner pattern with {{?/p}} and {{?/o}}. The {{?p}} and {{?o}} variables were rewritten to hide them (they are not in the {{SELECT ?s}}).
> This rewrite needs to be reversed before sending the service-query.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)