Skip to content

[Subtask]: unify checked arithmetic and overflow semantics #25754

Closed

Description

@ck89119

Parent Issue

Parent issue: #25705

Detail of Subtask

Unify checked arithmetic and overflow semantics for signed integers, unsigned integers, floating-point values, and
DECIMAL64/128/256.

Cover add, subtract, multiply, /, DIV, and MOD; distinguish division by zero from overflow; align error codes and SQL
mode behavior with MySQL 8.4; and define the boundary between intermediate decimal overflow, scale adjustment, rounding, and
final assignment overflow.

Describe implementation you've considered

First add characterization tests for every physical type and boundary. Then consolidate repeated integer helpers behind a
generic checked-operation contract while preserving vectorized kernels. Change float and decimal error mapping only where a
MySQL comparison demonstrates the required behavior.

Additional information

Do not introduce per-row string conversion, reflection, or unbounded integer allocation. Acceptance requires focused function
tests, dependent-package regressions, MySQL 8.4 comparison cases, and at least 75% coverage for modified code.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions