From: Christian W. <cw...@cw...> - 2007-01-19 07:12:18
|
Hello all, The current memory-SparqlEngine implementation is somewhat wrong when it comes to OPTIONAL statements that do return no values for some variables. Let me explain: Query: PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?mbox ?name { ?x foaf:mbox ?mbox . OPTIONAL { ?x foaf:name ?name } . } Data: @prefix foaf: <http://xmlns.com/foaf/0.1/> . _:e foaf:mbox <mailto:ev...@ex...> . When querying, variable ?mbox is set but ?name is not, since it isn't in the database. The correct value of ?name in my eyes is NULL. SparqlEngine returns an empty string "" which is ambiguous. I opt for changing the unit tests and adapting the sparql engine. Any objections? --=20 Regards/Mit freundlichen Gr=C3=BC=C3=9Fen Christian Weiske |