mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-11 17:02:25 +00:00
Set return type to Date32 for toLastDayOfMonth function
This commit is contained in:
parent
47bdd8a3e2
commit
be3151937c
@ -183,7 +183,7 @@ struct ToLastDayOfMonthImpl
|
|||||||
{
|
{
|
||||||
static constexpr auto name = "toLastDayOfMonth";
|
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));
|
return time_zone.toLastDayNumOfMonth(time_zone.toDayNum(t));
|
||||||
}
|
}
|
||||||
@ -191,7 +191,7 @@ struct ToLastDayOfMonthImpl
|
|||||||
{
|
{
|
||||||
return time_zone.toLastDayNumOfMonth(time_zone.toDayNum(t));
|
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));
|
return time_zone.toLastDayNumOfMonth(ExtendedDayNum(d));
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
namespace DB
|
namespace DB
|
||||||
{
|
{
|
||||||
|
|
||||||
using FunctionToLastDayOfMonth = FunctionDateOrDateTimeToSomething<DataTypeDate, ToLastDayOfMonthImpl>;
|
using FunctionToLastDayOfMonth = FunctionDateOrDateTimeToSomething<DataTypeDate32, ToLastDayOfMonthImpl>;
|
||||||
|
|
||||||
REGISTER_FUNCTION(ToLastDayOfMonth)
|
REGISTER_FUNCTION(ToLastDayOfMonth)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user