SEZ9 commented on issue #12841: URL: https://github.com/apache/seatunnel/issues/12841#issuecomment-6244801269
Thanks for the detailed write-up, and for splitting this out of #12814. One correction on the report: the quoted clamp only triggers when `p > 38`, so a column declared `DECIMAL(30, 0)` is never remapped. Did you mean a value with 30 integer digits stored in a `DECIMAL(65, 0)` column, which would indeed not fit the 20 integer digits of `DECIMAL(38, 18)`? Could you confirm? Since the behavior so far comes from reading the code, an end-to-end reproduction of the MySQL -> MySQL case from your config (`DECIMAL(65, 0)`, `DECIMAL(50, 30)`, auto-created sink table) would be very helpful, ideally as an e2e test in the PR. The signed/unsigned asymmetry you describe (`DECIMAL(p, s) UNSIGNED` -> `DECIMAL(p + 1, s)` without any clamp) should be made consistent in the same change. On direction A vs. B: whichever is chosen, please spell out the trade-off in the PR. Note that B does not help every case: for `DECIMAL(50, 30)`, `max(0, 38 - (p - s))` still gives scale 18, i.e. the same `DECIMAL(38, 18)` as today. If the declared type is kept (A), an `incompatible-changes.md` entry is needed as you noted. If more than one person plans to work on this, please coordinate here first so the effort is not duplicated. <!-- streview-comment:1835 --> -- 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]
