Skip to content

[codex] fix(colexec): avoid speculative XFS join spill allocation - #30637

Merged
mergify[bot] merged 3 commits into
matrixorigin:mainfrom
iamlinjunhong:codex/issue-30544-xfs-spill
Oct 20, 2026
Merged

mergify[bot] merged 3 commits into
matrixorigin:mainfrom
iamlinjunhong:codex/issue-30544-xfs-spill

Conversation

@iamlinjunhong

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:

Fixes #30544

What this PR does / why we need it:

Join-spill appends can make XFS speculatively allocate beyond EOF. Disk admission tracks logical payload bytes, so automatic capacity refresh can mistake that extra allocation for outside disk consumption, shrink the active cap to current usage, and reject the next write.

Preextend the file to the admitted append end before writing, through a shared helper used by both initial hashbuild spill and probe/repartition bucket writes. Keep disk admission before extension and retain file/reservation ownership through terminal cleanup on errors. Budget policy, primary-key validation, and spill record format remain unchanged.

Validation

  • Owning packages: spillio, hashbuild, and spillutil passed through mo-cgo-test.
  • Current-main SQL: TestLoadRejectsDuplicatePrimaryKeys and TestHashBuildSharedBudgetRecoverySQL passed.
  • Added roundtrip/error, rejected-growth preservation, and cleanup tests. TestWritePreextendedXFSAllocation ran and passed on real Linux/XFS; it explicitly skips other filesystems.
  • Formatting, focused go vet, incremental golangci-lint, and diff checks passed.
  • Real-XFS reproduction and evidence: 400,000 unique composite-key rows, automatic spill budgeting, private XFS LOCAL storage, and real concurrent SQL capacity refresh. With identical input/settings, original code failed with requested=117712, used=115348584, limit=115348584 and rolled back; patched code imported all rows with correct checksums and complete disk/FD/file cleanup. Patched peak logical/allocated bytes were 176,386,048 / 176,664,576.

The causal SQL before/after used issue revision 65bcea5d to retain its original full-row LOAD plan. The affected production writer/native sources are identical at PR base 309f618995; current-main public regressions were tested separately because #30527 changed LOAD planning. This does not claim a replay of the original TPCH1000 run or an adjacent-commit bisect of #30421.

Performance

A bounded 64 KiB append microbenchmark measured median 29.35 µs before versus 32.87 µs after (~12% per-append overhead for the extra operations). Two complete SQL comparisons with enough disk space for both versions measured 1.593/1.418 s before versus 1.304/1.460 s after. No SQL slowdown was observed at this scale; large-scale throughput remains unmeasured.

Preextend admitted join-spill appends before writing so XFS does not reserve an uncharged speculative EOF tail. Preserve disk admission and terminal file ownership in both hashbuild and bucket recovery paths.

Validate with a 400,000-row real-XFS before/after reproducer for issue matrixorigin#30544, focused package and SQL regressions, and allocation/error-path tests.
@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 20, 2026 •

Copy link
Copy Markdown
Contributor

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

Commit: ef10036960a7d75edaa53bd5496502d2ddb64a21

Review completed. Read the assessment.

@XuPeng-SH

XuPeng-SH commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

mo-bot review · mo-bot-xupeng · superseded

Commit: ef10036960a7d75edaa53bd5496502d2ddb64a21

"interrupted"

@XuPeng-SH XuPeng-SH 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.

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

Commit: ef10036960a7d75edaa53bd5496502d2ddb64a21

Assessment: request_changes

The complete seven-file review found a coherent design and no confirmed implementation defect: the shared helper preserves existing admission, ownership, cleanup and spill-format contracts. Approval remains blocked by a material validation gap for the central XFS behavior.

Model: gpt-6-astra / xhigh

Session: 01a13dcf-1517-7f90-b3f9-c5f9f9e7031b · slot 0 · generation 1

  • P2 pkg/sql/colexec/spillio/append_linux_test.go:33: Validation requirement: repeated join-spill appends on XFS while concurrent statements refresh automatic spill capacity.
    Impact: The available execution evidence does not establish that preextension prevents speculative allocation and the resulting admission failure. Passing package tests can omit the filesystem-specific oracle.
    Evidence: The local run explicitly skipped TestWritePreextendedXFSAllocation on ext4. The passing SQL recovery test sets an explicit 1 GiB spill cap, so it does not validate automatic-capacity refresh. evidence.json.local_validation is empty; the PR body reports real-XFS success, but the referenced reproduction logs, commands and source fingerprints are absent from the frozen packet. Before approval, supply the already-reported non-skipped XFS test and failed-before/passed-after SQL artifacts, including filesystem/settings, source identity, terminal results and cleanup assertions. Matching retained evidence can close this requirement without repeating the runs.

