LiBinfeng-01 commented on code in PR #43422:
URL: https://github.com/apache/doris/pull/43422#discussion_r1837688553


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/executable/NumericArithmetic.java:
##########
@@ -1136,21 +1136,10 @@ public static Expression mathE() {
     public static Expression truncate(DecimalV3Literal first, IntegerLiteral 
second) {
         if (first.getValue().compareTo(BigDecimal.ZERO) == 0) {
             return first;
+        } else if (first.getValue().compareTo(BigDecimal.ZERO) == -1) {

Review Comment:
   https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html
   maybe you can check bigDecimal Type implementation for compareTo



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