Skip to content

fix: unify decimal and string coercion domains - #27093

Closed
ck89119 wants to merge 56 commits into
matrixorigin:mainfrom
ck89119:issue-27088-main
Closed

ck89119 wants to merge 56 commits into
matrixorigin:mainfrom
ck89119:issue-27088-main

Conversation

@ck89119

@ck89119 ck89119 commented Aug 13, 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:

issue #27088

What this PR does / why we need it:

Unifies DECIMAL and string coercion across comparisons, IN/BETWEEN, and COALESCE/GREATEST/LEAST.

The change preserves prepared-statement parameter slots and protocol provenance, rebuilds only plans whose runtime coercion domain depends on parameter categories or exact DECIMAL values, and keeps the resulting metadata stable within each coercion category. It also propagates runtime parameter context through compile retries and AST-only execution paths.

Regression coverage includes direct SQL, SQL PREPARE/EXECUTE, binary protocol parameter kinds, tuple predicates, control-flow expressions, 64/128/256-bit DECIMAL domains, numeric prefixes, exponents, NULL rebinding, and 65-76 digit boundaries.

Validation:

  • pkg/frontend full test suite
  • pkg/sql/plan full test suite
  • affected vector/function/colexec/compile/executor/process packages
  • make build
  • strict mo-tester: 178/178 prepared comparison checks
  • strict mo-tester: 92/92 prepared common-type checks
  • strict mo-tester: 102/102 direct DECIMAL/string comparison checks

# Conflicts:
#	pkg/defines/const.go
#	pkg/vm/process/types.go
ck89119 added 29 commits August 18, 2026 19:18
# Conflicts:
#	pkg/frontend/mysql_cmd_executor.go
#	pkg/sql/plan/base_binder.go
# Conflicts:
#	pkg/defines/const.go
#	pkg/frontend/mysql_cmd_executor.go
# Conflicts:
#	pkg/pb/plan/plan.pb.go
#	pkg/sql/plan/deepcopy.go
# Conflicts:
#	pkg/frontend/computation_wrapper.go
#	pkg/frontend/computation_wrapper_test.go
#	pkg/sql/colexec/evalExpression_test.go
#	pkg/sql/plan/deepcopy.go
#	pkg/sql/plan/utils.go
#	pkg/sql/plan/visit_plan_rule.go

This branch had an error being deployed

1 failed deployment
ci — 1b7e481e Deployed Aug 21, 2026 by ck89119 via Matrixone Utils CI / Coverage #47364
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 size/XXL Denotes a PR that changes 2000+ lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants