Repository navigation
fix(sql): reimplement hash MARK join for IN subqueries - #25822
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
27ee09d to
cbbd4ab
Compare
|
Review: request changes I still see one correctness blocker before this can be approved.
That means a query like Please derive hash-MARK eligibility from the same criterion used by |
47f4741 to
1f2c74c
Compare
|
Fixed in 1f2c74c. The reported correctness case now falls back to LoopJoin:
Regression coverage includes one hashable IN key plus Post-rebase validation passed: |
aptend
left a comment
There was a problem hiding this comment.
Reviewed the current head (cd7bdfb9) across planner selection, MARK three-valued semantics, normal/spill execution, operator duplication, remote serialization, and Reset/reuse lifecycle.
No merge-blocking findings. The affected package suite and focused hash MARK race tests pass locally; required CI checks are green.
LeftHandCold
left a comment
There was a problem hiding this comment.
Re-reviewed the latest head (ada8a80). The MARK join planner eligibility, three-valued semantics, spill/recursive-spill paths, state transfer, and reset handling are consistent. Targeted package tests, race test, build, and vet passed locally.
|
Self-review conclusion: APPROVE (code) — exact head GitHub does not allow the PR author to submit a formal approval review, so I am recording the exact-head decision here. Independent approval for this head is already present. I re-reviewed the complete diff from first principles across planner admission/fallback, SQL three-valued MARK semantics, normal build, forced spill and recursive re-spill, reset/reuse, duplicate and remote state transfer, FD ownership, mixed-version CN scheduling, and expression-depth/complexity bounds. I found no merge-blocking issue. Local validation on this head passed:
The first local run exposed only a temporary-worktree CGo rpath issue; rerunning with deterministic absolute rpaths passed. Required CI jobs are still running and remain the delivery gate, separate from the code-review conclusion. |
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #25821
Related: #12212
What this PR does / why we need it:
Reimplements the safe subset of hash MARK joins for
IN/NOT INsubqueries and removes linear-depth expression construction for largeINand row-comparison expansions.Correctness
Prepare, preventing unsupported plans from silently dropping predicates.Scalability
INand tuple subquery comparisons with order-preserving balanced trees.INalready uses SEMI join planning.Validation
TrackNullKeysround trip.TableColumnCountLimit(4096); depth is asserted at most 14.Commands run after the final semantic edit:
Both commands passed.
go buildandgo vetfor the modified plan/compile packages also passed, andgit diff --checkis clean.