how does one reconcile delete-using-02.ru to the effect of from/from-named with respect to a constant graph term

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

how does one reconcile delete-using-02.ru to the effect of from/from-named with respect to a constant graph term

james anderson-19
good afternoon;

for the test dawg-delete-using-02a, the query[1] and the ancillary dataset documents imply that the constant value in a ‘using' clause should override a constant term in a ‘graph' clause.
the comment in the manifest[2] reiterates this conclusion and a note during the approval process indicates the effect of the ‘using’ clause was a matter of specific deliberation.
on the other hand, this behavior contradicts the sparql evaluation specification[3] among other ways, in the interaction between default and named graphs, and the update recommendation itself provides only the description, that the using is to have the effect of a from/from-named

is there some other version or some further explanation for this test?

best regards, from berlin,

[1] : http://www.w3.org/2009/sparql/docs/tests/data-sparql11/delete/delete-using-02.ru
[2] : http://www.w3.org/2009/sparql/docs/tests/data-sparql11/delete/manifest.ttl
[3] : http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#defn_evalGraph
Reply | Threaded
Open this post in threaded view
|

Re: how does one reconcile delete-using-02.ru to the effect of from/from-named with respect to a constant graph term

Andy Seaborne-4
On 18/05/15 16:27, james anderson wrote:
> good afternoon;
>
> for the test dawg-delete-using-02a, the query[1] and the ancillary
> dataset documents imply that the constant value in a ‘using' clause
> should override a constant term in a ‘graph' clause.

Hi james,

It would be helpful if you could provide pointers or quotes that lead
you to the conclusions you state.

The USING , USING NAMED describe a dataset for the WHERE part. They do
not override GRAPH which remains an accessor of named graphs in the dataset.

USING <http://example.org/g3>

so the default graph has the contents of <http://example.org/g3> and
there are no named graphs.

It does not override the GRAPH use in the pattern - GRAPH still accesses
a named graph as before.  In this case, the

GRAPH <http://example.org/g2>

isn't going to match - there is no <http://example.org/g2> in the
dataset - and the DELETE part will make no changes.

Section 3.1.3
"""
The USING and USING NAMED clauses affect the RDF Dataset used while
evaluating the WHERE clause. This describes a dataset in the same way as
FROM and FROM NAMED clauses describe RDF Datasets in the SPARQL 1.1
Query Language.
"""

Section 4.2.3 Dataset
"""
DS is distinguished from GS as they may differ, for instance, due to the
use of USING [NAMED] to modify DS.
"""


so in the same way

SELECT *
FROM <http://example.org/g3>
WHERE { GRAPH <http://example.org/g2> { ?s ?p ?o } }

has no matches, not does the pattern part of:

DELETE  ...
USING <http://example.org/g3>
WHERE
{
   GRAPH <http://example.org/g2> { :a foaf:knows ?s .
                                   ?s ?p ?o }
}


> the comment in the manifest[2] reiterates this conclusion and a note
> during the approval process indicates the effect of the ‘using’
> clause was a matter of specific deliberation.

> on the other hand, this behavior contradicts the sparql evaluation
> specification[3] among other ways,

[3] does not mention FROM.

> in the interaction between default
> and named graphs, and the update recommendation itself provides only
> the description, that the using is to have the effect of a
> from/from-named
>
> is there some other version or some further explanation for this
> test?
>
> best regards, from berlin, — [1] :
> http://www.w3.org/2009/sparql/docs/tests/data-sparql11/delete/delete-using-02.ru
>
>
[2] :
http://www.w3.org/2009/sparql/docs/tests/data-sparql11/delete/manifest.ttl
> [3] :
> http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#defn_evalGraph
>

Reply | Threaded
Open this post in threaded view
|

Re: how does one reconcile delete-using-02.ru to the effect of from/from-named with respect to a constant graph term

james anderson-19
good morning;

> On 2015-05-20, at 16:06, Andy Seaborne <[hidden email]> wrote:
> Subject: Re: how does one reconcile delete-using-02.ru to the effect of from/from-named with respect to a constant graph term
> Date: Mon, 18 May 2015 21:23:41 +0100
> From: Andy Seaborne <[hidden email]>
> To: [hidden email]
>
> On 18/05/15 16:27, james anderson wrote:
>> good afternoon;
>>
>> for the test dawg-delete-using-02a, the query[1] and the ancillary
>> dataset documents imply that the constant value in a ‘using' clause
>> should override a constant term in a ‘graph' clause.
>
> Hi james,
>
> It would be helpful if you could provide pointers or quotes that lead
> you to the conclusions you state.

i find this entry in the delete test set manifest:

:dawg-delete-using-02a a mf:UpdateEvaluationTest ;
    mf:name    "Simple DELETE 2 (USING)" ;
    rdfs:comment "This is a simple test to make sure the GRAPH clause does not override the USING clause" ;
    dawgt:approval dawgt:Approved;
    dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-09-25#resolution_3> ;
    mf:action [ ut:request <delete-using-02.ru> ;
                ut:data <delete-pre-01.ttl> ;
                ut:graphData [ ut:graph <delete-pre-02.ttl> ;
                               rdfs:label "http://example.org/g2" ] ;
                ut:graphData [ ut:graph <delete-pre-03.ttl> ;
                               rdfs:label "http://example.org/g3" ]
              ] ;
    mf:result [ ut:data <delete-post-01f.ttl> ;
                ut:graphData [ ut:graph <delete-post-02f.ttl> ;
                               rdfs:label "http://example.org/g2" ] ;
                ut:graphData [ ut:graph <delete-post-03f.ttl> ;
                               rdfs:label "http://example.org/g3" ]
              ] .

best regards, from berlin,
---
[1] : http://www.w3.org/2009/sparql/docs/tests/data-sparql11/delete/manifest.ttl
---
james anderson | [hidden email] | http://dydra.com






Reply | Threaded
Open this post in threaded view
|

Re: how does one reconcile delete-using-02.ru to the effect of from/from-named with respect to a constant graph term

Gregg Kellogg-3
> On May 20, 2015, at 3:26 PM, james anderson <[hidden email]> wrote:
>
> good morning;
>
>> On 2015-05-20, at 16:06, Andy Seaborne <[hidden email]> wrote:
>> Subject: Re: how does one reconcile delete-using-02.ru to the effect of from/from-named with respect to a constant graph term
>> Date: Mon, 18 May 2015 21:23:41 +0100
>> From: Andy Seaborne <[hidden email]>
>> To: [hidden email]
>>
>> On 18/05/15 16:27, james anderson wrote:
>>> good afternoon;
>>>
>>> for the test dawg-delete-using-02a, the query[1] and the ancillary
>>> dataset documents imply that the constant value in a ‘using' clause
>>> should override a constant term in a ‘graph' clause.
>>
>> Hi james,
>>
>> It would be helpful if you could provide pointers or quotes that lead
>> you to the conclusions you state.
>
> i find this entry in the delete test set manifest:
>
> :dawg-delete-using-02a a mf:UpdateEvaluationTest ;
>    mf:name    "Simple DELETE 2 (USING)" ;
>    rdfs:comment "This is a simple test to make sure the GRAPH clause does not override the USING clause" ;
>    dawgt:approval dawgt:Approved;
>    dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-09-25#resolution_3> ;
>    mf:action [ ut:request <delete-using-02.ru> ;
>                ut:data <delete-pre-01.ttl> ;
>                ut:graphData [ ut:graph <delete-pre-02.ttl> ;
>                               rdfs:label "http://example.org/g2" ] ;
>                ut:graphData [ ut:graph <delete-pre-03.ttl> ;
>                               rdfs:label "http://example.org/g3" ]
>              ] ;
>    mf:result [ ut:data <delete-post-01f.ttl> ;
>                ut:graphData [ ut:graph <delete-post-02f.ttl> ;
>                               rdfs:label "http://example.org/g2" ] ;
>                ut:graphData [ ut:graph <delete-post-03f.ttl> ;
>                               rdfs:label "http://example.org/g3" ]
>              ] .

Hi James, I think the results are consistent with the graph name remaining constant. The input dataset ends up looking like the following:

@prefix : <http://example.org/> .
@prefix foaf:       <http://xmlns.com/foaf/0.1/> .

:a foaf:name "Alan"; foaf:mbox "[hidden email]"; knows :b .
:b foaf:name "Bob"; foaf:mbox "[hidden email]" .

:g2 {
  :a foaf:knows :b .
  :b foaf:name "Bob"; foaf:mbox "[hidden email]"; foaf:knows :c .
  :c foaf:name "Chris"; foaf:mbox "[hidden email]" .
}

:g3 {
  :c foaf:name "Chris"; foaf:mbox "[hidden email]"; foaf:knows :d .
  :d foaf:name "Dan"; foaf:mbox "[hidden email]" .
}

The results are identical because USING establishes to take triples from :g3 but the GRAPH restricts triples to come from :g2, so no solutions are bound, therefore, no triples are deleted.

Gregg

> best regards, from berlin,
> ---
> [1] : http://www.w3.org/2009/sparql/docs/tests/data-sparql11/delete/manifest.ttl
> ---
> james anderson | [hidden email] | http://dydra.com
>
>
>
>
>
>