Validation:

  • Reviewed every changed hunk and traced initial hashbuild, probe/repartition, admission, cancellation, error propagation, handoff and cleanup.

  • Preflight and fresh native build passed. Source and diagnostic checkout remained clean at the assigned head; native provenance and relevant source equivalence to the author's reproduction revision were checked.

  • spillio, hashbuild and spillutil passed: 321 tests/subtests passed, with only the XFS allocation test skipped.

  • TestHashBuildSharedBudgetRecoverySQL passed through the public SQL entry point with isolated runtime execution.

  • A diagnostic fault probe passed: successful extension followed by a rejected write preserves original bytes and leaves the extended tail, consistent with the callers' retained-reservation cleanup contract.

  • Commands, source fingerprints, exit receipts and retained logs were reconciled in /home/xupeng/.local/state/mo-bot/jobs/f18474e1146754dd3bf9914a/attempt-1/validation-audit.json.

Limitations:

  • Frozen CI metadata reports successful latest build, UT, SCA and BVT checks, but provides no test-level XFS execution evidence. Earlier canceled runs were not treated as product failures.

  • Preextension adds Seek and Truncate calls per physical spill append; non-spilling SQL is unaffected. The author's reported approximately 12% append overhead and SQL timings were not independently audited; large-scale throughput remains unmeasured.

Publish the non-skipped XFS writer run and automatic-capacity SQL before/after artifacts with source fingerprints, historical commands, cleanup assertions and execution receipts for PR matrixorigin#30637.
@matrix-meow matrix-meow added size/XL Denotes a PR that changes [1000, 1999] lines and removed size/M Denotes a PR that changes [100,499] lines labels Oct 20, 2026

@aptend aptend 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.

APPROVE at exact head b9510d5e10802c42f1d819ab228d8f76c4e48857, base/merge-base 309f618995af4ee23e3b9149365f4af77264090d.

Reviewed all23 files, prior review5580983721/discussion (no inline threads), and issue30544 plus its reproduction report. The implementation remains a focused append correction (~55 production lines), not a new spill policy/architecture requiring a design artifact.

Traced both initial hashbuild and probe/repartition writers through admission, exclusive non-O_APPEND EOF positioning, preextension/write, full-write metadata publication, reader/handoff, cancellation and terminal cleanup. Rejected admission cannot extend the file; truncate/partial-write failures retain the whole admitted reservation until the unpublished file is removed. Existing format, unique-key checks, budget limits and cleanup owners remain intact.

The prior XFS validation blocker is closed by the now-versioned evidence bundle, not merely by the author's claim:

  • Read manifests, launchers, diagnostic/shim, all six SQL excerpts and complete writer output; all15 SHA256SUMS entries verify. Three production-file and two test hashes match this checkout.
  • Production XFS allocation test actually PASSes three times, not SKIP.
  • Same400k-row workload on private real XFS with automatic initial cap201289728 and concurrent real SQL refresh: original gets used=limit115348584 admission failure/rollback; patched completes with exact row/checksum assertions. Disk/FD/file cleanup and usable-connection assertions precede diagnostic PASS.
  • Independently verified historical/current native, writer, filesystem-open and automatic-budget source equivalence relevant to the mechanism. The historical full-row LOAD reproduction is not mislabeled as current-main full-plan execution; current-base public regressions are separate.
  • Accepted disclosed cost:64KiB append median29.351→32.867us (~12%); the four completed roomier SQL samples establish neither stable speedup nor large-scale throughput.

Reused UT execution118445048943 (Linux amd64 Go1.27.1/CGo/race, including current LOAD duplicate/rollback controls), normal coverage report (exit0,81700 pass events), and SCA118445049152 (0 final issues). These ran at ef10036; the entire subsequent delta is archival documentation only, with production/tests/build inputs unchanged. Current pending checks are not counted as a pass. Local diff-check PASS; no redundant native/filesystem rerun or local test execution is claimed.

Audit Closure
Q1 File/reservation owner transfers on successful handoff; failures remain with bundle/writer cleanup; no second cleanup owner added.
Q2 Existing cancellation and same-lane exclusive I/O retained; no new worker/lock/wait cycle.
Q3 Preextension ends exactly at admitted payload end; conservative failure charge and existing bounded per-bucket tokens/cache retained.

