cambyzju commented on code in PR #26381: URL: https://github.com/apache/doris/pull/26381#discussion_r1382892041
########## fe/fe-core/src/main/java/org/apache/doris/analysis/StringLiteral.java: ########## @@ -254,9 +254,14 @@ protected Expr uncheckedCastTo(Type targetType) throws AnalysisException { case DECIMAL32: case DECIMAL64: case DECIMAL128: - DecimalLiteral res = new DecimalLiteral(new BigDecimal(value)); - res.setType(targetType); - return res; + try { + DecimalLiteral res = new DecimalLiteral(new BigDecimal(value)); + res.setType(targetType); + return res; + } catch (Exception e) { + throw new AnalysisException(String.format( + "input value can't parse to decimal, value=%s, reason=%s", value)); Review Comment: forget reason? `reason=%s` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org