Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
koarz committed Dec 27, 2024
1 parent 8335b3a commit 9d5dc10
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion be/src/vec/functions/function_date_or_datetime_computation.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ ReturnNativeType date_time_add(const InputNativeType& t, Int32 delta, bool& is_n
// e.g.: for DatatypeDatetimeV2, cast from u64 to DateV2Value<DateTimeV2ValueType>
auto ts_value = binary_cast<InputNativeType, DateValueType>(t);
TimeInterval interval(unit, delta, false);
if constexpr (std::is_same_v<ArgType, ReturnType>) {
if constexpr (std::is_same_v<VecDateTimeValue, DateValueType> ||
std::is_same_v<ArgType, ReturnType>) {
is_null = !(ts_value.template date_add_interval<unit>(interval));
// here DateValueType = ResultDateValueType
return binary_cast<DateValueType, ReturnNativeType>(ts_value);
Expand Down

0 comments on commit 9d5dc10

Please sign in to comment.