Repository navigation
Filter a table by any single-table condition before a comma join to close #2916 - #2918
Merged
Merged
Conversation
…lose #2877 and close #2791 (#2683) Since DEFAULT can be used as a name, `UPDATE t SET a = DEFAULT` and `INSERT INTO t VALUES (DEFAULT, ...)` read it as a column named `default`. UPDATE wrote undefined and INSERT threw a TypeError. The grammar now reads DEFAULT on its own in SET and in VALUES as a DefaultValue node. UPDATE writes the column default (NULL when the column has none), and INSERT leaves the column out so the table default fills it. A quoted [default] is still a column.
…-in function, as in 4.22.0
A correlated IN, NOT IN, ALL/ANY/SOME or EXISTS subquery in HAVING got the group row as its outer scope, so t1.a read from an undefined t1 and threw. These subqueries now get the group's source row, keyed by table alias, the same way a scalar subquery in HAVING already does. WHERE is unchanged.
Add INSERT ... SET, expression default, IDENTITY and NOT NULL test case as suggested in #2921.
…ed into its module
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
An error occurred while trying to automatically change base from
feature/rollup
to
main
November 19, 2026 18:40
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.
Closes #2916. A condition in WHERE that reads one table alone now filters that table before a comma join, whatever its operator (IN, OR, LIKE, BETWEEN, NOT, a comparison, a function of that table's columns, t1.a = t1.b). Before, only column = constant did (#2279), so a table filtered by IN or OR went into the join in full and the final WHERE ran on every combination of rows.
Seeded tables of 100 rows, each query capped at 60 seconds.
A join index is now cached on the table only when the table has no filter, because the cache key held the filter's code but not the parameter values, so a second run with other values reused the first run's index (already wrong for = ? in 4.22.0).
Found on the way and filed separately are #2917, #2919 and #2922.
Checks on 39f04ad. yarn test, 2531 pass, 213 skip, 0 fail. Parity against feature/rollup, 77,000 statements, 0 result differences apart from test2916's own second-run case and the fixed clock of test815, 12 generated-code differences where single-table conditions now compile to filters (test118-B, test128-B, test2916), API identical. test-perf-mini 98 against 4.22.0, nothing marked.