Re: [Owlim-discussion] DELETE WHERE query behaviour

2012-09-18 Thread damyan

Hi Jerven,

you are right.

looking further - it seems that it was an issue with the Sesame 2.6.6 - 
http://www.openrdf.org/issues/browse/SES-1047

and luckily,  it has been resolved in 2.6.7.

just checked the current behavior using Jeni's queries on owlim-se 
5.2.+sesame 2.6.8 and it works right, according to the cited working 
draft - e.g. does not clear repository contents.


So to Jeni - I recommend either upgrading to Sesame 2.6.7 or get/request 
a new Owlim build that is bundled with Sesame 2.6.8, since there were 
small API changes to Sesame 2.6.8 that makes it incompatible with the 
older Owlim releases.


Regards,
Damyan Ognyanov
Ontotext AD

On 9/18/2012 1:33 PM, Jerven Bolleman wrote:

Hi Damyan,

Hmm, this looks odd to me because in the CONSTRUCT case
the triple pattern with unbound values does not get generated.

i.e.
CONSTRUCT { ?a ?p ?o} where {?s ?p ?o}
produces no new triples
So I would expect
DELETE DATA { ?a ?p ?o} where {?s ?p ?o}
to not delete any triples.

There is also a part in the sparql update 1.1. current last working 
draft which supports this belief.[1]
"If any solution produces a triple containing an unbound  variable or 
an illegal RDF construct, such as a literal in a subject or predicate 
position, then that triple is not included in the output RDF graph."

This language was not in the May 2011 draft.

Regards,
Jerven

[1] http://www.w3.org/TR/sparql11-update/#deleteInsert


On 09/18/2012 11:09 AM, damyan wrote:

Hi,

looks to me as 'expected behavior' - it is the OPTIONAL statement that
cause it - since it is not mandatory to produce a solution from the main
block of the query, you'll end up with no bindings for ?b ?p2 and ?o2 in
the projection so, then the DELETE part of the query will threat the
missing bindings as wildcards to issue individual 'remove' operations
for each such solution ...

HTH,
Damyan

On 9/18/2012 11:37 AM, Jeni Tennison wrote:

Hi,

I'm hoping someone here can help me with the following behaviour in
OWLIM that seems odd. I can't work out whether it's a bug in the query
or in OWLIM.

First, set up a couple of triples:

BASE 
INSERT DATA {
   GRAPH  {
.
.
   }
}

Then try to delete everything about  and everything about things
related to it through  (ie about , though note there are no
triples about ):

BASE 
DELETE {
?p1 ?o1 .
   ?b ?p2 ?o2 .
} WHERE {
?p1 ?o1 .
   OPTIONAL {
   ?b .
 ?b ?p2 ?o2 .
   }
}

When I run this update against this data, everything in the
triplestore gets deleted. Is this expected behaviour?

Thanks,

Jeni


___
Owlim-discussion mailing list
Owlim-discussion@ontotext.com
http://ontomail.semdata.org/cgi-bin/mailman/listinfo/owlim-discussion





___
Owlim-discussion mailing list
Owlim-discussion@ontotext.com
http://ontomail.semdata.org/cgi-bin/mailman/listinfo/owlim-discussion


Re: [Owlim-discussion] DELETE WHERE query behaviour

2012-09-18 Thread Jerven Bolleman

Hi Damyan,

Hmm, this looks odd to me because in the CONSTRUCT case
the triple pattern with unbound values does not get generated.

i.e.
CONSTRUCT { ?a ?p ?o} where {?s ?p ?o}
produces no new triples
So I would expect
DELETE DATA { ?a ?p ?o} where {?s ?p ?o}
to not delete any triples.

There is also a part in the sparql update 1.1. current last working 
draft which supports this belief.[1]
"If any solution produces a triple containing an unbound  variable or an 
illegal RDF construct, such as a literal in a subject or predicate 
position, then that triple is not included in the output RDF graph."

This language was not in the May 2011 draft.

Regards,
Jerven

[1] http://www.w3.org/TR/sparql11-update/#deleteInsert


On 09/18/2012 11:09 AM, damyan wrote:

Hi,

looks to me as 'expected behavior' - it is the OPTIONAL statement that
cause it - since it is not mandatory to produce a solution from the main
block of the query, you'll end up with no bindings for ?b ?p2 and ?o2 in
the projection so, then the DELETE part of the query will threat the
missing bindings as wildcards to issue individual 'remove' operations
for each such solution ...

HTH,
Damyan

On 9/18/2012 11:37 AM, Jeni Tennison wrote:

Hi,

I'm hoping someone here can help me with the following behaviour in
OWLIM that seems odd. I can't work out whether it's a bug in the query
or in OWLIM.

First, set up a couple of triples:

BASE 
INSERT DATA {
   GRAPH  {
.
.
   }
}

Then try to delete everything about  and everything about things
related to it through  (ie about , though note there are no
triples about ):

BASE 
DELETE {
?p1 ?o1 .
   ?b ?p2 ?o2 .
} WHERE {
?p1 ?o1 .
   OPTIONAL {
   ?b .
 ?b ?p2 ?o2 .
   }
}

When I run this update against this data, everything in the
triplestore gets deleted. Is this expected behaviour?

Thanks,

Jeni


___
Owlim-discussion mailing list
Owlim-discussion@ontotext.com
http://ontomail.semdata.org/cgi-bin/mailman/listinfo/owlim-discussion



--
---
 Jerven Bollemanjerven.bolle...@isb-sib.ch
 SIB Swiss Institute of Bioinformatics  Tel: +41 (0)22 379 58 85
 CMU, rue Michel Servet 1   Fax: +41 (0)22 379 58 58
 1211 Geneve 4,
 Switzerland www.isb-sib.ch - www.uniprot.org
 Follow us at https://twitter.com/#!/uniprot
---
___
Owlim-discussion mailing list
Owlim-discussion@ontotext.com
http://ontomail.semdata.org/cgi-bin/mailman/listinfo/owlim-discussion


Re: [Owlim-discussion] DELETE WHERE query behaviour

2012-09-18 Thread damyan

Hi,

looks to me as 'expected behavior' - it is the OPTIONAL statement that 
cause it - since it is not mandatory to produce a solution from the main 
block of the query, you'll end up with no bindings for ?b ?p2 and ?o2 in 
the projection so, then the DELETE part of the query will threat the 
missing bindings as wildcards to issue individual 'remove' operations 
for each such solution ...


HTH,
Damyan

On 9/18/2012 11:37 AM, Jeni Tennison wrote:

Hi,

I'm hoping someone here can help me with the following behaviour in OWLIM that 
seems odd. I can't work out whether it's a bug in the query or in OWLIM.

First, set up a couple of triples:

BASE 
INSERT DATA {
   GRAPH  {
.
.
   }
}

Then try to delete everything about  and everything about things related to it through 
 (ie about , though note there are no triples about ):

BASE 
DELETE {
?p1 ?o1 .
   ?b ?p2 ?o2 .
} WHERE {
?p1 ?o1 .
   OPTIONAL {
   ?b .
 ?b ?p2 ?o2 .
   }
}

When I run this update against this data, everything in the triplestore gets 
deleted. Is this expected behaviour?

Thanks,

Jeni


___
Owlim-discussion mailing list
Owlim-discussion@ontotext.com
http://ontomail.semdata.org/cgi-bin/mailman/listinfo/owlim-discussion


[Owlim-discussion] DELETE WHERE query behaviour

2012-09-18 Thread Jeni Tennison
Hi,

I'm hoping someone here can help me with the following behaviour in OWLIM that 
seems odd. I can't work out whether it's a bug in the query or in OWLIM. 

First, set up a couple of triples:

BASE 
INSERT DATA {
  GRAPH  {
   .
   .
  }
}

Then try to delete everything about  and everything about things related to 
it through  (ie about , though note there are no triples about ):

BASE 
DELETE {
   ?p1 ?o1 .
  ?b ?p2 ?o2 .
} WHERE {
   ?p1 ?o1 .
  OPTIONAL {
  ?b .
?b ?p2 ?o2 .
  }
}

When I run this update against this data, everything in the triplestore gets 
deleted. Is this expected behaviour?

Thanks,

Jeni
-- 
Jeni Tennison
http://www.jenitennison.com

___
Owlim-discussion mailing list
Owlim-discussion@ontotext.com
http://ontomail.semdata.org/cgi-bin/mailman/listinfo/owlim-discussion