SEZ9 commented on issue #12612: URL: https://github.com/apache/seatunnel/issues/12612#issuecomment-6406793138
Thanks for closing the loop, and for the correction on `COALESCE` / `IFNULL`. Agreed on all of it: given #9295 asked for "convert to args0 type" and #9299 / `7f756b188` shipped exactly that (the `coalesce(args, targetType)` overload plus the first-non-null walk now at `ZetaSQLType` lines 478-490 on `25bcc53fd`), "first argument wins" is the contract, not a gap. No separate issue is needed, and I consider that promise withdrawn cleanly rather than left open. Keeping the result-type inference question out of #12899, as you did, is the right call; that PR should only be about the `BIGINT` range check, not about changing what the inferred target is. The part that does matter from your correction is the second consequence you listed: because the target is inferred from the first argument, `COALESCE` / `IFNULL` are the one route by which a value hits the narrower integral conversion with no cast written, so that is where the #12605 checks and the `BIGINT` checks become visible to users. Two small asks on that, both documentation-only: 1. Please confirm the `incompatible-changes.md` entry in #12899 still says explicitly that `COALESCE` / `IFNULL` is the only route that reaches the `BIGINT` conversion, as you described above, so a reader of the release notes knows exactly where the new failure can appear. 2. It would be worth adding the explicit workaround you gave here, `COALESCE(CAST(int_col AS BIGINT), bigint_col)`, to that same entry (or the `IFNULL` one), so the "I wanted the widest type" case has a one-line answer right next to the behaviour change rather than only in this thread. If both are already in the PR as written, just say so and nothing further is needed from you on this point. <!-- streview-comment:2038 --> -- 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]
