RDFLib/rdflibissueplayground — Issue #30: Sorted results are not passed to Graph.query()
Author: gjhiggins
Created: 2012-02-20 05:28:44+00:00
State: open
Labels: closed

christop...@gmail.com, 2011-02-06T13:00:44.000Z
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.

Comment 1 by gromgull
Hmm - I do not know about this. I guess the topUnion feature is there for a reason - just removing it might break something for someone?

Pending http://code.google.com/p/rdflib/issues/detail?id=158 and issue 24 I might change all of this code.

Comment 2 by gromgull
I believe raeed62790543 fixed this.