Hi all,
I've been using the recent fixes to ARQ (made in JENA-954) around rendering
SPARQL queries and have encountered another problem where a valid query
appears to roundtrip to an invalid one.
The problematic query is this:
SELECT ?obs
WHERE {
?obs a qb:Observation ;
qb:measureType ?measure ;
?measure ?value ;
.
}
GROUP BY ?obs
HAVING (COUNT(?value) > 1)
Which generates this SSE:
(project
(?obs)
(filter
(> ?.0 1)
(group
(?obs)
((?.0
(count ?value)))
(bgp
(triple ?obs <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <
http://purl.org/linked-data/cube#Observation>)
(triple ?obs <http://purl.org/linked-data/cube#measureType>
?measure)
(triple ?obs ?measure ?value)))))
But when round tripped back into SPARQL with OpAsQuery.asQuery, leads to
this invalid query:
SELECT ?obs
WHERE
{ ?obs <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> qb:Observation .
?obs qb:measureType ?measure .
?obs ?measure ?value
FILTER ( ?.0 > 1 )
}
GROUP BY ?obs
R.