rdf4j
rdf4j copied to clipboard
Deprecate SPARQLQueryRenderer for removal
The SPARQLQueryRenderer is incomplete and outputs incorrect results for common queries. There does not seem to be any documentation of what subset of the query language that is supported and there are no errors to indicate that the output is incomplete.
Examples
GROUP BY
Input
select (count(*) as ?cnt) (sample(?s) as ?sample)
where {
?s ?p ?o.
} group by ?o
Output
select ?cnt ?sample
where {
?s ?p ?o.
?s bind( as ?cnt).
bind(?s as ?sample).
}
Nested SELECT
Input
select *
where {
{
select ?s where {
?s ?p ?o
} LIMIT 1
}
?s a ?o.
}
Output
select ?s ?o ?s
where {
?s ?p ?o.
?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?o.
}
limit 1
VALUES
Input
select * where {
VALUES ?c {1 2 3}
?a <http://example.org/number> ?c
}
Output
select ?c ?a
where {
?a <http://example.org/number> ?c.
}