提交 d4df83cb 编写于 作者: S serge-rider

Null scale handle


Former-commit-id: ba1147d5
上级 65513c28
......@@ -496,7 +496,7 @@ public class BasicSQLDialect implements SQLDialect {
}
} else if (dataKind == DBPDataKind.NUMERIC) {
if (typeName.equals("DECIMAL") || typeName.equals("NUMERIC") || typeName.equals("NUMBER")) {
int scale = column.getScale();
Integer scale = column.getScale();
int precision = CommonUtils.toInt(column.getPrecision());
if (precision == 0) {
precision = (int) column.getMaxLength();
......@@ -507,7 +507,7 @@ public class BasicSQLDialect implements SQLDialect {
//precision--; // One character for sign?
}
}
if (scale >= 0 && precision >= 0 && !(scale == 0 && precision == 0)) {
if (scale != null && scale >= 0 && precision >= 0 && !(scale == 0 && precision == 0)) {
return "(" + precision + ',' + scale + ')';
}
} else if (typeName.equals("BIT")) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册