Skip to content

refactor(sql): migrate bit-pattern integer parameters - #29231

Merged
XuPeng-SH merged 23 commits into
matrixorigin:mainfrom
ck89119:issue-28980-main
Sep 25, 2026
Merged

XuPeng-SH merged 23 commits into
matrixorigin:mainfrom
ck89119:issue-28980-main

Conversation

@ck89119

@ck89119 ck89119 commented Sep 22, 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 #28980

What this PR does / why we need it:

  • Migrates HEX, CHAR, MAKE_SET, EXPORT_SET, and CONV integer parameters to the shared integer-parameter binding contract.
  • Preserves signed, unsigned/bit-pattern, and text source domains across selectors and prepared-statement rebinding.
  • Keeps legacy HEX overload identities and the v74 catalog-repair path while gating newly bound private casts at MORPC v85.
  • Adds unit, prepared-protocol, persisted-expression, and BVT coverage, including the EXPORT_SET regression from [Bug]: EXPORT_SET misinterprets DECIMAL and truncates FLOAT bit masks #28463 and checked-overflow behavior.

Validation:

  • go test via mo-cgo-test for pkg/sql/plan/function, pkg/sql/plan, pkg/frontend, and the prepared integration suite
  • changed-block coverage: 93.28%
  • go vet and golangci-lint: passed
  • affected and adjacent BVT cases: 644/644 statements passed

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

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

复核了精确基线(#29344 合并提交与 PR base 的 Git tree 完全相同),并在两边对应 CI 构建产物上复现。发现两类新增协议语义回归,详见行内意见。head 的 UT、SCA、Coverage 和 BVT 全绿,但当前结果仍建议修复后再合入。

Comment thread pkg/sql/plan/integer_arguments.go Resolved
Comment thread pkg/sql/plan/visit_plan_rule.go Resolved

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

已复核最新 head e886041,之前的两条阻塞意见均已解决:

  1. 派生 IF/CASE、投影显式 CAST 保留生产者的公共结果域,直接 SQL 与 prepared 结果一致;直接显式 CAST 的截断控制保持不变。
  2. NULLIF 比较输入不再继承整数返回值域;TEXT/NULL、反向 NULL、数字常量与 TEXT 混合比较,在 SQL EXECUTE 和 COM_STMT 路径均通过。

验证:复用精确 head 的成功 UT/SCA/BVT;本地补跑 planner/function 针对性测试与 vet、真实协议集成测试,并增加 99 组相邻场景的直接 SQL/prepared 结果及错误类别对照,全部通过。新 BVT 在同一实例运行两次均 47/47,每次运行后库和表残留均为 0;生成的 protobuf descriptor/序列化与新增两个 provenance 字段一致。也复核了 legacy HEX/v74 repair、v85 持久化准入、溢出后重用和不活跃分支。

当前未发现新的阻塞问题,Approve。

@mergify

mergify Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-09-25 18:37 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • 🟠 Checks running · in-place
  • 🚫 Left the queue — 2026-09-25 18:37 UTC · at c93890ff04b007933257d8af79f839fc7b381c91

This pull request spent 44 seconds in the queue, with no time running CI.

Reason

Pull request #29231 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.

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

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/refactor Code refactor size/XXL Denotes a PR that changes 2000+ lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactoring]: Migrate bit-pattern and encoding integer parameters

3 participants