Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FC-1437: fix/query limit #207

Merged
merged 2 commits into from
Oct 13, 2022
Merged

FC-1437: fix/query limit #207

merged 2 commits into from
Oct 13, 2022

Conversation

zonotope
Copy link
Contributor

@zonotope zonotope commented Oct 13, 2022

Previously queries including orderBy clauses that were executed with the "simple subject crawl" strategy applied the offset before ordering but applied the limit after, causing them to be applied out of order. This patch applies both operations post ordering and ensures that the limit is applied after the offset.

Copy link
Contributor

@cap10morgan cap10morgan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔢

(vec (take limit sorted)))))
(into []
(comp (drop offset)
(take limit))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Boy these transducer comps always look backwards to me. But because it looks backwards, it must be right! ;)

@zonotope zonotope merged commit 3906fe6 into main Oct 13, 2022
@zonotope zonotope deleted the fix/query-limit branch October 13, 2022 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants