Now fixed.

The fix is in ARQ. As you are working from Fuseki trunk, I did an ad hoc build of Jena so the snapshot artifacts are up-to-date with this fix. Just "mvn dependency:resolve" and rebuild.

        Andy

On 31/10/12 20:38, Andy Seaborne wrote:
 > Is this a bug in the later versions of Fuseki?

Hmm ... yes, it appears it's a bug in general update processing.

The bug occurs in Jena 2.7.4 but not in Jena 2.7.3

Simpler case: the WITH and USING aren't relevant.

INSERT DATA { <x:s> <x:p> "OLD" } ;

DELETE { <x:s> <x:p> "OLD" }
INSERT { <x:s1> <x:p1> "NEW" }
WHERE { [] ?p ?o }

update --file FILE --dump
==>

Output Jena 2.7.3:
<x:s1> <x:p1> "NEW" .

Output Jena 2.7.4:
<x:s1> <x:p1> "OLD" .


Recorded as JENA-343

     Andy

On 31/10/12 19:15, Elli Schwarz wrote:
Hello,

I'm using the latest version of Fuseki checked out from the trunk
(revision 1404232), and I noticed the following issue.
I uploaded the following triples to a named graph <urn:test:foo>:

<urn:test:subj> <urn:test:pred1> _:b0;
                            <urn:test:pred2>
"foo"^^<http://www.w3.org/2001/XMLSchema#string> .
_:b0 <urn:test:pred3> "from blank
node"^^<http://www.w3.org/2001/XMLSchema#string> .


I can then run this query, which will return correct results:

select * from <urn:test:foo>
where {
    <urn:test:subj> <urn:test:pred1> [
        <urn:test:pred3> ?obj
     ].
}

It correctly returns  "from blank
node"^^<http://www.w3.org/2001/XMLSchema#string>  bound to ?obj.
However, if I use this same graph pattern in the following SPARQL
Update script:
with <urn:test:new>
insert { <urn:test:newSubj> <urn:test:newPred> ?obj . }
using <urn:test:foo> where {
    <urn:test:subj> <urn:test:pred1> [
             <urn:test:pred3> ?obj
     ].
}
I would expect that the named graph <urn:test:new> would contain the
following triple:
<urn:test:newSubj> <urn:test:newPred> "from blank
node"^^<http://www.w3.org/2001/XMLSchema#string>

But <urn:test:new> is empty! If I replace the [] notation with a
variable (?foo in the following query), the Update script works
correctly:
with <urn:test:new> insert {   <urn:test:newSubj> <urn:test:newPred>
?obj . }
using <urn:test:foo> where {
<urn:test:subj> <urn:test:pred1> ?foo .
  ?foo   <urn:test:pred3> ?obj .
}


I would expect both Update scripts to perform identically, since my
understanding is that the [] notation is a shorthand for my second
Update script with the explicit variable. Furthermore, if I run this
same query in the 0.2.4 release of Fuseki, everything works correctly
- the [] notation works in the Update script. Is this a bug in the
later versions of Fuseki? Incidentally, the version of Fuseki I'm
using has one modification - I added the Larq dependency to the Fuseki
pom so I could use Lucene indexing. I didn't make any other changes to
Fuseki, so while I guess it is possible that this problem could be
related to the addition of the Larq dependency, I highly doubt that my
problem has to do with it.


Thank you,
Elli



Reply via email to