You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Subtask]: add numeric resolver and prepared expression context #25751
Introduce an arithmetic-specific numeric type resolver and prepared-expression context propagation for +, -, *, /, DIV, MOD, and unary +/-.
The resolver must select parameter and result types from typed operands and optional outer context with this precedence:
approximate operand;
decimal operand;
exact outer context;
integer operand;
context-free parameters default to DOUBLE.
Cover explicit casts, literals, read-only column type lookup, nested arithmetic, function-form MOD(), and strict boundaries
that prevent numeric context from leaking into unrelated functions or comparisons.
Describe implementation you've considered
Implement a pure resolver in pkg/sql/plan/function that returns operand coercion and result types. During PREPARE, scan one
continuous arithmetic AST without mutating binder state, then bind the subtree once with the selected parameter type. Keep
non-prepared queries and non-numeric coercion on their existing paths.
Additional information
Acceptance requires table-driven resolver tests, prepared plan tests, ordinary-query regressions, decimal precision/scale
coverage, and no mutation of GROUP BY, projection, or alias bookkeeping during type inspection.
Activity
fix(plan): resolve prepared numeric expression types (#25788)
fix: unify checked arithmetic and overflow semantics (#25846)
feat(plan): propagate numeric assignment context across DML paths (#2…
fix(plan): resolve prepared numeric expression types (matrixorigin#25788
fix: unify checked arithmetic and overflow semantics (matrixorigin#25846
feat(plan): propagate numeric assignment context across DML paths (ma…
fix(plan): resolve prepared numeric expression types (matrixorigin#25788
fix: unify checked arithmetic and overflow semantics (matrixorigin#25846
feat(plan): propagate numeric assignment context across DML paths (ma…
fix(plan): resolve prepared numeric expression types (matrixorigin#25788
fix: unify checked arithmetic and overflow semantics (matrixorigin#25846
feat(plan): propagate numeric assignment context across DML paths (ma…