Skip to content

Commit

Permalink
[BugFix] fix error msg of decimal precision range (StarRocks#43704)
Browse files Browse the repository at this point in the history
Signed-off-by: zombee0 <[email protected]>
  • Loading branch information
zombee0 authored Apr 8, 2024
1 parent 4913ac1 commit 42ebcba
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ public static ScalarType createDecimalV3Type(PrimitiveType type, int precision,
ctx.getSessionVariable().getLargeDecimalUnderlyingType().equals(SessionVariableConstants.PANIC)) {
Preconditions.checkArgument(0 <= precision &&
precision <= PrimitiveType.getMaxPrecisionOfDecimal(type),
"DECIMAL's precision should range from 1 to 38");
"DECIMAL's precision should range from 1 to %s",
PrimitiveType.getMaxPrecisionOfDecimal(type));
Preconditions.checkArgument(0 <= scale && scale <= precision,
"DECIMAL(P[,S]) type P must be greater than or equal to the value of S");
}
Expand Down

0 comments on commit 42ebcba

Please sign in to comment.