[hotfix] run mvn spotless to fix code style violations. (#3219)

pull/3220/head
Hongshun Wang 10 months ago committed by GitHub
parent 18dd51fe22
commit 025653d772
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -305,10 +305,15 @@ public class StarRocksUtils {
builder.setDecimalDigits(decimalType.getScale());
} else {
builder.setDataType(VARCHAR);
// For a DecimalType with precision N, we may need N + 1 or N + 2 characters to store it as a
// For a DecimalType with precision N, we may need N + 1 or N + 2 characters to
// store it as a
// string (one for negative sign, and one for decimal point)
builder.setColumnSize(Math.min(
decimalType.getScale() != 0? decimalType.getPrecision() + 2:decimalType.getPrecision() + 1, MAX_VARCHAR_SIZE));
builder.setColumnSize(
Math.min(
decimalType.getScale() != 0
? decimalType.getPrecision() + 2
: decimalType.getPrecision() + 1,
MAX_VARCHAR_SIZE));
}
builder.setNullable(decimalType.isNullable());
return builder;

Loading…
Cancel
Save