You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "HappenLee (via GitHub)" <gi...@apache.org> on 2023/04/23 10:04:15 UTC

[GitHub] [doris] HappenLee commented on a diff in pull request #18872: [fix](planner) vdatetime_value.cpp:1585 Array access may overflow.

HappenLee commented on code in PR #18872:
URL: https://github.com/apache/doris/pull/18872#discussion_r1174549867


##########
be/src/vec/runtime/vdatetime_value.cpp:
##########
@@ -1580,7 +1580,11 @@ bool VecDateTimeValue::date_add_interval(const TimeInterval& interval) {
         // This will change month and year information, maybe date.
         int64_t months = _year * 12 + _month - 1 + sign * (12 * interval.year + interval.month);
         _year = months / 12;
-        if (_year > 9999) {
+        DCHECK(months>=0)<<"months should be a non-negative number.";

Review Comment:
   code format the code



-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org