[Bug](decimalv3) select view of decimalv3 error (#15404)
This commit is contained in:
@ -557,9 +557,6 @@ public class ScalarType extends Type {
|
||||
}
|
||||
break;
|
||||
case DECIMALV2:
|
||||
case DECIMAL32:
|
||||
case DECIMAL64:
|
||||
case DECIMAL128:
|
||||
if (Strings.isNullOrEmpty(precisionStr)) {
|
||||
stringBuilder.append("decimal").append("(").append(precision)
|
||||
.append(", ").append(scale).append(")");
|
||||
@ -570,6 +567,20 @@ public class ScalarType extends Type {
|
||||
stringBuilder.append("decimal").append("(`").append(precisionStr).append("`)");
|
||||
}
|
||||
break;
|
||||
case DECIMAL32:
|
||||
case DECIMAL64:
|
||||
case DECIMAL128:
|
||||
String typeName = Config.enable_decimal_conversion ? "decimal" : "decimalv3";
|
||||
if (Strings.isNullOrEmpty(precisionStr)) {
|
||||
stringBuilder.append(typeName).append("(").append(precision)
|
||||
.append(", ").append(scale).append(")");
|
||||
} else if (!Strings.isNullOrEmpty(precisionStr) && !Strings.isNullOrEmpty(scaleStr)) {
|
||||
stringBuilder.append(typeName).append("(`").append(precisionStr)
|
||||
.append("`, `").append(scaleStr).append("`)");
|
||||
} else {
|
||||
stringBuilder.append(typeName).append("(`").append(precisionStr).append("`)");
|
||||
}
|
||||
break;
|
||||
case DATETIMEV2:
|
||||
stringBuilder.append("datetime").append("(").append(scale).append(")");
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user