yuqi1129 opened a new pull request, #10534:
URL: https://github.com/apache/gravitino/pull/10534

   ### What changes were proposed in this pull request?
   
   In `PostgreSqlTypeConverter.toGravitino()`, when a PostgreSQL column is 
defined as `NUMERIC` without explicit precision/scale, the JDBC driver returns 
`columnSize=0`. This was passed directly to `Types.DecimalType.of(0, ...)` 
which rejects precision=0 with an `IllegalArgumentException`.
   
   Fix: map `columnSize=null` or `columnSize=0` to `DECIMAL(38, 18)` — the 
maximum supported precision with a sensible default scale.
   
   ### Why are the changes needed?
   
   Fix: #10519
   
   Unconstrained `NUMERIC` columns are valid in PostgreSQL and commonly used. 
Loading any table containing such a column was completely broken.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes — loading tables with unconstrained `NUMERIC` columns now succeeds, 
returning `DECIMAL(38, 18)` instead of throwing an error.
   
   ### How was this patch tested?
   
   Added unit tests in `TestPostgreSqlTypeConverter` for both `columnSize=0` 
and `columnSize=null` cases.


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