Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
yiguolei committed Nov 21, 2024
1 parent a0befa8 commit 763ce18
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions be/src/vec/runtime/vdatetime_value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@

namespace doris {

#include "common/compile_check_begin.h"
static const char* s_ab_month_name[] = {"", "Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec", nullptr};

Expand Down Expand Up @@ -1677,7 +1676,7 @@ bool VecDateTimeValue::date_add_interval(const TimeInterval& interval) {
}
} else if constexpr (unit == YEAR) {
// This only change year information
_year += sign * interval.year;
_year = (uint16_t)(_year + sign * interval.year);
if (_year > 9999) {
return false;
}
Expand Down Expand Up @@ -1786,11 +1785,11 @@ void VecDateTimeValue::from_unixtime(int64_t timestamp, const cctz::time_zone& c
_neg = 0;
_type = TIME_DATETIME;
_year = (uint16_t)(tp.year());
_month = (uint16_t)(tp.month());
_day = (uint16_t)(tp.day());
_hour = (uint16_t)(tp.hour());
_minute = (uint16_t)(tp.minute());
_second = (uint16_t)(tp.second());
_month = (uint8_t)(tp.month());
_day = (uint8_t)(tp.day());
_hour = (uint8_t)(tp.hour());
_minute = (uint8_t)(tp.minute());
_second = (uint8_t)(tp.second());
}

const char* VecDateTimeValue::month_name() const {
Expand Down

0 comments on commit 763ce18

Please sign in to comment.