SEPURI-SAI-KRISHNA commented on issue #11926:
URL: https://github.com/apache/seatunnel/issues/11926#issuecomment-5505566036

   Fixed on `dev`. Closing.
   
   The fix landed via #11937 (merge commit `2a96f18b`, 2026-09-01), not via 
#11927. #11927 was the original PR for this issue and carried the `Closes 
#11926` link, but its commit was rebased into #11937 as `4a6ca5f3c` and merged 
there, so this issue never auto-closed. #11927 is being closed as superseded.
   
   Both defects reported here now fail loudly instead of returning a wrapped 
value.
   
   **`ABS` at the minimum negative value.** `NumericFunction.java` now guards 
every integral width before returning, throwing rather than handing back a 
negative absolute value: TINYINT at `:39`, SMALLINT at `:46`, INT at `:53`, 
BIGINT at `:60`, all through a shared `absOverflow` helper at `:386`. This 
restores the behaviour `docs/en/transforms/sql-functions.md` has documented all 
along, that exceeding the type's range "leads to an exception".
   
   **`ROUND` / `CEIL` / `CEILING` / `FLOOR` / `TRUNC` / `TRUNCATE` at negative 
scale.** The double narrowing is gone. A `checkIntegralRange` helper at `:371` 
validates the rounded result against the declared type's bounds before it is 
narrowed, called at `:349`, `:353`, `:357` and `:360`. `ROUND(32767, -1)` on a 
SMALLINT now raises an overflow error instead of returning `-32766`.
   
   TINYINT coverage came in the same merge through #11937, which added the 
`BYTE` case to the rounding family routed through that range check, plus a 
`default` branch so an unhandled numeric type throws instead of being returned 
silently unrounded.
   
   Thanks to @DanielLeens for spotting the SMALLINT half independently during 
review, which is what turned it into the follow-up that merged here.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to