[redland-dev] OPTIONAL strangeness

Dave Beckett dave.beckett at bristol.ac.uk
Thu Jun 23 14:17:14 BST 2005


On Thu, 2005-06-23 at 13:14 +0200, Danny Ayers wrote:
> Either I still don't get OPTIONAL or there's something odd going on
> (Rasqal 0.9.10). I'm in a rush to get something finished, haven't got
> a test case, but here's an example of something I didn't expect:

Maybe I should say I don't entirely trust the query engine
implementation of optional - others have reported similar things.

I will shortly be ripping out the core of the engine to do it a
different way and in order to handle nested {}s and UNION (gack!).

> This gives me 10 results:
> 
> SELECT * WHERE { 
>  ?agent foaf:weblog ?blog . 
>  ?blog rdfs:seeAlso ?channel . 
> } 
> LIMIT 10 
> 
> This gives me zero results:
> 
> SELECT * WHERE { 
>  ?agent foaf:weblog ?blog . 
>  ?blog rdfs:seeAlso ?channel . 
>  OPTIONAL { ?channel rss:title ?name } . 
> } 
> LIMIT 10 
> 
> This gives me 10 results:
> 
> SELECT * WHERE { 
>  ?agent foaf:weblog ?blog . 
>  ?blog rdfs:seeAlso ?channel . 
>  ?channel rss:title ?name  . 
> } 
> LIMIT 10 

I tried it before lunch and could get this response.  But now, it just
gives a python error.

> The query form/data I'm using is at http://pragmatron.org/query.html

I think I really need the data to debug this.

Dave




More information about the redland-dev mailing list