Gabriel39 commented on code in PR #12877:
URL: https://github.com/apache/doris/pull/12877#discussion_r984291765


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/CastExpr.java:
##########
@@ -412,7 +412,7 @@ private Expr castTo(LiteralExpr value) throws 
AnalysisException {
         } else if (type.isLargeIntType()) {
             return new LargeIntLiteral(value.getStringValue());
         } else if (type.isDecimalV2() || type.isDecimalV3()) {
-            return new DecimalLiteral(value.getStringValue());

Review Comment:
   OK. If so, I prefer
   `
   else if (type.isDecimalV2() || type.isDecimalV3()) {} else if 
(type.isWildcardDecimal())
   `
   and add an assertion `scale >= 0` in this new constructor.
   
   Anyway, this is a preference and it's up to you



-- 
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

Reply via email to