Repository navigation
Read outer pagination from set-operation queries - #724
Open
pengpengyi92 wants to merge 1 commit into
Open
pengpengyi92 wants to merge 1 commit into
pengpengyi92 wants to merge 1 commit into
Conversation
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.
limit_and_offsetdescends into the first SELECT even when the AST root is aset operation. This reports a branch's pagination instead of the outer one:
Treat
exp.SetOperationlikeexp.Selectwhen choosing the pagination owner.The existing fallback and non-set-operation behavior are deliberately unchanged;
this is not a general rewrite of nested-query LIMIT semantics.
Added 10 cases across UNION, UNION ALL, INTERSECT and EXCEPT, either limited
branch, repeated property access, zero limit and omitted offset. Before the fix:
10 failed, 12 passed in the focused module. Full suite after the fix:
302 passed, 100% coverage. Mypy and Ruff lint pass. Full-file formatter checks
report existing unrelated differences, not new formatting changes.
AI-assisted with OpenAI Codex; no independent human review is claimed.