tests: Introduce SQLancer++ and SQLancer DQP#34881
Merged
def- merged 2 commits intoMaterializeInc:mainfrom Mar 9, 2026
Merged
Conversation
a1969c9 to
b13ece6
Compare
47b8ebf to
6bcb6a4
Compare
c2b116d to
e45e4be
Compare
bb22dbc to
0d97ac4
Compare
ggevay
added a commit
that referenced
this pull request
Mar 8, 2026
) Fixes MaterializeInc/database-issues#10067. (And unblocks #34881) The problem was that we were simply always statically allowing subqueries in the `ExprContext` in `sql_impl`. This meant that we allowed subqueries there even if an outer context (such as the `SET` part of an `UPDATE`) didn't allow it. This PR fixes this by passing in the outer context, and inheriting whether that allows subqueries. (Unfortunately, the error msg didn't come out nice, see the issue that is linked from the slt.) Edit: The second commit tweaks how we handle errors in `generate_column_casts`. The issue was that that function relied on the buggy behavior of `sql_impl` that allowed subqueries without regard to the outer context, so that it can catch subqueries specifically by `lower_uncorrelated`. So, I've now had to explicitly make the outer context allow subqueries, so that `lower_uncorrelated` can keep catching it.
Contributor
|
#34892 has been merged now. |
Contributor
Author
|
New status: Blocked on https://github.com/MaterializeInc/database-issues/issues/11219 after rebase :D I'll probably to bisect that later. |
9983d6c to
8418bf3
Compare
antiguru
pushed a commit
to antiguru/materialize
that referenced
this pull request
Mar 26, 2026
…erializeInc#34892) Fixes MaterializeInc/database-issues#10067. (And unblocks MaterializeInc#34881) The problem was that we were simply always statically allowing subqueries in the `ExprContext` in `sql_impl`. This meant that we allowed subqueries there even if an outer context (such as the `SET` part of an `UPDATE`) didn't allow it. This PR fixes this by passing in the outer context, and inheriting whether that allows subqueries. (Unfortunately, the error msg didn't come out nice, see the issue that is linked from the slt.) Edit: The second commit tweaks how we handle errors in `generate_column_casts`. The issue was that that function relied on the buggy behavior of `sql_impl` that allowed subqueries without regard to the outer context, so that it can catch subqueries specifically by `lower_uncorrelated`. So, I've now had to explicitly make the outer context allow subqueries, so that `lower_uncorrelated` can keep catching it.
antiguru
pushed a commit
to antiguru/materialize
that referenced
this pull request
Mar 26, 2026
This is based on Gabor's PR MaterializeInc#34892. I'll rebase with only the second commit after it's been merged. ### Checklist - [ ] This PR has adequate test coverage / QA involvement has been duly considered. ([trigger-ci for additional test/nightly runs](https://trigger-ci.dev.materialize.com/)) - [ ] This PR has an associated up-to-date [design doc](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/design/README.md), is a design doc ([template](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/design/00000000_template.md)), or is sufficiently small to not require a design. <!-- Reference the design in the description. --> - [ ] If this PR evolves [an existing `$T ⇔ Proto$T` mapping](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/command-and-response-binary-encoding.md) (possibly in a backwards-incompatible way), then it is tagged with a `T-proto` label. - [ ] If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label ([example](MaterializeInc/cloud#5021)). <!-- Ask in #team-cloud on Slack if you need help preparing the cloud PR. --> - [ ] If this PR includes major [user-facing behavior changes](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/guide-changes.md#what-changes-require-a-release-note), I have pinged the relevant PM to schedule a changelog post.
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.
This is based on Gabor's PR #34892. I'll rebase with only the second commit after it's been merged.
Checklist
$T ⇔ Proto$Tmapping (possibly in a backwards-incompatible way), then it is tagged with aT-protolabel.