DanielLeens commented on PR #12920: URL: https://github.com/apache/seatunnel/pull/12920#issuecomment-7247794193
Thanks, @SEZ9, for the concrete carrying-sum counterexample. Sorry I missed this interaction in my preceding review; my source-clear conclusion needs correction. +1 to your Issue1, without duplicating its number: at this exact head ZetaSQLType.java:225-239 infers DECIMAL(max precision,max scale) for arithmetic, and :480-492 chooses only the first non-NULL argument's type for IFNULL/COALESCE. ZetaSQLFunction.java:803-804 nevertheless returns the raw BigDecimal sum. SystemFunction.java:98-99 enables the new precision check, so999.99+999.99is1999.98but the inferred DECIMAL(5,2) allows only three integer digits. The guard at :426-429 therefore rejects a value generated by its own first argument. The CASE exception's inference rationale also applies here. Keep implicit IFNULL/COALESCE on the legacy conversion until inference is sound, or widen inference first, with the carrying-sum and wider-fallback regressions you described. This supported-path regression blocks merging. Your Issue2 correctly separates pre-existing CASE exponent expansion from the newly checked paths: castCaseResult passes false and still reaches setScale at :440 for a huge positive exponent. I withdraw any broad claim that every caller is protected. A bounded expansion policy needs its own explicit contract; it is not evidence that this PR introduced the old exposure. Issue4's diagnostic should avoid rendering unbounded row values. I also agree the migration/function examples and retained Float/Double comments in Issues3,5-7 should reflect the actual checked versus inferred paths. This is a response to your current-head countercheck and an explicit correction of my omission, not a second numbered whole-head review. Current-head CI alone cannot clear this source regression. Merge after the source/inference boundary is corrected and its regression passes, with independent maintainer approval. Discussion-only follow-up at unchanged head `53f2696c5dc0e1baa73794bd4f001b201d2a4377`. This is not a new full source review. No local build, test, engine or provider execution was performed. Daniel has READ permission; effective approval/dismissal belongs to a write-capable maintainer. -- 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]