No blocking finding. No original TPCH SF1000 replay, adjacent-commit bisect, arbitrary XFS-layout guarantee or fresh remote mount/image cleanup inspection is claimed. Review source and primary workspace untouched.

@XuPeng-SH

XuPeng-SH commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

mo-bot review · mo-bot-xupeng · superseded

Commit: b9510d5e10802c42f1d819ab228d8f76c4e48857

Review belongs to an older commit; it is not a review of the current head.

@XuPeng-SH

XuPeng-SH commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

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

Commit: b9510d5e10802c42f1d819ab228d8f76c4e48857

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH 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.

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

Commit: b9510d5e10802c42f1d819ab228d8f76c4e48857

Assessment: approve

Reviewed the complete 23-file delta and supplied review concerns. The shared helper fixes both join-spill writers while preserving admission, error cleanup, ownership and record format. The archived evidence closes the previous XFS validation gap. No actionable defects remain.

Model: gpt-6-astra / xhigh

Session: 01a13dcf-1586-7a01-9000-d45e20995cf8 · slot 1 · generation 1

Validation:

  • Independently verified all 15 archive checksums, production/test hashes, native-input equivalence and the documentation-only delta from the previously tested commit.

  • Reconciled nine retained command/source/exit receipts with log hashes. Reused 321 owning-package test/subtest passes, the SQL recovery regression and the extended-tail write-failure probe. The retained package run's XFS skip was explicitly excluded from XFS proof.

  • Archived XFS allocation tests passed three times. The automatic-capacity SQL control failed and rolled back; the patched run completed 400,000 rows with checksum, disk/FD/file cleanup and connection-reuse assertions.

  • Frozen current-head CI reports successful build, Ubuntu unit tests, static analysis, coverage and BVT checks.

  • Fresh evidence audit passed: checks/1792479000001573438-5.json, review-audit-2.log and review-audit.json under the assigned diagnostic directory. The initial audit rejected only a missing terminal newline in the supplied patch; normalization confirmed identical content. Source remained unchanged.

Limitations:

  • Runtime evidence was reused, not rerun. Historical XFS SQL uses the original LOAD plan; matching writer/budget/filesystem inputs establish applicability, with current-base SQL recovery validated separately.

  • SQL logs are diagnostic excerpts. Historical outer mount cleanup was not freshly inspected.

  • The append microbenchmark shows approximately 12% overhead. Two completed SQL comparison pairs show mixed timings; large-scale throughput, TPCH SF1000 and unusual XFS configurations remain unmeasured.

@mergify mergify Bot added the queued label Oct 20, 2026
@mergify

mergify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-20 06:52 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • ✅ Checks passed · in-place
  • ✅ Merged — 2026-10-20 09:08 UTC · at 0fb05134c76148fe7fd42a6bd54d37038df9510e · squash

This pull request spent 2 hours 15 minutes 53 seconds in the queue, including 1 hour 8 minutes 59 seconds running CI.

Required conditions to merge

@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.

APPROVE at b9510d5e10802c42f1d819ab228d8f76c4e48857 against current authoritative main's merge base.

This is a focused correction to the existing spill append mechanism, not a change to disk admission policy or spill format. Both initial HashBuild and probe/repartition writers admit the payload before extending EOF. Their actual filesystem owners open without O_APPEND and position reopened files at EOF, satisfying the shared helper's exclusive-append precondition. Overflow/seek/truncate/write errors propagate, short writes remain errors, and successful logical row/byte publication occurs only after a complete write.

Unhappy-path closure:

Contract Verified owner/terminal path
Q1: file and reservation ownership Existing bundle/BucketWriter owns unpublished files and conservative disk charges; physical descriptors close after each call, including truncate/write failure. Existing terminal handoff/cleanup retains effective ownership.
Q2: cancellation/waits Existing cancellation checks remain before admission and physical I/O; no new lock, goroutine, retry or cross-generation wait is introduced. Local filesystem syscalls retain their existing non-interruptible I/O boundary.
Q3: growth Extension is exactly the already-admitted append end; one growable reservation per file remains. Rejected growth cannot extend or overwrite the existing record.

