Repository navigation
Description
Parent Issue
Detail of Subtask
Constant-projection follow-up — 2026-11-02
Ready PR #31988 computes selected-row NULL state once in GetConstSetFunction and preserves the original typed setters, global scalar NULL helper, vector layout and public APIs. Complete source/ELF-pinned data, raw warm calls, resource exclusions and Q4 attribution.
Independent local SF10 targeted controls give Q21-3.55%; the full four-qualified-pair Q1-Q22 screen gives Q21-3.72%. All seven real projection component modes improve, including constants/NULL/borrowed/text and empty output. Old Q3/Q13/Q20 regressions do not reproduce directionally. Q4's earlier+1.50% control signal is retained; a larger six-triplet/all-order A/A/B comparison did not reproduce it (fix/A-0.12%, fix/B-1.23%, both inconclusive). These do not prove equivalence; all uncertainty remains public.
Vector owner and colexec consumer tests pass. The existing metadata fixture now checks nonempty-to-empty clearing of prepared/binary/string/grouping state. Full pre-push checks passed on measured head8275251ba5. Mergify subsequently merged current main into the PR at1c91900677; that merge changes only unrelated PK-history paths and leaves this vector delta unchanged. No extra performance rerun is claimed. Broader SF100/mixed-I/O acceptance remains open. Failed global-inlining variants remain preserved and unpublished; fusionPR#31987 is not included.
Implementation result — 2026-10-29
PR #31620 now publishes the first-row/tail-copy correction at d95cfbb0e01ec4de281a1c9c002f949bf05713d7, including main 652a8ec6d0. The author explicitly revised this component PR’s acceptance to “if no regression, can still commit”: a confirmed target-query speedup is no longer required for this scoped delivery. This supersedes the previous disposition that blocked this PR solely for lack of a confirmed TPC-H gain; it does not waive correctness or a confirmed PR-caused slowdown, and does not close the broader issue.
Focused matched A/A/B controls show narrow-copy component gains without a confirmed slowdown. The completed Q1–Q22 screen of the preceding bounded-loop variant is retained; subsequent first-row/constant corrections have focused controls and Q21 confirmation. Q21 remains inconclusive: +1.51%, 95% interval [−6.48%, +1.73%], with same-binary variability retained and disclosed. These results do not prove equivalence or a TPC-H speedup. Vector, checkptr and BatchSet validation passed; the final repository pre-push SCA passed with zero findings. Fresh CI is running on the pushed head.
Final results, controls, uncertainty and measured-source limitations. Earlier reports remain historical evidence, not the current acceptance decision.
Evidence reassessment — 2026-10-26
Current delivery/performance status: SCOPE REVISED FROM CALLCHAINS. Local unique-join gather candidate e577638069 is rejected: late-provenance +4.15%, same-source +1.57%, tiny +7.96% in independent component confirmation. Its original 2 KiB allocation was removed, but current controls still fail. Merged #31081 changes wide selection copies and must be in the next baseline.
Observed: Reanalysis of the exact archived SF100 Q9 recording reconciles all 33,969 samples and 343,121,208,690 sampled ns. All unionT[int32] family weight (17.96% of sampled user CPU, including its separate defer leaf) has ShufflePool -> BatchSet.Union callers. int32 is the selection-index type, not payload width. Unique-join appendUniqueMatches accounts for only 2.69% of all samples in UnionOne; other hash-join paths account for 6.92%.
Not yet established: The current remaining physical widths, selected bytes and match/partition-run shapes at each caller. Flat unionT/UnionOne/memmove totals cannot all be assigned to unique-join build gathers; even that 2.69% includes an unknown eligible fraction.
Next discriminating experiment: Reprofile after #31081, split shuffle/BatchSet, unique join and other probe callers, then record actual selection density, payload width/provenance and source-run distributions. Compare existing full-batch transfer, selection copy and unsupported fallback with complete dispatch/preflight/materialization cost. Attribute background merges separately.
Measured target: Unchanged Q9/Q10/Q19 with less attributed materialization work/CPU and target latency improvement; report shuffle and join effects separately.
Mandatory controls and total cost boundary: Already-cheap same-source/full-batch paths; one/zero matches; repeated/scattered rows; fixed/varlen/NULL/constant payloads; early and late unsupported provenance; output order; backpressure/early stop and lifetimes. Measure no-op eligibility and failed-preflight cost explicitly.
Performance acceptance and rejection
Scoped exception for PR #31620: the author’s explicit decision above permits component improvement without a confirmed TPC-H gain, provided no PR-caused regression is confirmed. Inconclusive movements must be disclosed and must not be called equivalence. The target-query improvement and full-matrix requirements below remain requirements for closing this broader issue; they are not repeated as a delivery gate for this scoped PR.
- Freeze current-main/candidate sources, executables, real caller shapes and effective settings. Use the unchanged qualification SQL and complete result consumption; exclude cold runs and keep profiles separate from latency scoring.
- Demonstrate the named work/CPU reduction and an attributable uninstrumented target-query improvement. Include the controls below and full Q1-Q22 comparison; component wins, source changes, functional tests, SCA, merging and profile percentages are separate evidence.
- A confirmed affected/control slowdown fails; unresolved slower signals are inconclusive. Confirm with an independent longer balanced run. No gain elsewhere, favorable average or self-approved tolerance waives a regression.
- Complete applicable SF10/SF100 and memory/mixed-I/O acceptance before issue closure under the umbrella protocol. Report uncertainty, absolute CPU/instructions/work, allocations/copies and the same whole-application budget, effective cache, I/O/spill/swap/pressure evidence. Benchmark scripts do not verify input/table/schema/row counts/reference results/checksums.
Semantics and lifecycle requirements retained
- A reviewed ownership design covers source batch lifetime, null/constant/varlen vectors, repeated matches, output order, admission and cleanup/reset.
- Focused tests exercise same-batch, scattered multi-batch, repeated and empty matches plus early stop/cancellation; no borrowed varlen memory outlives its owner.
- Same-work microbenchmarks and unchanged Q9/Q10/Q19 report CPU/instructions, allocations and copied/materialized bytes where available.
- Compare against the existing batched contiguous path as a negative control, and report full-suite effect without counting overlapping copy leaves twice.
Describe implementation you've considered
Choose the highest remaining caller-specific cost: improve existing shuffle selection materialization/transfer, another join path, or bounded build gathers only if their eligible share justifies setup. Reuse existing ownership mechanisms. Split independent production changes; do not impose a generic indirection framework or assume zero-copy is always cheaper.
Coordination: #30849/#16387 own decoded-cache references; #30850 owns scan selection; #30852 owns critical-path diagnosis. For shuffle changes prove consumed/borrowed batch ownership and bounded producer/consumer cleanup.
Additional information
- Reassessed profile/caller evidence and delivery ledger.
- Historical MO source
873282742714436bff407dfcdbbe879147162bd3; DuckDB069cc9f9b5be802405797faecc284961b07c70ef. SF10 all-query profiles; SF100 results/profiles; mixed-I/O evidence. These are pinned historical captures, not current-main scores. - No new query/benchmark was run for this reassessment. Foreground query work, engine background maintenance, kernel CPU and off-CPU waits must be distinguished; all remain inside whole-application resource accounting.
- Raw SF100 Q9 recording and exact ELF/reanalysis index. Retain callgraphs when using
perf script;-Ghides them.
Pinned implementation / plan references
Activity
perf(vector): specialize wide fixed-width selection copies (#31081)
[-][Subtask]: Batch scattered join gathers and delay wide payload materialization[/-][+][Subtask]: Attribute and reduce shuffle/join vector materialization cost[/+]aunjgr commentedon Oct 26, 2026
Narrow selected-copy investigation: retain the issue, reject the current prototype
The current main SF100 Q9 profile confirms substantial eligible work: exact instruction addresses map 13.80% of sampled CPU to the 8-byte selected-copy loop and 3.80% to the 4-byte loop. ShufflePool callers dominate both. This distinguishes payload width from the generic int32 selector type.
The first isolated typed-copy prototype improved unchanged SF100 Q9 by 2.25% (paired 95% interval 0.82–3.33% faster; main median7.893565s, candidate7.701415s). Six balanced fresh-process pairs, three scored warm calls per process; cold warmup excluded. Separate profiles show the complete selected-copy owner, including metadata/callees, falling from85.313 to70.785 CPU-seconds/query (17.03% lower), with about6.13% fewer whole-application instructions. Those figures apply only to that first prototype.
The comparison used all64 logical CPUs on server129, NUMA0-1 interleave, configured/observed192GiB CN SHARED cache and a200GiB application budget including the private native image and conservative software count. Accepted query/profile windows have zero physical I/O, spill, swap, major faults and OOM. Profiles were separate and never scored. The benchmark inspected completion/resources/software identity, not input tables, row counts, checksums or query values.
This is not accepted and no PR is opened. Complete-owner controls exposed regressions on unchanged paths. Allocations stayed unchanged, but the first prototype slowed int32-selector constant batches by about5–8% and some wide-value batches by about4%. Generated unionT code grew from1083 to1181 instructions (including the unchanged defer wrapper) and its stack frame from424 to432 bytes. Moving views into the existing width dispatcher restored the frame and removed the wide-flat regression in a focused probe, but some constants still cost about2ns more. Restoring the original dispatch branches did not solve it: longer balanced500ms controls again confirmed material regressions:
Narrow flat copies improved substantially in that probe, but gains do not offset the negative controls. The full SF10 campaign was stopped after the owner failure; there is no full-SF10 acceptance claim. Later dispatch revisions have no SF100 speedup claim.
Correctness passed: full vector/BatchSet/shuffle/hash-join suites; scoped race cases for reuse, backpressure, write failure and abort;332/332 existing public join SQL statements; exact signed/unsigned/date/time/float/bit, NULL/grouping/provenance, window/prefix/growth/self-append and NaN/signed-zero payload checks. The copies retain the existing metadata/admission and ownership paths.
The issue remains open. A follow-up design should preserve the common-owner paths while isolating selected-copy work, and must pass independent owner controls plus unchanged end-to-end queries. The evidence supports further investigation; it does not establish that generic typed views alone are a safe improvement. No alignment dependency or speculative PR was introduced.
Detailed local artifacts are retained under
build/independent-scan-shuffle-wave:sf100-main-width-attribution.json,sf100-shuffle-report.json,shuffle-owner/analysis.json,shuffle-contained-probe/analysis.json,shuffle-original-dispatch-probe/analysis.json,shuffle-codegen/, and correctness/static receipts. The exact independent source/binary identities and environmental exclusions are recorded with each campaign.aunjgr commentedon Oct 28, 2026
Narrow selected-copy candidate: rejected by the owner control gate
Local SF10 exposure on main
6d1f5d7f2d31b119f201986f0bf6f9c7f2e78d89confirms eligible four/eight-byte non-NULL selected copies: 15,740,003 selected cells in Q9 (119.6 MB) and 10,043,652 in Q10 (64.9 MB). These are payload counts across columns, not query result rows. Nearly all Q9 cells occur in selections of at most 256 rows. Exact-binary instruction attribution puts the four/eight-byte copy loops at about 0.51% of Q9 sampled user CPU, under hash-join callers in this SF10 plan; do not carry forward the historical SF100 shuffle attribution to this plan.The independent candidate replaced only the existing flat non-NULL four/eight-byte loops with a private bounded typed-view helper using
uint32/uint64and the existing typed shuffle. The wide helper, allocation/preflight, metadata, NULL and constant paths were preserved. The owner stack frame stayed unchanged: 424 bytes for int32 selectors and 440 bytes for int64 selectors.The first six balanced process pairs showed 29–43% faster 256-row controls but about 4% slower single-row controls. A local refinement removed dynamic width multiplications from view setup. The one independent longer confirmation still failed:
Decision: reject this candidate; no PR. The repeated slowdown is on the changed narrow flat path with additional helper/view admission work. It is not an unattributed movement in unchanged code. The absolute single-row increase is usually about two nanoseconds, but larger-batch gains do not waive the agreed control regression gate. No ad hoc row-count tuning threshold was added to rescue it.
The complete owner was measured with the current main build alignment of 64 bytes, identical benchmark fixtures, CPU0 / GOMAXPROCS=1, six balanced process pairs, first benchmark result discarded. The longer confirmation used 200 ms samples instead of 50 ms. All twelve arms in each accepted experiment exited successfully without compiler overlap. The excluded initial confirmation had an overbroad benchmark-name regex and contributes no scores.
Focused correctness passed for both selector widths, bit preservation including NaNs/signed zero, windows, repeated and reversed rows, destination prefixes, NULL/grouping/provenance and self-append through growth. Full owner suites, SF10 Q1–Q22 and SF100 candidate acceptance were intentionally not run after this earlier rejection gate. No TPC-H speedup is claimed. The broader caller/materialization issue remains open.
The baseline exposure/profiles used CPUs0–7, cache16 GiB, whole-app32 GiB and a RAM-staged native SF10 image, with zero physical reads/writes, spill, swap, OOM and pressure. Diagnostics and profiling were separate from owner scores. No benchmark data/result verification was performed. Evidence and the rejected patch remain under
build/exec-copy-scan-wave-20261028.aunjgr commentedon Oct 28, 2026
Implementation PR: #31620
Narrow selected-copy correction — 2026-10-29
The original single-row regression has been fixed. Exactly one four/eight-byte value uses a direct scalar store. Multiple flat, non-NULL selections use bounded uint32/uint64 views and the existing typed shuffle in a private helper. The allocation/preflight, prefix, NULL/grouping/provenance and cleanup owners remain in
unionT. The wide helper keeps its implementation. The stack frames remain unchanged: 424 bytes for int32 selectors and 440 bytes for int64 selectors.The existing focused tests, complete vector package and BatchSet union/large-selection/reuse consumers passed. The final 108-case complete-owner experiment removed the approximately 4% single-row slowdown: single-row INT/BIGINT copies are now about 0.8–1.1% faster, while 256-row copies are about 30–43% faster, with no allocation increase. The expanded short-selection sweep was dropped rather than extend verification during unrelated compilation.
The completed, isolated local TPC-H evidence is pinned to baseline
6d1f5d7f2d31b119f201986f0bf6f9c7f2e78d89. It consists of six balanced full Q1–Q22 process pairs with one warm scored call/query, plus one independent six-pair targeted follow-up with nine warm calls/query for Q3/Q7/Q9/Q10/Q14. Cold runs were excluded, and profiles were recorded separately. No benchmark inputs, schemas, row counts, results or checksums were verified.All valid pairs, including the final slower follow-up pair, are retained. The combined calculation resamples within the two repetition contexts and gives each process pair equal weight; it does not pool individual repeated queries as independent trials. The standalone follow-up is inconclusive, and the Q3 effect varies substantially by context. The positive Q7/Q14 point estimates remain disclosed. These data support modest gains on the measured base; they do not establish a stable 4.68% Q3 gain or a current-main performance pass.
The normal CPU profiles exercise hash-join selected copies. Q9 selected-owner sampled CPU changed from 69.87 to 67.34 ms/query; Q10 changed from 81.65 to 91.33 ms/query in one profile pair, so no blanket owner-CPU reduction is claimed. Total instructions/query were about 0.38% lower in Q9 and 0.22% lower in Q10. These are single profile pairs with sampling/host-frequency uncertainty, separate from latency acceptance.
The measured environment used physical CPUs0–7, controller CPUs8–15, an explicit 16 GiB SHARED cache, a 32 GiB whole-application budget, normal Go1.27.1 SIMD/v3 builds and main's 64-byte function alignment. Accepted arms had zero physical reads/writes, spill, swap, OOM and sustained pressure.
Main subsequently merged execution changes in hashing, aggregation and integer casts. The candidate includes those changes. A matched clean baseline at
77679f178dand candidate were rebuilt with verified native provenance. Its current-base comparison has only one accepted process pair; desktop load invalidated one attempt and renewed Cargo/Rust compilation prevented the next pair from obtaining a clean window. Interrupted/contaminated arms are excluded. Current-head end-to-end acceptance is pending; no current-main performance pass is claimed.The broader #30845 remains open. Local evidence, source patches, exact binary identities, all query comparisons, raw profiles and exclusions are retained under
build/selected-copy-fix-20261028andbuild/execution-kernels-wave/copy30845-{full,confirm,current-full}-sf10.Complete Q1–Q22 screen on the measured base
The full repository pre-push gate passed: molint, license header/dependency checks and golangci-lint.
aunjgr commentedon Oct 28, 2026
Current investigation result: performance acceptance is not met
The original single-row cost was fixed, but the proposed narrow-copy specialization has not demonstrated the required TPC-H improvement. This is not a performance pass; the review request remains unresolved.
Published head
a5580c963fvs basedf6dff5305: the completed six-pair exact-head screen showed Q6 +6.47% (95% interval +0.96% to +9.47%), Q9 +2.02% (+0.22% to +6.88%) and Q16 +2.70% (+0.04% to +6.52%). Slower signals are not automatically attributed to the PR.Targeted A/A/B diagnostic: six process triplets, all six execution orders, nine warm executions/query; two baseline labels ran the identical baseline ELF. Ordinary desktop CPU load was recorded instead of used to abort this diagnostic; original CPU-noise verdicts were retained, so these diagnostic timings are not a clean-host acceptance result.
Q9 retained a slower signal, while same-binary process variation was substantial. Native/shared-library identities matched. No blanket claim that the shift was caused by the copy code is made.
Local bounded-span correction (commit
30f8d365df, not pushed): remove the bulk helper/two typed-view setup. For multiple rows, validate one destination byte window and advance pointers only inside it; preserve the scalar single-row path and the original checked source indexing. The focused tests, complete vector package, checkptr-focused test and BatchSet consumers passed. The int32/int64 owner frames remain 424/440 bytes. Existing owner controls improve the changed 256-row paths by roughly 23–26%, with no single-row slowdown or allocation increase. The unchanged Decimal128 constant control has an unresolved +2.64% signal (interval +2.20% to +3.00%); it is not silently counted as a pass.Completed full Q1–Q22 screen of that correction: six balanced process pairs, three warm executions/query, cold warmup excluded; source/binary pins recorded. CPU8–15 for application, CPU0–7 for controllers, cache16 GiB, whole-app32 GiB. All twelve accepted arms pass the original CPU-noise, software, memory, I/O, spill, swap, OOM and pressure gates. Four valid pairs were retained; the final two were completed after temporarily reserving the benchmark cores from Firefox/terminal threads. Original desktop CPU settings were restored successfully. Rejected attempts remain excluded. No CPU placements or implementations were pooled.
Peak charged application plus software was 11.98 GiB. Physical read/write bytes and spill events were zero. Benchmark scripts performed no input/schema/row/result/checksum verification.
Conclusion: no target query has a confirmed speedup in this corrected-loop screen. Q21 retains a +0.54% slower signal (+0.12% to +3.06%), without established PR attribution. Component gains and green functional checks do not satisfy the TPC-H acceptance requirement. No additional candidate code has been pushed and no review thread is marked resolved.
The earlier exact-binary Q9 attribution put the four/eight-byte payload loops at approximately 0.51% of sampled user CPU. That small work share explains why a large component gain has little whole-query headroom; it is not a hard wall-time bound. Further work should revisit the materialization boundary/call count using the profiles rather than continue tuning this payload loop. The broader #30845 remains open.
Local reproducible artifacts:
build/selected-copy-span-fix-20261029,build/execution-kernels-wave/pr31620-span-full-sf10, andbuild/execution-kernels-wave/pr31620-head-quiet-diagnostic-sf10. The unqualified alternative and all measured pins are preserved for review; no fresh whole-repository SCA/CI cycle was spent on publishing it after performance acceptance failed.aunjgr commentedon Oct 29, 2026
Revised acceptance and final regression check
The author revised the PR criterion: "if no regression, can still commit". A confirmed TPC-H speedup is no longer required for this component change. This does not relax correctness or allow a confirmed PR-caused slowdown; inconclusive effects and same-binary variation remain disclosed. The broader #30845 remains open.
Published PR head:
d95cfbb0e01ec4de281a1c9c002f949bf05713d7, including authoritative main652a8ec6d0ea8999d2fe45b4cb28b67f8c4f2430. Performance measurements retain their recorded baseline/source pins rather than being relabeled as runs of the final merged whole-query executable.Published implementation: copy the first selected row through the original checked scalar indexes; for additional rows check the last destination byte once, then use row pointers within that interval. This removes the bulk helper and slice-header setup for short calls while retaining source bounds and copy order. Fixed constants reuse one checked append window for seed-copy and the existing broadcast. The generated owner frames are 416/432 bytes (eight bytes smaller than baseline).
The vector package, focused checkptr and BatchSet consumers passed. The constant-window-only follow-up uses safe Go slice/copy operations; the unchanged pointer-arithmetic checks were reused. No benchmark inputs, table schemas, row counts, results or checksums were verified.
Focused A/A/B controls: six balanced process triplets, all six orders. Both baseline labels use the identical baseline test ELF, matched test/benchmark fixtures and native generation. CPU 8, GOMAXPROCS=1, two 200 ms samples with the first excluded. All original samples are retained.
Q21 confirmation: retain the five completed groups, then complete only the interrupted last group with its permitted retry. Six matched A/A/B triplets, nine warm executions/query/process, cold run excluded, baseline
df6dff5305, same worker/native libraries, CPUs 8–15, controllers 0–7, cache 16 GiB, whole-application budget 32 GiB, original compiler-free/CPU-noise/memory/I/O/spill/swap/OOM/pressure gates.No focused control or Q21 follow-up establishes a PR-caused slowdown. Q21 remains inconclusive with a positive point estimate; the result is not proof of equivalence and is not an end-to-end speedup claim. Same-binary variability, including the retained baseline outlier, is visible in the raw ratios. The earlier published-head Q9 signal and superseded local variants remain in the prior report rather than being erased or pooled with the corrected implementation.
The completed six-pair Q1–Q22 screen of the bounded-loop variant is retained as the broad screen; only its observed constant/Q21 signals and the changed narrow paths were checked again. The checked scalar/tail-copy body is byte-identical across the final main merge except the requested inline comment. No further full screen or profile was repeated for publication.
Firefox/terminal CPU settings used for temporary core reservation were restored, with watchdog protection retained during the runs. The final PR delta contains only the vector implementation and its existing test extension; the requested inline explanation replaces the unnecessary delivered design document.
Artifacts:
build/selected-copy-peel-fix-20261029,build/execution-kernels-wave/pr31620-peel-q21-regression-sf10. The final default repository pre-push SCA completed successfully, including molint, license checks and repository-wide golangci-lint (zero findings).perf(vector): hoist narrow selection destination bounds (#31620)
aunjgr commentedon Nov 1, 2026
Constant row projection: vector regression fix and qualification
The final fix uses a narrower mechanism:
GetConstSetFunctioncomputes selected-row NULL status once for provenance admission/publication, with a dedicated empty-output path. The globalIsConstNull, its cached-count guard, vector layout and typed setters stay unchanged. The final source is8275251ba59ef5a0ec7964351315c5cd45ad23ec, against mainc5c163cd2340110448fc2ef9c62042685aa9d773; no fusion code is included.Why the original approach was rejected:
Count()reads a cached count, rather than traversing the bitmap; its guard skipsContainsfor non-NULL constants. Global inlining grew executable text by 23,296 bytes and changed caller control flow. Follow-up global-outline variants regressed constant component controls and were also rejected. A matched Q3 CPU pair did not reproduce the original macro slowdown, so the exact hardware mechanism remains unproven. None of those old results or failed branches was discarded or promoted using that one profile. The final local fix avoids global code-generation changes and removes repeated work from the profiled join-projection caller.Measured final result: every real projection component mode improves (flat/text about18%, NULL/borrowed about31%, constants8–15%, empty output3.31%). An independent four-pair/16-warm-call Q3/Q13/Q20/Q21 comparison confirms Q21 -3.55%; the three previously regressed queries have no directional slowdown. Four qualified full-suite pairs give Q21 -3.72% with no directional slower screen result. Two original full-suite pairs failed only CPU/compiler gates; exactly two replacements were declared before timing, retaining the original balanced order and exact binaries/settings. Whole failed pairs remain excluded and visible below.
Q4 uncertainty is explicit: a longer control run found +1.50% (+0.09% to +3.08%). A predeclared six-triplet study then used A/B as the identical main ELF and C as the fix, with all six launch-order permutations and24warm calls/query. C/A is -0.12% (-4.92% to +0.59%), C/B -1.23% (-6.47% to +0.34%), and C/geomean(A,B) -0.65% (-5.71% to +0.45%). Identical main B/A is +0.85% (-0.98% to +3.14%). The direct fix comparisons do not reproduce the earlier slower signal; Q4 remains inconclusive, not equivalent. Raw triplet medians and all previous results are retained. Its unscored logical plan is an EQ-only SEMI join with the date predicate pushed into the scan, without the targeted non-EQ join path; no latency from this plan capture is used.
Same local eight physical CPUs, effective16GiB CN cache and32GiB whole-application cap. First/cold calls excluded. Profiles separate from scored latency. Timing scripts execute/drain only, with no input/table/schema/row/reference/result/checksum verification. Scored arms satisfy original compiler/CPU/pinned-software/I/O/spill/swap/OOM/pressure gates; thresholds are unchanged. All source/ELF pins, every scored warm call and resource statuses follow below.
Functional proof reuses existing vector setter/NULL/constant/grouping/provenance/readonly/alias/allocation-error fixtures and real colexec consumer tests. The existing metadata fixture now checks nonempty-to-empty clearing of prepared, binary, string-source and grouping state, with cleanup on assertion failure. No public API, type width, cache policy, allocator, copy algorithm or query plan change. Broader SF100/mixed-I/O issue acceptance remains open.
Constant projection NULL reuse: four qualified full-suite pairs
State:
complete; qualified process pairs:[0, 1, 2, 3].Independent current-main/candidate normal release binaries, unchanged local TPC-H SF10 SQL and full result consumption. Eight physical CPUs (8-15), effective 16 GiB CN cache, 32 GiB whole-application cap. First/cold calls excluded; repetitions and query selection are recorded in the protocol. Benchmark scripts execute/drain only and do not verify inputs, schemas, rows or results. Profiles are separate from latency.
Each process pair contributes the ratio of its warm-call medians. The table reports the median paired ratio and a small-sample paired bootstrap interval; inconclusive intervals do not prove equivalence. Slower screen signals require independent longer confirmation. No gains elsewhere waive a confirmed regression.
Source/executable pins:
c5c163cd2340110448fc2ef9c62042685aa9d773; ELF SHA-2568db813e2775ccee41dec390dd979aff6c221602c5e59e18bdfb4b004ac9887fa.8275251ba59ef5a0ec7964351315c5cd45ad23ec; ELF SHA-2565b72e7bea6a4e2eecb4b9f6029d344b63570da386bd5297ad00b74fe9d02069e.Resource receipts for completed arms:
Scored warm calls in seconds
Constant projection NULL reuse: independent Q21 and previous-regression controls
State:
complete; qualified process pairs:[0, 1, 2, 3].Independent current-main/candidate normal release binaries, unchanged local TPC-H SF10 SQL and full result consumption. Eight physical CPUs (8-15), effective 16 GiB CN cache, 32 GiB whole-application cap. First/cold calls excluded; repetitions and query selection are recorded in the protocol. Benchmark scripts execute/drain only and do not verify inputs, schemas, rows or results. Profiles are separate from latency.
Each process pair contributes the ratio of its warm-call medians. The table reports the median paired ratio and a small-sample paired bootstrap interval; inconclusive intervals do not prove equivalence. Slower screen signals require independent longer confirmation. No gains elsewhere waive a confirmed regression.
Source/executable pins:
c5c163cd2340110448fc2ef9c62042685aa9d773; ELF SHA-2568db813e2775ccee41dec390dd979aff6c221602c5e59e18bdfb4b004ac9887fa.8275251ba59ef5a0ec7964351315c5cd45ad23ec; ELF SHA-2565b72e7bea6a4e2eecb4b9f6029d344b63570da386bd5297ad00b74fe9d02069e.Resource receipts for completed arms:
Scored warm calls in seconds
Constant projection NULL reuse: independent longer full-screen controls
State:
complete; qualified process pairs:[0, 1, 2, 3].Independent current-main/candidate normal release binaries, unchanged local TPC-H SF10 SQL and full result consumption. Eight physical CPUs (8-15), effective 16 GiB CN cache, 32 GiB whole-application cap. First/cold calls excluded; repetitions and query selection are recorded in the protocol. Benchmark scripts execute/drain only and do not verify inputs, schemas, rows or results. Profiles are separate from latency.
Each process pair contributes the ratio of its warm-call medians. The table reports the median paired ratio and a small-sample paired bootstrap interval; inconclusive intervals do not prove equivalence. Slower screen signals require independent longer confirmation. No gains elsewhere waive a confirmed regression.
Source/executable pins:
c5c163cd2340110448fc2ef9c62042685aa9d773; ELF SHA-2568db813e2775ccee41dec390dd979aff6c221602c5e59e18bdfb4b004ac9887fa.8275251ba59ef5a0ec7964351315c5cd45ad23ec; ELF SHA-2565b72e7bea6a4e2eecb4b9f6029d344b63570da386bd5297ad00b74fe9d02069e.Resource receipts for completed arms:
Scored warm calls in seconds
Q4 identical-binary attribution
Q4 triplet raw warm calls (seconds)
docs: design early runtime filtering and dictionary vector execution (#…
XuPeng-SH commentedon Nov 18, 2026
转交 QA:已合入的 selected-copy / constant-projection 组件
@Ariznawlll 请接手已交付组件回归。本次为转测,不表示整个 materialization 优化路线已完成或性能验收通过,不关闭 issue。
19b7ba794eefa60e4bb842df662e66c192f4e599。4/8-byte flat non-NULL selection 使用 first-row checked copy 和有界 tail;fixed constant 复用一次 checked append window。保留 source bounds、行序、allocation/preflight、NULL/grouping/provenance 和 publication。55a1a2e133a3d7c8adaada1e3efb2bed138ee00f。constant row projection 复用 selected-row NULL 状态,保留全局 IsConstNull、typed setter、alias/COW、资源顺序;empty output 清理原有 metadata。d95cfbb0e01ec4de281a1c9c002f949bf05713d7approve,早期 target-query-gain gate 已被该组件明确修订的 no-confirmed-regression 标准取代,inline comment 请求已解决。perf(vector): reuse NULL state in constant row projection #31988 最终1c919006777fd58de7f230362751a68b3492ea33approve,无 actionable defects。未见这两项交付仍必须修改的开发 follow-up;后续 ordered multi-source gather 等调查建议不在此宣称完成。8275251ba5/ baselinec5c163cd23的 SF10 targeted Q21 -3.55%,full screen -3.72%;旧 global-inline Q3/Q13/Q20 回退不属于此局部实现。Q4 早期 +1.50% 在后续六 triplets/all-order A/A/B 未复现,仍不确定而非等价证明。不是最终 merge/current-main 新测结果。Ariznawlll commentedon Nov 19, 2026
QA 本轮验收:SQL consumer 正确性通过;具体优化分支、生命周期与性能仍未闭环
本轮验证已合入 main 的 #31620(merge
19b7ba794eefa60e4bb842df662e66c192f4e599)和 #31988(merge55a1a2e133a3d7c8adaada1e3efb2bed138ee00f)。本轮没有发现新的 SQL 结果反例,但 SQL 结果正确不能单独证明目标 narrow-copy / constant-projection 分支执行,保持 OPEN。验证版本与范围
035af996806917b23d9428695e0295b65cb16356,git_version()=035af99680,version()=8.0.30-MatrixOne-v1.3.0。3b95c0878f88b3da58bf3e65c369b7ef4d13104e。SQL consumer:实际通过
真实夹具为左表
l16,385 行、右表r258 行,r.k为 int primary key。唯一 join 的计划为INNER hashOnPK,joininputRows=16643、outputRows=11916。完整 11,916 行结果同时通过两种独立 oracle:
两种对照的行内容 checksum 均为:
其他实跑通过项:
LIMIT 17focused Go:实际通过
TestUnionPlainFixedSelectionReusePASS,覆盖 owned/window/lease、两种 selection 类型及多种定宽类型。TestHashJoinUniqueConstantGroupingPASS。TestHashJoinUniqueConstantGroupingSelectionsPASS,覆盖 fixed/bytes/null 和不同 grouping。TestLoopJoinConstantGroupingProjectionPASS,覆盖 scalar、range 和 resume。证据边界与未完成项
hashOnPK、返回行数和 checksum 正确,只能证明当前计划及 consumer 结果,不能单独证明某个 narrow-copy Go 分支在 SQL 中实际执行。(l.v+r.rv)>0放在独立Filter节点,join 仍是纯等值hashOnPK;因此该用例不能作为 hashjoinNonEqCond常量求值路径命中证明。GetConstSetFunction的特定优化分支已命中。需要直接分支计数、可信 profile 或其他能映射到真实 SQL 的观测。QA 结论
SQL consumer 正确性和 focused Go 测试通过;目标优化分支的 SQL 直接命中、完整生命周期和性能验收未闭环,本 issue 保持 OPEN。 本轮结果不应被表述为产品结果失败,也不足以宣称整个 materialization 优化子任务已经完成。