Skip to content

refactor: migrate numeric integer parameters - #29164

Merged
XuPeng-SH merged 11 commits into
matrixorigin:mainfrom
ck89119:issue-28979-main
Sep 22, 2026
Merged

XuPeng-SH merged 11 commits into
matrixorigin:mainfrom
ck89119:issue-28979-main

Conversation

@ck89119

@ck89119 ck89119 commented Sep 20, 2026 •

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 #28979

What this PR does / why we need it:

Reuses the approved integer-parameter binding contract from #28977 and migrates the numeric, date/time selector, and bounded utility consumers in #28979.

  • Declares canonical signed INT64 contracts for PERIOD_ADD/PERIOD_DIFF, numeric precision arguments, FROM_DAYS, WEEK/YEARWEEK, TIMESTAMPADD, SUBVECTOR bounds, LAST_QUERY_ID, RANDOM_BYTES, SHA2, SPLIT_PART, and REGEXP optional integer arguments.
  • Keeps legacy execution identities available while excluding conversion-only PERIOD, RANDOM_BYTES, and SHA2 overloads from new binding.
  • Reuses SPLIT_PART overload 0 and preserves its legacy UINT32 physical signature. New bindings first apply shared logical INT64 coercion, then an existing strict UINT32 physical adapter with range checks, so old nodes consume the same executor contract without a new identity or capability.
  • Removes SHA2’s prepared-only string overload selection so constants, columns, and typed prepared parameters use shared integer coercion.
  • Adds resolver, prepared provenance, legacy-boundary, and SQL regression coverage.

No global conversion cost, explicit CAST/assignment behavior, integer coercion semantics, or protocol version is changed.

Validation

Local macOS arm64, Go 1.26.4, after merging mo/main at 22d43911d3:

  • mo-cgo-test -count=1 -timeout=600s ./pkg/sql/plan/function ./pkg/sql/plan — passed.
  • Focused SPLIT_PART INT64 success, non-positive, and legacy UINT32 upper-bound tests — passed.
  • go vet -mod=readonly ./pkg/sql/plan/function ./pkg/sql/plan with repository CGo flags — passed.
  • Incremental golangci-lint for the affected packages — 0 issues.
  • make build — passed before the final upstream merge; affected package suites passed again after the merge.
  • integer_parameter_coercion.sql — 108/108 passed twice on the same test-owned instance, 0 failed/ignored/abnormal; generated result was reviewed.
  • BVT teardown left no fixture database; the test-owned service and data were removed.
  • git diff --check — passed.
  • Review follow-up: removed the proposed SPLIT_PART/1 identity and preserved the old UINT32 wire/executor contract via cast_strict/0; plan-shape tests cover native BIGINT and DECIMAL sources, affected package suites/static checks/build passed, and the focused BVT passed again (108/108).
  • Self-review found no unresolved blockers.

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

Reviewed the complete current diff at exact head 1570fe8 against base 161fe8e. The shared INT64 binding contract covers the listed numeric/date-time/vector/string consumers, while SPLIT_PART preserves the legacy UINT32 executor identity through the strict physical adapter and range behavior. Prepared and non-prepared paths, legacy identity, overflow/boundary cases, resolver tests, SQL regressions, and the reported exact-head validation are aligned. No blocking functional, compatibility, or validation issue found.

@mergify mergify Bot added the queued label Sep 22, 2026
@mergify

mergify Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-09-22 04:47 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • 🟠 Checks running · in-place
  • 🚫 Left the queue — 2026-09-22 04:49 UTC · at 66e8bbf212f190c6384920324406e34678f1c895

This pull request spent 1 minute 26 seconds in the queue, with no time running CI.

Waiting for any of
  • check-neutral = CI Required
  • check-skipped = CI Required
  • check-success = CI Required
All conditions

Reason

Pull request #29164 has been dequeued

Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.

The author needs to enable "Allow edits from maintainers" on this pull request.

Hint

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.
If you do update this pull request, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

Tick the box to put this pull request back in the merge queue (same as @mergifyio queue).

  • Requeue this pull request

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement kind/refactor Code refactor kind/test-ci size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactoring]: Migrate numeric, date, and utility integer parameters

3 participants