SEPURI-SAI-KRISHNA commented on PR #12605:
URL: https://github.com/apache/seatunnel/pull/12605#issuecomment-6250570352

   Thanks @SEZ9, and thanks @DanielLeens for checking the head.
   
   Both items were deliberate, and the answer to "in a later commit?" is 
actually "earlier": they went in with `5eb6a8ca9` on 2026-10-02, which is an 
ancestor of `c5b287cc5`, so they were already in place at the head you named 
rather than added since.
   
   **1. The error message and code.** The message has not said `CAST` since 
that commit. `outOfIntRange` produces:
   
   ```
   Value %s cannot be converted to %s: out of range [%d, %d]
   ```
   
   Its Javadoc records why, in those words: the wording names the conversion 
rather than the `CAST` keyword because `COALESCE` and `IFNULL` reach it where 
the user wrote no cast and the target type was inferred.
   
   `UNSUPPORTED_OPERATION` was kept on purpose. Every other invalid-conversion 
failure raised from `SystemFunction.castAs` already uses it, so a new code for 
this one path would have made the same class of failure report two different 
codes depending on which branch produced it. I took "consistent with the 
neighbours" over "more precise in isolation", but if you would rather it were a 
distinct code I will change it; it is a contained change and nothing asserts 
the code today.
   
   **2. The `numberToInt` Javadoc.** It is the method contract: what it 
narrows, what it does with a fractional source, `@param`, `@return` and 
`@throws`. What it also keeps is two sentences on why the check runs per 
numeric family instead of widening through `longValue()` first.
   
   I would rather keep those two sentences, for the reason Daniel gives: 
`longValue()` looks like an obvious simplification, and taking it reintroduces 
exactly the wraparound this PR fixes, because it keeps only the low-order 64 
bits of a `BigDecimal` and maps `NaN` to zero. It reads as a rationale for the 
current shape rather than a before and after story. That said, it is your call 
and it is a two-line deletion, so say the word and I will trim it to the 
contract alone.
   
   Nothing else is outstanding from my side. Happy to push either change as a 
small follow-up commit if you want them, and otherwise there is nothing more 
from me.
   


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