yuqi1129 commented on code in PR #10534:
URL: https://github.com/apache/gravitino/pull/10534#discussion_r3194247310


##########
catalogs/catalog-jdbc-postgresql/src/main/java/org/apache/gravitino/catalog/postgresql/converter/PostgreSqlTypeConverter.java:
##########
@@ -76,7 +76,23 @@ public Type toGravitino(JdbcTypeBean typeBean) {
             .map(Types.TimestampType::withTimeZone)
             .orElseGet(Types.TimestampType::withTimeZone);
       case NUMERIC:
-        return Types.DecimalType.of(typeBean.getColumnSize(), 
typeBean.getScale());
+        Integer columnSize = typeBean.getColumnSize();
+        Integer scale = typeBean.getScale();
+        // Unconstrained NUMERIC (no precision/scale) — PostgreSQL JDBC 
returns columnSize=0.
+        // Use ExternalType to preserve arbitrary-precision semantics (backed 
by BigDecimal).
+        if (columnSize == null || columnSize == 0) {
+          return Types.ExternalType.of(NUMERIC);

Review Comment:
   This fix does not touch engine supports and only fixes loading a PG table 
that is not created via Gravitino. 



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