test(sqlite): add regression test for ORDER BY + LIMIT nullability (#4147)#4223
Open
barry3406 wants to merge 1 commit intolaunchbadge:mainfrom
Open
test(sqlite): add regression test for ORDER BY + LIMIT nullability (#4147)#4223barry3406 wants to merge 1 commit intolaunchbadge:mainfrom
barry3406 wants to merge 1 commit intolaunchbadge:mainfrom
Conversation
Covers the scenario from launchbadge#4147 where ORDER BY + LIMIT routes data through an ephemeral sorter table. Verifies NOT NULL columns keep their constraint, and nullable columns stay nullable. This already passes on main (the 0.9 explain rewrite fixed it), but there was no test guarding against regression.
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.
Adds a regression test for #4147 —
query_as!incorrectly inferredTEXT NOT NULLas nullable when the query includedORDER BY ... LIMIT.The root cause was that ORDER BY + LIMIT routes data through an ephemeral sorter table, and the old explain analysis lost NOT NULL constraints through the round-trip. This is already fixed on main (the 0.9 explain rewrite handles it correctly), but there was no test covering this specific combination.
The new test verifies:
All 30 describe tests pass.