Repository navigation
Conversation
SPARQL leaves solution order unspecified without ORDER BY, so LIMIT/OFFSET pages may skip or repeat a root between requests. selectByClass now ends in ORDER BY ?root, and ItemSelector and SparqlItemSelector document that a paginated query needs a total order over its projected variables.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SparqlItemSelectorpages withLIMIT/OFFSET, but SPARQL leaves solution order unspecified withoutORDER BY. An endpoint that answers two pages in different orders can skip a root, and under a rebuild a skipped root counts as deleted. Nothing in the selector told a caller this, andselectByClassitself had noORDER BY.This PR takes option 1 from the issue:
selectByClassnow ends inORDER BY ?‹rootVariable›.ItemSelector,SparqlItemSelectorandSparqlItemSelectorOptions.querysays that a paginated query needs a total order over its projected variables. The same note is now indocs/reference/pipeline.mdanddocs/reference/search-pipeline.md.ORDER BY, so copying one gives you a correct selector.A new test checks that the selector keeps a query’s
ORDER BYon every page, not just the first.Your comment on the issue measured option 2 (inject an
ORDER BYautomatically) as free on a 17574-root class. I left it out of this PR; it can follow separately if you still want it.Fixes #760