yujun777 commented on code in PR #53697:
URL: https://github.com/apache/doris/pull/53697#discussion_r2241992177
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/literal/DateTimeV2Literal.java:
##########
@@ -67,7 +69,9 @@ private void roundMicroSecond(int scale) {
"invalid datetime v2 scale: %s", scale);
double factor = Math.pow(10, 6 - scale);
- this.microSecond = Math.round(this.microSecond / factor) * (int)
factor;
+ if (microSecond > Math.pow(10, scale)) {
Review Comment:
microsecond = 1, change scale from 6 to 5, then need round microsecond
= (1 / 10) * 10 = 0
if add line 72, it will not round
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]