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

   Confirmed, @SEZ9, it is in the PR as pushed.
   
   
`SystemFunctionTest.testCastAsTinyintAndSmallintAlreadyRejectOutOfRangeNumericInput`
 calls `SystemFunction.castAs` directly for `TINYINT`, `BYTE` and `SMALLINT` 
with out-of-range numeric input (`300L`, `-300L`, `70000`, `Long.MAX_VALUE`, 
and `70000L` / `-70000L` / `2147483647` for `SMALLINT`), asserts the in-range 
values still convert, and asserts that a fractional source such as `5.7d` is 
still rejected by those targets. That last pair is the coverage that justifies 
leaving them on their existing parsing paths rather than routing them through 
the numeric helper.
   
   Alongside it, `testCastAsIntRejectsOutOfRangeNumericInput` does the same 
directly for the `INT` path this PR changes.
   
   Both are at the pushed head, in 
`seatunnel-transforms-v2/src/test/java/org/apache/seatunnel/transform/sql/zeta/functions/SystemFunctionTest.java`.
   
   Since your last comment I also pushed the fix for the four findings in your 
review on the PR, including one you may want to look at specifically: the first 
version of the range check compared the raw value rather than the truncated 
one, which wrongly rejected `CAST(2147483647.5 AS INT)`. Details are on #12605.
   


-- 
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