SaintBacchus commented on code in PR #9574: URL: https://github.com/apache/incubator-doris/pull/9574#discussion_r874299512
########## be/src/vec/runtime/vdatetime_value.h: ########## @@ -288,21 +288,23 @@ class VecDateTimeValue { // Now this type is a temp solution with little changes case YEAR: { int year = (ts_value2.year() - ts_value1.year()); if (year > 0) { - year -= (ts_value2.to_int64() % 10000000000 - ts_value1.to_int64() % 10000000000) < - 0; + year -= (ts_value2.to_datetime_int64() % 10000000000 - Review Comment: Because the logic of `% 10000000000` is depend on `datetime` type. If the type is `date`, this logic should be like this `(ts_value2.to_int64() % 10000 - ts_value1.to_int64() % 10000) < 0` -- 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