Repository navigation
test: add fuzzer correlated subquery cases - #27779
Open
mohammadnaqvi04 wants to merge 2 commits into
Open
mohammadnaqvi04 wants to merge 2 commits into
mohammadnaqvi04 wants to merge 2 commits into
Conversation
mohammadnaqvi04
marked this pull request as ready for review
November 28, 2026 20:49
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.
Which issue does this PR close?
Part of #5492.
Rationale for this change
Step 1 of the plan on #5492 is a tests-only PR with the catalog shapes, the issue repros and the cases the fuzzer found, each with its reference answer. #26904 added the first two to
subquery_decorrelation.slt. This adds the cases @jayzhan211's fuzzer found, so later PRs for the general rule have them to check against.What changes are included in this PR?
Adds 11 queries to the end of
subquery_decorrelation.slt, taken from a rerun of the fuzzer onmain. Each one covers a kind of failing query the file didn't previously cover, such as grouping sets, sorting and limits inside a subquery, and lateral joins with non-equality correlations. Three cases record a bug that has no issue yet, where a subquery fails to plan when a derived table inside it gives a new column the same name as the column its correlated filter reads.What is the testing strategy for this PR?
This file passes on
main, and--completeleaves it unchanged. Every expected answer comes from DuckDB 2.0.1 and matches SQLite, with theLATERALand grouping sets queries rewritten into SQLite syntax.Are there any user-facing changes?
No, this only adds tests.
AI Usage
AI was used during development of this PR, primarily to help review the test suite and verify test cases against the DB binaries.