Reviewed the complete production/test delta and the retained evidence bundle. All15 archive checksums and the five delivered writer/test source fingerprints match. Independently rechecked the empty native/writer-source diff between the historical causal SQL baseline and the PR base, so the real-XFS witness is applicable to this mechanism without mislabelling it a current-main full-row LOAD run. The retained writer test actually passed on Linux/XFS rather than skipping; the SQL fixture checks rollback/success, checksums, zero disk/FD/file residue and subsequent SQL usability. Current-base package/public LOAD controls and green exact-head CI supply separate integration evidence.

The measured extra append overhead and limited completed-SQL comparisons are honestly scoped. This does not certify a universal XFS allocation bound, original TPCH SF1000 replay or large-scale throughput. I reused the qualifying evidence and did not create a new filesystem image, run a remote workload or repeat the benchmark locally. No blocking finding.

@mergify
mergify Bot merged commit 0fb0513 into matrixorigin:main Oct 20, 2026
@mergify mergify Bot removed the queued label Oct 20, 2026
mergify Bot pushed a commit that referenced this pull request Oct 21, 2026
`FIELD` compared binary strings through Unicode case folding. For example, `FIELD(_binary X'FF', _binary X'FE', _binary X'FF')` returned 1 instead of 2. The proposed behavior compares raw bytes for a resolved binary subject, preserving text comparison, NULL handling, first-match ordering, and numeric dispatch.

The complete scope includes selector/relational declaration ownership, immutable prepared CASE type history, statement-wide numeric reprepare, cache admission, failure publication, retry, migration, ordinary SQL and expression DEFAULTs. Transport types, source domains, consumer comparison domains, and result declarations remain separate. History-bearing handles cannot migrate because the existing payload cannot preserve their history.

### Versioned design and authorization

