Repository navigation
perf(function): use decimal precision proofs in multiplication dispatch - #30885
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? |
|
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-xupeng · review
Commit: d8938d60dc96e808cfe132aaf9837ce603412864
Assessment: approve
Reviewed the complete four-file delta, linked requirements, supplied comments, and arithmetic callers. Precision proofs conservatively remove redundant scans while retaining existing kernels, fallback, rounding, masking and precision enforcement. No actionable correctness, design or coverage defects remain.
Model: gpt-6-astra / xhigh
Session: 01a15209-2c6d-71e2-b8f3-aa17387fa283 · slot 2 · generation 0
Validation:
-
Isolation preflight passed. Built native prerequisites through the repository owner and verified their provenance against the assessed revision.
-
Focused tests passed: 23 top-level tests, including committed range-proof tests and 14 supplemental dispatcher scenarios covering mixed domains, constants, NULLs, selection, empty batches and overflow. Receipt: checks/1792703573363450322-3.json; log: focused-tests.log.
-
Static checks confirmed clean source, valid precision bounds and unchanged multiplication computation after reducing the proof predicates.
-
Sequential baseline/candidate microbenchmarks measured approximately 1.52x and 1.25x improvement for proven int32/int64 256-row inputs, zero allocations, and essentially unchanged wide fallback. Reverse-order controls did not reproduce the initial one-row slowdown.
-
Audited commands, source fingerprints, exits, logs and overlay contents. Evidence index: /home/xupeng/.local/state/mo-bot/jobs/26f7a4ce6d0968c3ad9deba3/attempt-1/validation-index.json. Final audit receipt: checks/1792703897828868158-3.json.
-
Frozen CI evidence reports successful x86 unit tests/coverage, arm64 static analysis, shared build and compose BVT checks.
Limitations:
-
No independent SF10/SF100 query replay or PMU reproduction; author query-performance claims were not independently verified.
-
Local benchmarks used Go 1.27.1, GOAMD64=v1 and no GOEXPERIMENT. Short microbenchmarks, including run-order-sensitive one-row controls, do not establish whole-query performance.
-
Raw author and CI logs were unavailable. Local validation exercised the package dispatcher rather than a live SQL service.
-
The initial native-prerequisite probe failed before tests ran; setup was recovered and subsequent validation passed.
Merge Queue Status
This pull request spent 9 seconds in the queue, with no time running CI. Required conditions to merge
|
What type of PR is this?
Which issue(s) this PR fixes:
Related to #30840; umbrella #30838.
Approved versioned design.
What this PR does / why we need it:
Use valid Decimal256 operand precision to skip redundant range scans in multiplication dispatch. Precision up to 9 proves an int32 coefficient; precision up to 18 proves int64. Compute proofs once per batch, preserve the int32-before-int64 tier order, and retain dynamic checks for unknown or invalid metadata. Existing multiply, scaling, rounding and result-precision enforcement remain responsible for results and errors. Metadata-free callers retain the original unknown-proof path.
Validation: full function package tests including the newly merged decimal-cast changes, an independent math/big oracle across precision 9/10/18/19, signed values, constants, NULLs, selection and scale rounding, plus existing overflow/wide-path coverage. Public-dispatch 256-row microbenchmarks improve ~1.39x for proven int32 and ~1.20x for proven int64, with zero allocations; wide fallback is unchanged. Query timing is reported separately from kernel gains.
Comparison protocol: optimized SIMD builds, eight physical CPUs, a private retained SF10 native image, 32 GiB application limit including the image, no swap, and a 16 GiB CN SHARED memory cache verified from running-process metrics. Query cold warmups are excluded; CPU profiling is separate from latency. All query evidence uses main with #30880 merged. No dataset or query-result verification runs in benchmark scripts.
Paired SF10 replay on merged main (six balanced process generations, three scored calls per query per arm):
Q1 shows no demonstrated whole-query gain; Q15 shows a modest ~1.6% gain in this replay. All measured windows pass the zero physical I/O, spill, swap, OOM and sustained-memory-pressure gates. These are selected-query results, not a whole-suite or SF100 speedup claim.
Separate CPU/PMU diagnostic (one process generation per variant, two warm query calls, excluded from the latency comparison): user instructions per call 211.846G → 215.195G, user cycles 48.694G → 49.829G. The recordings have no lost samples. This single diagnostic pair is not a significance test or a query speedup claim.
Isolated kernel microbenchmarks used the pre-#30880 main snapshot; that cast-only merge does not change the timed constructor, multiplication or SUM kernel closures. The retained-image query comparisons and profiles were rebuilt and rerun with #30880 included.