Repository navigation
fix(function): avoid decimal cast setup and widening overhead - #30981
Conversation
|
Local verification uses only clean main and this candidate, built normally in separate checkouts. No combined candidate or source overlays. Comparison base: SF10: eight physical CPUs, 16 GiB CN SHARED cache, 32 GiB whole application including the private RAM image, no swap. Existing loaded image reused. Cold selected-query warmups excluded; profiles collected separately. No input/table/schema/row-count/reference/result verification.
Changes use the median of paired process ratios; columns show medians over six process generations. No aggregate gain overrides an individual regression. Main advanced after timing collection. The intervening commits change Python SDK/tests, CSV test fixtures, UNIX_TIMESTAMP(DATETIME) selection and persisted DDL validation, detached background table-statistics stock, cancelled keepalive handling and GC Bloom sizing. Decimal casts/arithmetic, vector/null/bitmap/type/memory-pool primitives and native build inputs are unchanged. TPC-H does not invoke UNIX_TIMESTAMP or persisted-expression DUMP/LOAD; its arithmetic argument types and query expressions are unchanged. Statistics/GC changes may affect background activity, so the published performance numbers remain explicitly attributed to the tested snapshot pair, not presented as a fresh measurement of the merged head. Reuse the unchanged decimal functional and performance evidence; rerun owning-package and full static validation on the merged head. Environmental exclusions were preserved and whole matched pairs repeated. No performance sample was discarded for being slower. Package/static checks and separate profile/resource gates passed. Software/source identities, raw timing records and profiles are retained locally; broader optimization issues stay open. |
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? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Reviewed the current head 898da0695cc2cce85c0933e9c3d15296c99baef6 and the changed cast/test files. I found no actionable correctness regression in the added empty/all-NULL guards, bounded Decimal128→Decimal64 conversion, or same-scale Decimal64/128→Decimal256 widening. The SF10 results in the PR discussion are author-reported for candidate bdf5d1a8caf479fccfe6433a8f234ada6165a8d5, not measurements I ran; the owning-package tests and local harness were not executable in this workspace. Related performance issue #30839 remains open, so this approval does not mark its broader performance acceptance complete.
Merge Queue Status
This pull request spent 56 minutes 13 seconds in the queue, including 53 minutes 56 seconds running CI. Required conditions to merge
|
What type of PR is this?
Which issue(s) this PR fixes:
Related to #30839 and #30838. This focused correction does not complete the broader optimization issue.
What this PR does / why we need it:
Skip decimal cast setup for empty and entirely NULL batches, use resolved values and NULL bitmaps, and reuse the result-owned parameter frame. Write same-scale non-NULL Decimal64/128 widening batches directly into the Decimal256 result. Use bounded integer rescaling for Decimal128-to-64 values that fit the declared precision; retain the existing rounding method and error conversion for rejected values. Convert constant inputs once and broadcast the result. Preserve checked scaling, rounding, precision, NULL and error behavior; cover signed widening, bounded NULL domains, rebinding and overflow recovery.
Validation: owning-package tests, full pre-push static checks, isolated local TPC-H SF10 Q1–Q22 and separate CPU profiles pass. The baseline is a real clean-main checkout; the candidate contains only this fix, with no source overlays. Six balanced process pairs use three scored calls per query after excluded cold warmups. The local performance gate passed; the detailed measurements below identify any independent confirmation used for initial slower-query signals. Detailed measurements are recorded in the PR comment.