diqiu50 commented on code in PR #13163:
URL: https://github.com/apache/gravitino/pull/13163#discussion_r4118022844
##########
catalogs/catalog-jdbc-postgresql/src/main/java/org/apache/gravitino/catalog/postgresql/converter/PostgreSqlTypeConverter.java:
##########
@@ -86,7 +86,16 @@ public Type toGravitino(JdbcTypeBean typeBean) {
if (columnSize == null || columnSize == 0) {
return Types.ExternalType.of(NUMERIC);
}
- return Types.DecimalType.of(columnSize, scale == null ? 0 : scale);
+ int numericScale = scale == null ? 0 : scale;
+ // PostgreSQL stores scale as a signed 11-bit value. JDBC metadata can
expose the
+ // unsigned representation, for example 2045 for NUMERIC(2, -3).
Review Comment:
Is there a reference for this behavior (PG source or JDBC driver docs)? Would
help to link it in the comment.
--
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]