Skip to content

refactor(colexec): scope expression diagnostics to their subtrees - #31891

Merged
XuPeng-SH merged 3 commits into
mainfrom
codex/29249-contract-cleanup
Oct 30, 2026
Merged

XuPeng-SH merged 3 commits into
mainfrom
codex/29249-contract-cleanup

Conversation

@XuPeng-SH

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

Refs #29249

What this PR does / why we need it:

Expression executor construction mixes shared memo/activation accumulation with mutable diagnostic policy, restoring owners and guard depths through deferred closures. Pass diagnostic policy by value into each subtree and represent temporal ownership with three explicit modes. This removes the two depth counters and policy-restoration paths while keeping memo identities and borrowed probe activation references in their existing shared owner.

Preserve warning multiplicity, lazy branch activation, the distinct ELT overload rules, partial-construction cleanup and prepared-execution reset. Two lightweight behavioral tests cover sibling order, guarded selection, repeated evaluation and reset; both characterize the original builder, and independently removing either relevant guard makes its test fail.

Design contract at the reviewed revision. Design and final overall review used gpt-6.1-sol / max; final review reported no material blockers.

Validation on Darwin/arm64, Go 1.27.1, GOEXPERIMENT=simd, using the repository CGo wrapper and freshly built native prerequisites:

  • Full colexec, filter, hashbuild and hashjoin suites: 419 root tests passed in normal mode and with race, each with -count=1.
  • Two directly affected compiler tests passed in normal and race modes.
  • Existing real MySQL-protocol integration scenarios passed for explicit DECIMAL warning cardinality and temporal join ownership, including prepared reuse, inactive branches and nonmatching/empty joins.
  • Configured incremental molint plus golangci-lint formatting/vet/static checks across the affected package closure: 0 issues.
  • Five-sample local constructor benchmarks cover ordinary, owned-filter, build and probe modes: allocations/bytes are unchanged; median timings are approximately 4–6% lower. These measurements cover constructor cost only.

GitHub CI is pending.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@XuPeng-SH

XuPeng-SH commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

mo-bot review · mo-bot-local · done

Commit: a83a0bae68bb67d48228105913f3ddf1bf9e8ed2

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mo-bot review · mo-bot-local · review

Commit: a83a0bae68bb67d48228105913f3ddf1bf9e8ed2

Assessment: approve

The refactor preserves diagnostic scope, warning multiplicity, memo ownership and cleanup. No actionable findings remain.

Model: gpt-6-astra / xhigh

Session: 01a1869d-820c-7212-9788-aecfb86a4141 · slot 0 · generation 2

Validation:

  • Reviewed all five changed files, affected consumers, design and supplied discussion.

  • 419 root tests passed in both normal and race modes across colexec, filter, hashbuild and hashjoin, with -count=1 and supplied runtime isolation.

  • Test receipts: checks/1793358727733633753-4.json and checks/1793358838201072070-4.json; retained logs indexed in validation-summary.json.

  • Formatting, diff checks, frozen-source identity, native-input fingerprints and discussion coverage passed. Source remains unchanged.

  • Saved review-plan.md and discussion-assessment.json.

Limitations:

  • GitHub CI is queued in the frozen evidence snapshot.

  • Author-reported SQL integration and constructor benchmarks were not independently rerun.

@aunjgr aunjgr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the complete refactor and tests. By-value subtree policy preserves the old temporal and conditional activation rules, including distinct ELT overload handling, while leaving shared memo accumulation and cleanup ownership intact. Reused the exact-head CI and documented focused validation; no new local tests were run.

@XuPeng-SH

XuPeng-SH commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

mo-bot review · mo-bot-local · done

Commit: a83a0bae68bb67d48228105913f3ddf1bf9e8ed2

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mo-bot review · mo-bot-local · review

Commit: a83a0bae68bb67d48228105913f3ddf1bf9e8ed2

Assessment: approve

The refactor preserves subtree diagnostic rules, warning multiplicity, shared memo ownership, activation and cleanup. Reviewed the complete delta and affected consumers; no actionable findings remain.

Model: gpt-6-astra / xhigh

Session: 01a1869d-999c-7481-b340-ae4a63e8cee4 · slot 1 · generation 2

Validation:

  • Reconciled exact-head normal and race receipts and retained logs: 419 root tests passed in each mode across colexec, filter, hashbuild and hashjoin.

  • Source, native fingerprints, focused-test selection and all five discussion entries verified. Audit receipt: checks/1793367645922289901-2.json; log: evidence-audit.log.

  • Supplied exact-head CI reports successful build, UT, SCA, coverage and multi-CN BVT. Evidence indexed in validation-summary.json.

Limitations:

  • Reused matching execution evidence; no new Go tests were run.

  • SQL integration, mutation checks and constructor benchmarks remain author-reported; raw CI logs were not independently inspected.

@XuPeng-SH
XuPeng-SH merged commit 75e3964 into main Oct 30, 2026
12 checks passed
@XuPeng-SH
XuPeng-SH deleted the codex/29249-contract-cleanup branch October 30, 2026 13:56

This branch was previously deployed

1 inactive deployment
ci — 3c71b56f Deployed Oct 30, 2026 by XuPeng-SH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/refactor Code refactor size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants