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 2015/12/14 23:28:46 UTC

[jira] [Comment Edited] (JENA-1092) WITH statement doesn't work

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

Andy Seaborne edited comment on JENA-1092 at 12/14/15 10:28 PM:
----------------------------------------------------------------

Using {{GRAPH}} is a safe workaround.  It looks like it is the {{WITH}} that is triggering something.



was (Author: andy.seaborne):
Using {{GRAPH}} is a safe workaround.  It looks like it is the {{WITH}} that triggering something.

> WITH statement doesn't work
> ---------------------------
>
>                 Key: JENA-1092
>                 URL: https://issues.apache.org/jira/browse/JENA-1092
>             Project: Apache Jena
>          Issue Type: Bug
>    Affects Versions: Jena 3.0.1
>         Environment: Ubuntu 12.04
> java version "1.8.0_66"
>            Reporter: Osma Suominen
>            Assignee: Andy Seaborne
>
> I found a possible problem with WITH statements in SPARQL Update queries. They do not seem to affect the INSERT clause in the expected way. The behaviour appears to have changed since Jena 3.0.0.
> To reproduce:
> 1. Start Fuseki 1.3.1:
> ./fuseki-server --update --mem /ds
> 2. Create a triple in the <http://example.com/> graph:
> {noformat}
> PREFIX ex: <http://example.com/>
> INSERT DATA { GRAPH ex: { ex:s ex:p ex:o }}
> {noformat}
> 3. Run an update query using WITH:
> {noformat}
> PREFIX ex: <http://example.com/>
> WITH ex:
> INSERT { ex:s2 ex:p2 ex:o2 }
> WHERE { ?s ?p ?o }
> {noformat}
> 4. Check what you end up in the <http://example.com/> graph:
> {noformat}
> PREFIX ex: <http://example.com/>
> SELECT * WHERE { GRAPH ex: { ?s ?p ?o }}
> {noformat}
> Result:
> {noformat}
> ----------------------
> |   s  |   p  |   o  |
> ======================
> | ex:s | ex:p | ex:o |
> ----------------------
> {noformat}
> I would expect there to be the other triple {{ex:s2 ex:p2 ex:o2}} too, but apparently that ends up in the default graph instead.
> When using Fuseki 1.3.0 I get both triples in the <http://example.com/> graph, which I think is the correct behaviour.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)