Hi all
I am supporting someone with an ONTOP implementation via the Protege plug-in. The data is mapped and we are now trying to translate some application-side SQL queries into SPARQL for testing and validation.
However, a seemingly simple query turned out to be unresolvable. We are not having luck trying to get results from a query of the form:
```
```
This is resulting in the error:
```
it.unibz.inf.ontop.exception.OntopReformulationException: it.unibz.inf.ontop.exception.MinorOntopInternalBugException: Was expecting RDF term type functional terms to have a variable as argument
[RDF_TYPE{0=xsd:decimal}(CASE5_UNORDERED(STRICT_EQ2(v2,"0"^^BIGINT),"0"^^BIGINT,STRICT_EQ2(v2,"1"^^BIGINT),"0"^^BIGINT,NULL))]
```
The lengths are all `xsd:decimal`, if that matters. The expected result for this example is `1` because we are dividing a sum by the same sum (that was bound in a subquery). (The actual query has a complex filter for which ?foo to get, which is a subset of all the ?foos, and therefore the expected result would be a fraction.)
Trying to create an MWE in RDF appears to work in a plain vanilla triplestore, but as ONTOP is a virtual layer over an SQL database this becomes difficult to debug. Would be really grateful for some pointers, thanks!
Example MWE data:
```
```