Re: SPARQL Update 1.1 review part1

Hi Andy,

On Tue, Feb 15, 2011 at 11:58 AM, Andy Seaborne
<andy.seaborne@epimorphics.com> wrote:
> Can we have some test cases for this?  because the details matter :-)
>
> Presumably shape matters:
>
> DELETE
>  { _:a :p 12 .
>    _:a :q ?o .
>  }
> WHERE {?s :r ?q OPTIONAL { ?q :s ?o } }
>
> Is the expectation that the delete stage effectively use the template as a
> second round of pattern matching?  I'm assuming it's not on a per-triple
> basis (as CONSTRUCT eliminates triples with unbounds).

I presuming that the above operation should result in the removal of
the triple from the following dataset?
{
:x :p 12
}

I had originally thought that the query could be translated into
something like this:

DELETE{
  ?tmp_a :p 12 .
  ?tmp_a :q ?o .
}
WHERE {
  ?s :r ?q OPTIONAL { ?q :s ?o }
  ?tmp_a :q ?o .
  ?tmp_a ?tmp_b ?tmp_c
}

But that doesn't work, since the lack of bindings for ?o will prevent
anything from happening. I *think* that the correct equivalent would
be:

DELETE{
  ?tmp_a :p 12 .
  ?tmp_a :q ?o .
}
WHERE {
  ?s :r ?q OPTIONAL { ?q :s ?o }
  ?tmp_a ?tmp_b ?tmp_c
  OPTIONAL { ?tmp_a :q ?o }
}

Do others agree?


> I hope the document will point out the difference in behaviour to CONSTRUCT
> and INSERT.

I need to figure out the details correctly before I can adequately
describe the differences.

Regards,
Paul Gearon

Received on Thursday, 17 February 2011 16:43:22 UTC