gjhiggins/rdfextras — Issue #23: Sorted results are not passed to Graph.query()
Author: gjhiggins
Created: 2011-10-19 03:00:59+00:00
State: open

Originally filed by christop...@gmail.com on 2011-02-06T13:00:44

graph.Graph.query() from rdflib will pass the processor's result to the result plugin. Both components are provided by rdfextras.

When ordering (needs fix in issue 22) results the processors sorted result list is not passed to Graph.query().

In detail the query processor returns the following structure:

result,selectionF,allVars,orderBy,distinct,topUnion = qResult

(passed to SPARQLQueryResult.__init__())

"result" seems to include the sorted list of selected elements, while "topUnion" contains the whole unordered result set of all bound variables. See attached hacky fix how to circumvent this issue and pass on the sorted results as offered by the processor.