Eymenonar opened a new pull request, #12853:
URL: https://github.com/apache/seatunnel/pull/12853

   ### Purpose of this pull request
   
   Fixes #12841.
   
   MySQL JDBC source conversion now preserves declared `DECIMAL(p, s)` 
precision and scale up to MySQL's limits instead of narrowing precision above 
38 to `DECIMAL(38, 18)`. Signed and unsigned DECIMAL values use the same `(p, 
s)` rule because `UNSIGNED` changes the sign range, not the declared total 
precision. MySQL sink DDL therefore keeps wide source definitions such as 
`DECIMAL(65, 0)` and `DECIMAL(50, 30)`.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. MySQL JDBC source schemas and automatically generated MySQL sink DDL 
change for DECIMAL precision above 38. Existing target tables are not altered. 
The English and Chinese incompatible-changes documentation describes the 
behavior and migration impact.
   
   ### How was this patch tested?
   
   - Added source conversion coverage for `DECIMAL(39, 2)`, `DECIMAL(65, 0)`, 
`DECIMAL(50, 30)`, and unsigned `DECIMAL(65, 0)`.
   - Added MySQL DDL coverage for `DECIMAL(65, 0)` and `DECIMAL(50, 30)`.
   - Added JDBC value-flow coverage ensuring a wide `BigDecimal` is written 
without narrowing.
   - Verified the new tests fail with the previous `(38, 18)` / unsigned `p + 
1` behavior, then pass with this fix.
   - `./mvnw -q -pl seatunnel-connectors-v2/connector-jdbc -am -DskipTests 
verify` passed.
   - `./mvnw -q -pl seatunnel-connectors-v2/connector-jdbc -am -DskipTests 
spotless:check` passed.
   - Targeted JDBC tests passed: 58 tests, 0 failures.
   - `./mvnw spotless:apply` passed.
   - The full repository `./mvnw -q -DskipTests verify` was attempted but did 
not complete within the local execution window; the affected reactor 
verification passed.
   
   ### Check list
   
   * [ ] If any new Jar binary package adding in your PR, please add License 
Notice according to the New License Guide
   * [x] If necessary, update the documentation to describe the user-facing 
change.
   * [x] If necessary, update `incompatible-changes.md` to describe the 
incompatibility caused by this PR.
   * [ ] If you are contributing the connector code, please check the 
connector-specific checklist. This PR changes existing JDBC behavior only and 
adds no connector.
   


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