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

Always enable limit for combined queries #163

Open
wants to merge 2 commits into
base: azure-1.11
Choose a base branch
from

Conversation

gluk-w
Copy link

@gluk-w gluk-w commented May 7, 2018

# Let's say queryset consists of unions
qs = qs.union(...)
qs = qs.union(...)

# Let's say queryset returns 20 objects total
assert qs.count() == 20

# Works fine if offset is higher than zero because "OFFSET 1 ROWS FETCH FIRST 10 ROWS ONLY" is applied
assert len(list(qs[1:10])) == 10

# This fails without my fix because "OFFSET 0 ROWS FETCH FIRST 10 ROWS ONLY" is not applied
assert len(list(qs[0:10])) == 10

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.

1 participant