Repository navigation
fix(plan): resolve prepared numeric expression types - #25788
Conversation
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.
Approved after re-reviewing current head fffa28e on latest main.
The previously confirmed temporal-subtraction blocker is closed. Numeric AST admission now rejects non-numeric typed operands and falls back to the legacy coercion path; DATE and DATETIME are covered with the prepared parameter on both sides.
Reviewed closure:
- numeric precedence: approximate > decimal > exact outer context > integer > default DOUBLE
- explicit parameter casts preserve the TEXT transport contract
- comparison, unrelated-function, direct-cast, and temporal boundaries remain isolated
- MOD, unary operators, all binary arithmetic operators, BIT capacity, decimal width/scale, correlated lookup, and binder group/alias state are covered
- temporary binder numeric context is restored on success/error/boundary paths; no new resource, wait, or unbounded-retention edge
Local deterministic validation:
- focused resolver and binder regression suites: count=5
- full pkg/sql/plan/function and pkg/sql/plan tests
- dependent pkg/sql/compile tests
- compile-only checks and go vet for all three packages
All passed; no blocking correctness or unhappy-path finding remains.
Merge Queue Status
This pull request spent 1 hour 22 minutes 44 seconds in the queue, with no time running CI. Waiting for
All conditions
ReasonPull request #25788 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.
HintYou 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. Tick the box to put this pull request back in the merge queue (same as
|
What type of PR is this?
Which issue(s) this PR fixes:
issue #25751
What this PR does / why we need it:
DOUBLEdomain.MODwhile isolating unrelatedfunctions, comparisons, and temporal expressions.
ParamReftransport asTEXTand materialize the computation type through explicit casts.GROUP BY/alias statepreservation.
Validation:
go test ./pkg/sql/plan/function ./pkg/sql/plan -count=1go vet ./pkg/sql/plan/function ./pkg/sql/plango build ./pkg/sql/plan/function ./pkg/sql/plangit diff --check