SEZ9 commented on issue #12841:
URL: https://github.com/apache/seatunnel/issues/12841#issuecomment-6281661090

   Thanks @zhengxiang378928908-code for running the end-to-end reproduction, 
and for the correction — noted that MySQL -> MySQL is not affected and that the 
title and description have been updated.
   
   Your results confirm the point we settled earlier: `DECIMAL(30, 0)` itself 
is never remapped, but a value with 30 integer digits stored in a `DECIMAL(65, 
0)` column cannot fit the 20 integer digits of the clamped `DECIMAL(38, 18)`. 
On `dev` at `e2957d27a` that is exactly the numeric field overflow you hit on 
the 30-digit row for MySQL -> PostgreSQL, and the silent truncation of 
`0.000000000000000000000000000001` to `0.000000000000000000` in `d50_30` is the 
fractional side of the same clamp. Your explanation also makes clear why MySQL 
-> MySQL round-trips: `MysqlCreateTableSqlBuilder` reuses 
`column.getSourceType()` for the DDL, so the clamped SeaTunnel type is never 
used there, and the defect only surfaces when a sink derives its DDL from the 
SeaTunnel type.
   
   Your run against `dad4e1244` (`numeric(65,0)` / `numeric(50,30)` 
auto-created on PostgreSQL, all six rows matching the source, MySQL -> MySQL 
unchanged) is the evidence I wanted for approach A. Thanks to @Eymenonar for 
taking the fix.
   
   <!-- streview-comment:1881 -->


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