sage-org / sage-client

🦄 JS client for evaluating SPARQL queries against a SaGe server
MIT License
3 stars 5 forks source link

Mathematical and logical operations not supported #4

Closed Rintarou closed 6 years ago

Rintarou commented 6 years ago

When running queries that contain mathematical operations (=,+,-,*,...); most notably the queries from the project-expression/ folder, of the w3c SPARQL 1.1 compliance benchmark

we obtain empty invalid results:

<?xml version="1.0" encoding="UTF-8"?>
<sparql xlmns="http://www.w3.org/2005/sparql-results#">
  <head>
    <variable name="x"/>
    <variable name="y"/>
    <variable name="z"/>
    <variable name="eq"/>
  </head>
  <results>
    <result>
      <binding name="x">
        <uri/>
      </binding>
      <binding name="y">
        <uri/>
      </binding>
      <binding name="z">
        <uri/>
      </binding>
      <binding name="eq">
        <uri/>
      </binding>
    </result>
</results>
</sparql>

There is no current support for queries of the following form:

projeprefix ex: <http://www.example.org/schema#>
prefix in:  <http://www.example.org/instance#>

select ?x ?y ?z ((?y = ?z) as ?eq) where {
  ?x ex:p ?y .
  ?x ex:q ?z
}

altough this issue affects project-expression most evidently, but this kind of mathematical operator is used widely across the w3c benchmark, so it is rather relevant.

corentinmrnn commented 6 years ago

Math operations are handled, tests including math ops that still fail are the result of other unhandled operations