[fix](jdbc catalog) Fix the precision of decimal type mapping to 0 (#29407)

This commit is contained in:
zy-kkk
2024-01-08 17:53:52 +08:00
committed by yiguolei
parent c10bcb666d
commit 3cd1c7745a
5 changed files with 17 additions and 2 deletions

View File

@ -520,7 +520,7 @@ public abstract class JdbcClient {
protected abstract Type jdbcTypeToDoris(JdbcFieldSchema fieldSchema);
protected Type createDecimalOrStringType(int precision, int scale) {
if (precision <= ScalarType.MAX_DECIMAL128_PRECISION) {
if (precision <= ScalarType.MAX_DECIMAL128_PRECISION && precision > 0) {
return ScalarType.createDecimalV3Type(precision, scale);
}
return ScalarType.createStringType();