From be3151937ca61f56341475e100fe6867d6b1eb6f Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Wed, 17 Aug 2022 08:51:14 +0000 Subject: [PATCH] Set return type to Date32 for toLastDayOfMonth function --- src/Functions/DateTimeTransforms.h | 4 ++-- src/Functions/toLastDayOfMonth.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Functions/DateTimeTransforms.h b/src/Functions/DateTimeTransforms.h index 065f08296d0..da2e443523d 100644 --- a/src/Functions/DateTimeTransforms.h +++ b/src/Functions/DateTimeTransforms.h @@ -183,7 +183,7 @@ struct ToLastDayOfMonthImpl { static constexpr auto name = "toLastDayOfMonth"; - static inline UInt16 execute(Int64 t, const DateLUTImpl & time_zone) + static inline Int64 execute(Int64 t, const DateLUTImpl & time_zone) { return time_zone.toLastDayNumOfMonth(time_zone.toDayNum(t)); } @@ -191,7 +191,7 @@ struct ToLastDayOfMonthImpl { return time_zone.toLastDayNumOfMonth(time_zone.toDayNum(t)); } - static inline UInt16 execute(Int32 d, const DateLUTImpl & time_zone) + static inline Int32 execute(Int32 d, const DateLUTImpl & time_zone) { return time_zone.toLastDayNumOfMonth(ExtendedDayNum(d)); } diff --git a/src/Functions/toLastDayOfMonth.cpp b/src/Functions/toLastDayOfMonth.cpp index 38d42521f00..cc67e6f7efc 100644 --- a/src/Functions/toLastDayOfMonth.cpp +++ b/src/Functions/toLastDayOfMonth.cpp @@ -6,7 +6,7 @@ namespace DB { -using FunctionToLastDayOfMonth = FunctionDateOrDateTimeToSomething; +using FunctionToLastDayOfMonth = FunctionDateOrDateTimeToSomething; REGISTER_FUNCTION(ToLastDayOfMonth) {