- Frozen [D2 design](https://github.com/matrixorigin/matrixone/blob/f2b418d1bfe604a1825419b3abf6affe0f53d09b/docs/design/CLAUDE_PREPARED_FIELD_TYPE_HISTORY_DESIGN_D2.md) and [D3 counterexamples](https://github.com/matrixorigin/matrixone/blob/f2b418d1bfe604a1825419b3abf6affe0f53d09b/docs/design/CLAUDE_PREPARED_FIELD_TYPE_HISTORY_DESIGN_D3.md) retain their bytes and historical status.
- A **second** user `go ahead`, after retry/cost counterexamples were explained, selected fail-closed retry and optimization before delivery. The [decision record](https://github.com/matrixorigin/matrixone/blob/1e2475f09e161be79b59da277aaa9c9fd6284282/docs/design/CLAUDE_PREPARED_FIELD_TYPE_HISTORY_DECISIONS.md) preserves exact hashes, authorization provenance, alternatives and limits. The first authorization does not retroactively accept subsequently discovered risks.
- Review19 implementation checkpoint: `76ecbfcdbf`; historical validation source: `e89a5a65edf396d85ec5aa2e4ae6d1ff9e69b165` against `79298b10e2114246c6ef41bde709dbbb4a20bca4`.
- Review20 source: `8cc91d1ede8ff40fa4e2d8483c4f9773e512d1c3`, after merging fixed `mo/main` `743e749a1e33d6c845bb73999e8c82d297a2b657`. The full PR against that base is **40 files, 15 non-generated production Go files and 2,027 production changed lines**; this is not a one-line-cleanup review.
- Author authorization/self-review is **not independent reviewer approval**. CHANGES_REQUESTED reviews are not dismissed; the earlier missing-artifact concern is distinct from correctness/design approval.

### Implemented closure

1. History-bearing compile retry deep-captures catalog-generation facts and validates dependencies **before** rebinding with old history. Changed object/version/database/publication facts fail closed; resolution errors propagate. The error maps to **20631/HY000**, not MySQL 1615. Automatic driver reprepare is not promised. Unchanged dependencies preserve history; the next ordinary EXECUTE owns generation rebuilding/publication.
2. Ordinary TEXT binding uses a stateless proof from authoritative declarations and existing forwarding contracts. Prepared/default/provenance/ambiguous projection paths retain the full resolver. TABLE_SCAN projections require a matching TEXT self-reference; no persistent memo or extra producer whitelist is introduced.
3. Actual `Compile.clear()` clears `buildPlanFunc`; intentionally cached `Release` retains retry capability. Deterministic private-clear tests do not inspect pooled objects or depend on GC.
4. **Review20 corrects the previous blanket “genuine CASE” exclusion.** A selected VARCHAR paired with a weaker binary literal must remain character-oriented (`"你a"`: length 2, reverse `61E4BDA0`), including expression DEFAULTs. CASE/IF is not universally transparent: real binary columns, equal-rank binary contributors, explicit BINARY/NULL casts, COLLATE and allocating-result owners remain boundaries. Existing witness traversal now carries binding-local rank/owner facts, not retained expression graphs, persisted flags or per-row traversal. Numeric roles reuse `IntegerArgumentTarget`, preserving upstream TIMESTAMPADD SECOND fractional normalization.
5. **23 DEFAULT controls** retain actual CREATE TABLE, original→whole-plan-copy equality, wire roundtrip/copy, actual Eval and full-expression immutability. Numeric DEFAULT targets, NULL/empty values and genuine binary owners are covered; the original LPAD control was not weakened.

### Validation and explicit limits

The [validation record](https://github.com/matrixorigin/matrixone/blob/8cc91d1ede8ff40fa4e2d8483c4f9773e512d1c3/docs/design/CLAUDE_PREPARED_FIELD_TYPE_HISTORY_VALIDATION.md), especially **section 8**, documents final-source inputs, commands, counterexamples, failure generations, coverage and public-result review. Earlier sections retain their original source attribution.

- Go1.27.1, darwin/arm64, verified native provenance and bounded parallelism. One complete final-source five-package atomic run passed: planner/frontend/compile/function/AST. Changed executable coverage: **35/36=97.2% this round**, **1011/1086=93.1% full PR**. Vet passed; new-diff golangci-lint reported **0 issues**. Molint exited 0 with **22 existing owner/source-equivalent diagnostics**, not zero diagnostics or an executed baseline lint run. Supported prebuilt-native service build passed.
- Original dtype expectations passed **93/93 before generation**. New SQL's **21 rows** matched independent MySQL byte-for-byte; result changes were reviewed before normal comparisons. Final single-CN normal runs: dtype **104/104 twice**, history **492/492 twice**, FIELD **97/97**, variadic **104/104**, TimestampAdd **99/99**. All seven reports have zero failures/ignored/abnormal and empty error files. Dtype retains strict `@metacmp(true)` (SQL > document > global); its existing MULTICN section is preserved but not claimed executed. The owned service/ports and temporary databases were cleaned up.
- **Known numeric-DEFAULT boundary:** with the original `_binary ''` fallback, selected non-NULL text now returns 2 in actual DML. A NULL row selecting the empty fallback still fails with 20203 instead of MySQL's 0. A full fixed-upstream Go overlay independently reproduces the empty-string-to-int failure in IF and COALESCE; setup/build failures are not counted as semantic evidence. The public mixed-NULL table uses independently checked `_binary '0'` (2/0/1), while the original failure, MySQL 2/0/0, current negative probe and original empty-literal non-NULL regression remain preserved. Changing that fallback is **not** a claim that the original NULL failure is fixed.
- Failed candidates remain classified: declaration/COLLATE/LPAD counterexamples, an F public DEFAULT failure despite F's earlier green suites, and G's first low-disk spill-budget failure. Cache cleanup occurred only after confirming no users/open files, recovering about 53GiB; the unchanged resource test and a fresh complete five-package run then passed. No quota/assertion was weakened or failed profile stitched into acceptance.
- **Historical review19 measurements, not new G measurements:** five exact lifecycle tests each passed 100 race repetitions; complete frontend/compile race passed 28.064s/16.777s. Depth32 binder medians were **206127 → 319042 → 214939 ns/op**, approximately **96.1 → 160.0 → 96.1 KB/op**, **1209 → 1485 → 1209 allocations**. The approximately 63.9KB/276-allocation excess was removed, but timing remained **+4.3% over upstream**, not parity. First-bind/type-progress/numeric-mode/CTE/dependency-count evidence retains its original scope; dependency facts are not a byte quota or whole-statement linearity proof. No new performance or race result is implied by the unchanged fast path.

No full-repository, Proxy/MULTICN, restart/old-CN, actual concurrent-DDL physical retry, wire20631 injection, mixed-version semantic equivalence or post-push CI pass is claimed. Serialization does not make old FIELD executors implement new behavior. Broader conditional charset/result-domain normalization (including selected nonempty binary literals), existing CONCAT/explicit-CHAR/cross-explicit/unbounded-BINARY differences and the documented numeric-DEFAULT fallback limit remain outside this narrow correction; they do not exclude the selected-VARCHAR case fixed above. No expansion into partitioning, procedures, UDFs or warning compatibility. No unrelated CI reruns are requested or awaited.

### SCA follow-up (2026-10-20)

- Latest head `1ec4f5c5085c637c132c4b9cea9d0487a47736a5` merges fixed `mo/main` `0fb05134c76148fe7fd42a6bd54d37038df9510e` (#30637). The PR's 28 Go files and public SQL/results are byte-identical to the validated review20 source; there is no additional product or SCA-rule workaround.
- The failed [ARM64 SCA job](https://github.com/matrixorigin/matrixone/actions/runs/39375181272/job/118471681644) checked old head `1e2475f09e`. Its only annotation is **self-hosted runner lost communication**, while Static Code Analysis never reported a terminal result; the raw-log endpoint returns BlobNotFound. This does not establish a lint finding or a specific OOM/network cause. Existing issue #27742 tracks this failure class; no duplicate issue/comment was added.
- After the merge, local incremental vet/lint passed for eight packages (golangci-lint **0 issues**; molint retains 22 fixed-base owner/source-equivalent diagnostics). One normal atomic run passed spillio/hashbuild/spillutil/compile: **4001 pass events including subtests, no failures/skips**. Merge-delta executable coverage is **11/14=78.6%**. Upstream Linux UT/SCA evidence retains its own tested-source attribution; this Darwin run is not Linux/XFS verification.
- The newer SCA was already running, so the obsolete failed job was not rerun concurrently. This merge/push triggers latest-head CI; neither runner root-cause repair nor a post-push CI pass is claimed. Independent CHANGES_REQUESTED remains unchanged.

### Review follow-up (2026-10-21)

- Fixed the three conditional-declaration counterexamples: a binary user variable competes at declaration rank; an independently owned TEXT LPAD result is not automatically binary; LIMIT/HAVING consume the logical CASE declaration instead of its temporary binary transport. Genuine binary/explicit-CAST/COLLATE controls remain intact.
- Closed the same LIMIT/HAVING path through real PREPARE/EXECUTE, including history-free CASE producers and true/false/true executions. An intermediate candidate passed ordinary SQL but failed prepared scopes; that evidence was retained rather than accepted.
- Fixed the separately reported CAST-history defect using the existing explicit-cast classification. Actual PREPARE/initExecuteStmtParam/Eval covers SIGNED, DECIMAL, CHAR and nested CHAR-to-SIGNED; changing only the pinned parameter transport preserves FIELD results 0/2/2 and H identity/revision.
- Final source `ac5777821b54fc6ce7e54bbf94d02d2ccdaf598b` includes the merge of fixed upstream `76e152a1dd02b7875829027117a6f6344d1f8d33`. Five owning packages passed (39,815 test/subtest PASS events, 3 existing skips); incremental executable-line coverage is **42/43 (97.7%)**, full-PR coverage **1037/1111 (93.3%)**. Vet and incremental golangci-lint passed (0 issues); molint emitted 20 fixed-base owner/source-equivalent diagnostics, not a clean baseline lint execution. Native prerequisites were rebuilt and provenance verified.
- Original dtype expectations passed 104/104 before generation. All 34 new public SQL rows match an independent MySQL oracle. Reviewed generated output is one additive hunk with old metadata and MULTICN bytes unchanged. Normal BVT comparisons: dtype **139/139 twice**, prepared history **492/492 twice**, FIELD **97/97**, variadic **104/104**, TimestampAdd **99/99**; no failures/ignored/abnormal cases. Owned services were stopped and test databases cleaned.
- The existing numeric DEFAULT NULL-to-empty-binary fallback still raises 20203 (selected non-NULL TEXT now returns 2); no general charset/result-metadata, topology, restart, mixed-version, physical-retry, fresh race or performance-parity claim is added. Frozen design/authorization history is unchanged.

Evidence and explicit limits: [validation section 9](https://github.com/ck89119/matrixone/blob/ac5777821b54fc6ce7e54bbf94d02d2ccdaf598b/docs/design/CLAUDE_PREPARED_FIELD_TYPE_HISTORY_VALIDATION.md). Author validation does not replace independent review; existing changes-requested reviews are not dismissed. Post-push CI is not awaited or claimed successful.

Approved by: @XuPeng-SH, @iamlinjunhong

This branch was previously deployed

1 inactive deployment
ci — b35603ec Deployed Oct 20, 2026 by mergify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working size/XL Denotes a PR that changes [1000, 1999] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: TPCH 1T lineitem LOAD 出现 hash build spill disk budget exceeded(正在二分)

5 participants