Skip to content

refactor: migrate string integer parameters - #28992

Merged
XuPeng-SH merged 8 commits into
matrixorigin:mainfrom
ck89119:issue-28978-main
Sep 20, 2026
Merged

XuPeng-SH merged 8 commits into
matrixorigin:mainfrom
ck89119:issue-28978-main

Conversation

@ck89119

@ck89119 ck89119 commented Sep 16, 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 #28978

What this PR does / why we need it:

Reuses the approved integer-parameter contract merged in #28989 / #28977. The branch now merges current mo/main; it is no longer blocked on the foundation PR. No new coercion semantics, execution identity, or protocol version is introduced (the foundation uses MORPC v85).

  • Migrates integer positions for LEFT, RIGHT, SUBSTRING/SUBSTR/MID, LPAD, RPAD, INSERT, LOCATE, REPEAT, SPACE, and ELT to the shared signed INT64 contract.
  • Keeps historical execution identities executable, while excluding SPACE's legacy unsigned/decimal identities from new binding.
  • Removes ELT's old prepared-only numeric binding path: it converted a typed text index such as 1.9tail before the shared integer owner could preserve its source domain. ELT now uses the common parameter-owned path; legacy plan handling remains intact.
  • Adds independent per-position tests for exact/approximate/explicit REAL/text/unsigned inputs, NULL, selectors, folding, column binding, overflow, typed prepared specialization, NULL-first execution, and reuse after errors. Verifies legacy SPACE IDs through serialized-expression execution.
  • Extends the existing three-row SQL fixture, regenerates affected BVT results with mo-tester, and restores two formerly skipped SPACE overflow cases. Regenerated historical result files also refresh their legacy metadata/table formatting.

SPLIT_PART and REGEXP optional selectors remain in #28979.

Validation

Local macOS arm64, Go 1.26.4:

  • Full pkg/sql/plan/function and pkg/sql/plan package tests passed through mo-cgo-test, with -count=1 and coverage.
  • Changed executable coverage blocks: 4/4 statements (100%); declarative registry entries are covered by independent inventory and per-position behavioral tests. Overall package coverage: function 67.7%, plan 81.7%.
  • mo-service build and focused go vet passed.
  • Incremental golangci-lint v2.6.2, built with Go 1.26.4: 0 issues.
  • Expanded integer_parameter_coercion.sql: 91/91 passed twice, including metadata comparison.
  • 13 directly affected function BVT files: 1,148 passed, 0 failed, 3 pre-existing unrelated skips, twice on the same test-owned instance.
  • Five changed result files also passed metadata comparison: 566 passed, 0 failed, the same 3 existing skips.
  • SQL teardown checks found no fixture database/table residue; the test-owned service was stopped.
  • Self-review completed without blockers. No CI result is claimed here; the PR remains a draft.

@matrix-meow matrix-meow added size/XL Denotes a PR that changes [1000, 1999] lines and removed size/XXL Denotes a PR that changes 2000+ lines labels Sep 18, 2026
@mergify mergify Bot added the kind/bug Something isn't working label Sep 18, 2026
@ck89119
ck89119 marked this pull request as ready for review September 18, 2026 10:34

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

APPROVE — reviewed exact head 9ae619c. Migrated string/integer parameters preserve positions, arities, signed INT64 checks, NULL/masked behavior, result widths, execution IDs, and MORPC/persistence consumers; no actionable P0–P2 findings. Exact-head CI passed build, UT, coverage, SCA and multi-CN BVT. Upgrade and mixed-version/restart evidence remain gaps.

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

mergify Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-09-20 07:12 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • 🟠 Checks running · in-place
  • 🚫 Left the queue — 2026-09-20 07:16 UTC · at 1bc1a32ee23af5e6c54c91845ff666a3733a7064

This pull request spent 4 minutes 16 seconds in the queue, with no time running CI.

Reason

The pull request can't be updated

This pull request seems to come 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, or update the branch manually.

Hint

You should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue, 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/bug Something isn't working kind/enhancement kind/refactor Code refactor size/XL Denotes a PR that changes [1000, 1999] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactoring]: Migrate string position and length parameters

3 participants