diff --git a/dinky-metadata/dinky-metadata-postgresql/src/main/java/org/dinky/metadata/convert/PostgreSqlTypeConvert.java b/dinky-metadata/dinky-metadata-postgresql/src/main/java/org/dinky/metadata/convert/PostgreSqlTypeConvert.java index 4ed4621d07..4ea1262107 100644 --- a/dinky-metadata/dinky-metadata-postgresql/src/main/java/org/dinky/metadata/convert/PostgreSqlTypeConvert.java +++ b/dinky-metadata/dinky-metadata-postgresql/src/main/java/org/dinky/metadata/convert/PostgreSqlTypeConvert.java @@ -65,7 +65,9 @@ public PostgreSqlTypeConvert() { private static Optional convertDecimalOrNumeric( Column column, DriverConfig driverConfig) { - // 该字段的精度 + if (column.getPrecision() == null) { + return Optional.of(ColumnType.DECIMAL); + } int intValue = column.getPrecision().intValue(); if (intValue > 38) { return Optional.of(ColumnType.STRING);