Hi Jindřich,

On 24-Nov-14 10:23 AM, Jindřich Mynarz wrote:
Hi,

every Virtuoso SPARQL endpoint now includes a checkbox called "Strict checking of void variables". Unfortunately, I haven't been able to find documentation describing what exactly this checkbox (or debug=on GET parameter) does. Can you please point me to its authoritative description?

My motivation: As others in the past (e.g., http://boards.openlinksw.com/support/viewtopic.php?f=12&t=1381) I have on numerous occasions encountered the "Virtuoso 37000 Error SP031: SPARQL compiler: Variable '_::trans_subj_XYZ is used in subexpressions of the query but not assigned" error when using SPARQL 1.1 property paths. With "Strict checking of void variables" turned off, this error goes away. I'd like to know what exactly is changed.

When "Strict checking of void variables" is checked, this means the SPARQL Compiler will check if all variables are declared, and if there are some of the variables that are not declared, an error will be raised.

For instance ( live link with checked "Strict checking of void variables" -- http://bit.ly/1zRdfnk):

select ?y
where
 {
  ?s ?p ?o
 }
will raise an error:

Virtuoso 37000 Error SP031: SPARQL compiler: Variable 'y' is used in the query result set but not assigned

which is correct since ?y is not declared in the WHERE clause.

As for the queries in http://boards.openlinksw.com/support/viewtopic.php?f=12&t=1381 I have being able to reproduce the issue with this one:

|define sql:signal-void-variables 1
SELECT DISTINCT  ?s  ?p  ?v  ?c  ?g
  FROM  <http://our_namespace/plugins/>
  FROM  <http://our_namespace/something/>
  WHERE
    {
      {
                                 ?s  ?p                      ?v       .
OPTIONAL { ?v <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?c } . OPTIONAL { GRAPH ?g { ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?v } }
      }                               .
      { SELECT  ?s
WHERE { <http://localhost:8000/11> <http://our_namespace/something_different/> ?s }
      }
    }

Live link: -- http://bit.ly/1HD3kXB

Here the last "SELECT" is redundant and can be replaced with plain triple,
i.e. if I change:
|
|{ SELECT  ?s
WHERE { <http://localhost:8000/11> <http://our_namespace/something_different/> ?s }
      }

to :

|
|{ ?s   ?p ?v .
<http://localhost:8000/11> <http://our_namespace/something_different/> ?s .
      }|

then I get no error -- live link: http://bit.ly/1zRfCGJ


I hope this helped.

Best Regards,
Rumi Kocis





Best,

Jindřich

--
Jindřich Mynarz
http://mynarz.net/#jindrich


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk


_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to