Repository navigation
perf(scan): filter cached fixed-width columns before materialization - #31785
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? |
|
The failed UT and coverage producer shared one accounting defect: a fallback with a complete nonnil column list was treated as a partial read, causing The failing persisted prepared-DML case now passes in CI's v1/default Go mode with Q7 performance acceptance remains blocked. The previously posted latency results belong to a4c1bc9/1c80f16a2b and are not presented as measurements of the newly merged head. |
|
Implemented the admission repair in Source-scoped evidence and raw execution/qualification receipts provide the current-head/current-main Q7 comparison and Q6/Q14 controls. All retained target arms pass the original gates. Q7 remains statistically inconclusive (+2.96%, observed three-pair range−1.26% to+9.30%); Q6−32.92%,Q14−19.21%. Prior-base Q7 confirmation is reported separately. This is not an equivalence or whole-suite PASS claim. The final full screen remains unqualified due host paging/reclaim and is explicitly left open; no regression is waived by gains elsewhere. The owning tests, full pre-push SCA and final-binary two-run SQL BVT pass. Please reassess the implementation and scoped evidence; the broader issue is not being closed. |
|
The new measurements and coverage repair are ready for reassessment.
Main is merged through |
…can-filter # Conflicts: # pkg/embed/upgrade_metadata_cdc_test.go # pkg/embed/upgrade_metadata_test.go
|
Resolved the conflicts by merging main Retained main’s renamed/consolidated metadata-upgrade fixtures and its recovery admission-budget handling. The earlier shared-test repair now leaves no embed-test delta in this PR. The scan-filter changes and main’s restored long-scan cache policy are preserved. The affected owning/consumer checks already passed. The required pre-push static gate passed with zero findings. Further benchmark verification was stopped at the requester’s instruction; this merge makes no new performance acceptance claim. Fresh CI is running on the new head. |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: d8443d85765fd6f45d06de581da87c369f506ab9
Assessment: approve
No actionable defects remain. Preserving native standalone BETWEEN and the qualified follow-up evidence resolve the prior Q7 concern for this scoped optimization.
Model: gpt-6-astra / xhigh
Session: 01a1869d-820c-7212-9788-aecfb86a4141 · slot 0 · generation 2
Validation:
-
Reviewed all 22 changed files, affected owners and consumers, linked issue context and nine discussion entries. Saved review-plan.md and discussion-assessment.json.
-
All six affected package suites passed normally and under -race with vet enabled. Receipts: checks/1793541017598450797-3.json and checks/1793541139730575788-3.json. Retained logs: owners-normal.stdout.log and owners-race.stdout.log.
-
Isolation preflight, native provenance and source audits passed. validation-audit.json reconciles commands, source fingerprints, terminal results and logs. Source remained unchanged.
-
Recalculated supplied benchmark timings and checked semantic source continuity; see performance-audit.json. Frozen HEAD CI reports successful build, UT, coverage, SCA and multi-CN BVT.
Limitations:
-
Performance measurements belong to supplied revisions dedb459/d1594899, not this HEAD. Q7 remains inconclusive; no new benchmark or SF100/mixed-I/O acceptance is claimed.
-
SQL/topology validation relies on frozen CI statuses and supplied reports; no local BVT was run.
✅ Merged into
|
What type of PR is this?
Which issue(s) this PR fixes:
Related to #30850; the broader materialization/performance acceptance task remains open.
Qualified full SF10 screen, independent Q18 confirmation, raw timings and resource receipts.
Design and ownership contract.
What this PR does / why we need it:
Evaluate admitted exact residual predicates while ObjectIO holds the existing column-cache lease, then materialize surviving physical rows into owned vectors once. This removes intermediate Boolean vectors and repeated materialization/shrink work for compound fixed-width predicates.
Compile complete ordered conjunctions of same-type integer, DATE and Decimal64 comparisons against resolved literals. BETWEEN inside a compound filter lowers to two comparisons. A standalone native BETWEEN stays on its existing fused vector evaluator: it already has one value pass, so replacing it adds selection/gather work rather than removing repeated predicate passes.
Preserve NULL truth, tombstones, physical row order, destination allocation/metadata and immutable cache input. Keep borrowed views private to ObjectIO and bound scratch to one block per sequential reader, released on reset/free. Unsupported expressions/representations, varlen projections, appendable blocks, rowid output and Top-K retain generic evaluation. Read/cache policy, SQL planning, stored formats and memory limits retain their existing owners.
Validation
The existing admission fixture verifies standalone native fallback, retained compound BETWEEN in separate-expression and AND forms, scan Prepare, nil/unsupported input, and existing reset/reuse. The table_scan owning package passes in default/v1 Go mode (0.093s); scoped configured vet/lint and the full latest-main pre-push gate pass with zero findings. The normal publication binary passes the existing SQL BVT twice on one owned instance, with teardown and SIGINT shutdown verified. The coverage failure was a five-minute admission wait in the upgrade fixture before any service started. Admission now uses test cancellation; each admitted SQL/recovery phase retains its five-minute work budget. All seven existing upgrade scenarios pass in coverage mode on the merged delivery head (71.281s). Existing ObjectIO/cache ownership checks are reused for unchanged code.
Performance evidence and limits
Matched local warm SF10 comparisons use Go1.27.1 SIMD/v3/alignment64 with identical release metadata, eight physical CPUs, effective16GiB CN cache and32GiB whole-application budget. Cold calls are excluded; scripts execute/drain without input/schema/table/row/reference/result/checksum verification. Measurement metadata stays in RAM until after capture, with unchanged CPU/compiler/I/O/spill/swap/OOM/pressure/pinning gates.
The qualified full Q1–Q22 SF10 screen retained three complete process pairs, five warm calls/query/arm. Q6, Q14 and Q15 have paired latency reductions of 36.46%, 21.99% and 29.21%. Q7 is +0.82%, with an observed pair range −4.71% to +13.47%; it remains inconclusive, without an equivalence or speedup claim. The screen’s Q18 +1.65% signal did not reproduce in four new balanced pairs with 16 warm calls/arm: +0.03%, small-sample interval −1.03% to +1.85%. Campaigns are reported separately, without pooling.
Real-Q7 profiling verifies the native BETWEEN/evalFilter path instead of exact-filter selection/gather. The experimental single-pass range kernel did not meet the longer Q7 check and was reverted. No unmerged selected-copy dependency is included.
The earlier full-suite attempts were resource-invalid. A runtime mmap trace exposed dynamically loaded libraries missing from the initial software pin set. Pinning the complete observed closure for both arms closed that measurement gap without relaxing limits. All eight new full-screen arms had zero physical I/O, spilling and swap; one whole pair was excluded for background CPU. The remaining sample size limits precision. No SF100/mixed-I/O acceptance or issue closure is claimed; a confirmed regression cannot be waived by gains elsewhere. External performance reassessment remains required.