LiBinfeng-01 commented on code in PR #43422: URL: https://github.com/apache/doris/pull/43422#discussion_r1836085412
########## 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: the function compareTo only return 0 -1 and 1, so I think -1 is acceptable for this situation -- 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